Socket
Book a DemoInstallSign in
Socket

@tokenbound/sdk-ethers

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokenbound/sdk-ethers

An SDK for interacting with [ERC-6551 accounts](https://eips.ethereum.org/EIPS/eip-6551) using ethers.

latest
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

@tokenbound/sdk-ethers

An SDK for interacting with ERC-6551 accounts using ethers.

Installation

$ npm install @tokenbound/sdk

Usage

Get account address

import { getAccount } from "@tokenbound/sdk-ethers";
const accountAddress = await getAccount(
  "0xe7134a029cd2fd55f678d6809e64d0b6a0caddcb", // ERC-721 token contract
  "9", // ERC-721 tokenId
  provider // ethers provider
);

Encode call to account

import { prepareExecuteCall } from "@tokenbound/sdk-ethers";

const to = "0xe7134a029cd2fd55f678d6809e64d0b6a0caddcb"; // any address
const value = 0; // amount of ETH to send
const data = "0x"; // calldata

const transactionData = await prepareExecuteCall(
  accountAddress,
  to,
  value,
  data
);

// Execute encoded call
const { hash } = await signer.sendTransaction(transactionData);

FAQs

Package last updated on 13 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts