Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tokenbound/sdk

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokenbound/sdk

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

  • 0.1.1
  • npm
  • Socket score

Version published
Weekly downloads
462
decreased by-37.57%
Maintainers
1
Weekly downloads
 
Created
Source

@tokenbound/sdk

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

Installation

$ npm install @tokenbound/sdk

Usage

Get account address

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

Encode call to account

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

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

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

// Execute encoded call
const hash = await walletClient.sendTransaction(transactionData);

FAQs

Package last updated on 11 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc