npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tomo-inc/transaction-builder-sdk

v0.0.15

Published

Tomo Wallet Transaction Builder SDK is a comprehensive TypeScript library that provides developers with easy-to-use interfaces for integrating wallet functionalities, swap operations, and cross-chain transactions into their applications.

Readme

@tomo-inc/transaction-builder-sdk

Tomo Wallet Transaction Builder SDK is a comprehensive TypeScript library that provides developers with easy-to-use interfaces for integrating wallet functionalities, swap operations, and cross-chain transactions into their applications.

Features

  • Multi-chain Support: Works with EVM, Solana, TRON, and other major blockchain platforms
  • Swap Operations: Fetch quotes and build transactions for token swaps across DEXes
  • Cross-chain Bridge: Support for cross-chain token transfers
  • Token Approvals: Handle ERC20 token approvals and permit signatures
  • Transaction Building: Generate ready-to-sign transactions for various operations
  • Chain Information: Access detailed information about supported blockchain networks

Installation

npm install @tomo-inc/transaction-builder-sdk

Quick Start

First, initialize the SDK with your API credentials:

import { Business } from "@tomo-inc/transaction-builder-sdk";

const business = new Business({
  config: {
    CLIENT_ID: "your-client-id",
  },
  tomoStage: "prod", // or 'dev' for development
});

Chain Information

Get information about supported chains for different operations:

// Get all supported chains
const allChains = business.getChains();

// Get chains that support swap operations
const swapChains = business.getSwapSupportChains();

// Get chains that support bridge operations
const bridgeChains = business.getBridgeSupportChains();

Swap Operations

Fetch quotes and build transactions for token swaps on the same chain:

// Get swap quotes
const quotes = await business.getSwapQuotes({
  sender: "0x...", // User's wallet address
  recipient: "0x...", // Recipient address (usually same as sender)
  fromToken: {
    address: "0x...", // Token contract address (use '' for native token)
    chain: {
      chainId: 1, // Ethereum mainnet
      // ... other chain properties
    },
  },
  toToken: {
    address: "0x...", // Token contract address
    chain: {
      chainId: 1, // Must be same chain for swaps
      // ... other chain properties
    },
  },
  amount: "1000000000000000000", // Amount in token's smallest unit (e.g., wei for ETH)
  slippage: 5, // 5% slippage tolerance
});

// Build swap transaction
const swapTx = await business.swapBuilder(quotes[0], {
  // Same parameters as getSwapQuotes
});

Cross-chain Bridge

Support for cross-chain token transfers:

// Get bridge quotes
const bridgeQuotes = await business.getBridgeQuotes({
  sender: "0x...", // User's wallet address on source chain
  recipient: "0x...", // Recipient address on destination chain
  fromToken: {
    address: "0x...", // Token contract address on source chain
    chain: {
      chainId: 1, // Source chain (e.g., Ethereum)
      // ... other chain properties
    },
  },
  toToken: {
    address: "0x...", // Token contract address on destination chain
    chain: {
      chainId: 56, // Destination chain (e.g., BSC)
      // ... other chain properties
    },
  },
  amount: "1000000000000000000", // Amount in token's smallest unit
  slippage: 5, // 5% slippage tolerance
});

// Build bridge transaction
const bridgeTx = await business.bridgeBuilder(bridgeQuotes[0], {
  // Same parameters as getBridgeQuotes
});

Token Approvals

Handle ERC20 token approvals and permit signatures:

import { useSignTypedData } from "wagmi";
const { signTypedDataAsync } = useSignTypedData();

// Build approval transaction (for tokens that don't support permit)
const approveTx = await business.getApproveBuilder(quote, quoteParams);

// For tokens that support permit signatures (EIP-712)
const permitTypeData = await business.evm.getPermitTypeData(quoteParams, quote);
// Sign the permit data with wallet
const signature = await signTypedDataAsync(permitTypeData);
// Use the signature when building the transaction
const swapTx = await business.swapBuilder(quote, quoteParams, {
  signature,
  permitTypeData,
});

API Reference

Core Methods

  • getSwapQuotes(params) - Fetch quotes for token swaps on the same chain
  • getBridgeQuotes(params) - Fetch quotes for cross-chain transfers
  • swapBuilder(quote, quoteParams, permitParams?) - Build swap transaction data
  • bridgeBuilder(quote, quoteParams, permitParams?) - Build bridge transaction data
  • getApproveBuilder(quote, quoteParams) - Build token approval transaction

EVM-specific Methods

  • evm.getPermitTypeData(quoteParams, quote) - Generate EIP-712 typed data for permit signatures

Chain Functions

  • getChains() - Returns all supported chains
  • getSwapSupportChains() - Returns chains that support swap operations
  • getBridgeSupportChains() - Returns chains that support bridge operations

License

MIT