Send Assets

Use sendAssets() to build, sign, and broadcast asset transfers with MPC wallets across supported blockchains.

sendAssets() is the all-in-one method: build, sign, and broadcast an asset transfer in a single call. The SDK resolves the RPC URL automatically for supported chains.

Basic Usage

import { WalletChain, WALLET_CHAINS } from "@tatumio/wallet-sdk";

const chain = WalletChain.ETHEREUM_MAINNET;
const curve = WALLET_CHAINS[chain].curve; // "SECP256K1"

const result = await client.sendAssets({
  body: {
    share: shares[curve].share,
    chain,
    to: "0xRecipientAddress",
    token: "NATIVE",    // native asset (ETH)
    amount: "0.01",     // human-readable
  },
});

console.log(result.transactionHash); // "0x..."
console.log(result.metadata.amount);

Native Asset Transfers

Pass "NATIVE" as the token for the chain's native currency:

ChainNative token
EthereumETH
PolygonMATIC
SolanaSOL
AvalancheAVAX
BaseETH
ArbitrumETH
OptimismETH
CeloCELO
TronTRX
BitcoinBTC
StellarXLM
MonadMON
// Send SOL
await client.sendAssets({
  body: {
    share: shares.ED25519.share,
    chain: WalletChain.SOLANA_MAINNET,
    to: "SolanaRecipientAddress",
    token: "NATIVE",
    amount: "0.5",
  },
});

Token Transfers

ERC-20 (EVM)

Pass the ERC-20 contract address as token:

await client.sendAssets({
  body: {
    share: shares.SECP256K1.share,
    chain: WalletChain.ETHEREUM_MAINNET,
    to: "0xRecipient",
    token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
    amount: "100",
  },
});

SPL Tokens (Solana)

Pass the SPL token mint address:

await client.sendAssets({
  body: {
    share: shares.ED25519.share,
    chain: WalletChain.SOLANA_MAINNET,
    to: "SolanaRecipient",
    token: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // USDC on Solana
    amount: "100",
  },
});

Custom RPC URL

Override the automatic RPC or provide one for chains that require it:

await client.sendAssets({
  body: {
    share: shares.SECP256K1.share,
    chain: WalletChain.TRON_MAINNET,
    to: "TRecipient",
    token: "NATIVE",
    amount: "10",
    rpcUrl: "https://api.trongrid.io",
  },
});

Response

interface SendAssetsResponse {
  transactionHash: string;
  metadata: {
    amount: string;        // human-readable amount sent
    rawAmount: string;     // amount in base units
    tokenAddress: string;  // "NATIVE" or contract address
    tokenDecimals: number;
  };
}

Gas Sponsorship

Set sponsorGas: true to use Tatum's gas sponsorship (EVM chains only). See Gas Sponsorship.

await client.sendAssets({
  body: {
    share: shares.SECP256K1.share,
    chain: WalletChain.POLYGON_MAINNET,
    to: "0xRecipient",
    token: "NATIVE",
    amount: "1",
    sponsorGas: true,
  },
});