Skip to main content
Custodial wallets support transferring assets that are supported by the custodian. To transfer these assets, applications can use the same interface as non-custodial wallets through Privy’s server-side SDKs or REST API.
All transactions from custodial wallets are executed server-side.

Send a transaction

For custodial wallets, only assets that are supported by the custodian can be transferred. Below are the assets supported:
AssetCustodians that supportContract address
USDC (Base)Bridge0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
USDB (Base)Bridge0x100Faa513aC917181EB29f73B64Bf7a434A206fe
See the Sending USDC recipe for a detailed example of stablecoin transfers.
  • Transactions from custodial wallets are gasless by default, customers do not need to enable gas sponsorship or set sponsor: true for gas to be sponsored - Like non-custodial wallets, custodial wallets with an owner or additional_signers require an authorization signature for transaction requests.
Use the sendTransaction method from the custodial wallets interface to send transactions. This example shows sending USDC on Base.

Usage

import {encodeFunctionData, erc20Abi} from 'viem';

const recipientAddress = '0x...';
const amountToSend = 10; // Sender wants to send 1 USDC
const decimals = 6; // USDC has 6 decimals

const encodedData = encodeFunctionData({
  abi: erc20Abi,
  functionName: 'transfer',
  args: [recipientAddress, BigInt(amountToSend * 10 ** decimals)]
});

const {hash, caip2} = await privy.wallets().ethereum().sendTransaction('insert-wallet-id', {
    caip2: 'eip155:8453',
    params: {
        transaction: {
            to: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC contract on Base
            data: encodedData,
        },
    },
});

Parameters

walletId
string
required
The ID of the custodial wallet to send the transaction from.
caip2
'eip155:8453'
required
The CAIP-2 chain ID. For ethereum type custodial wallets on Base, this is eip155:8453.
params.transaction
object
required
The transaction details.

Returns

hash
string
The hash for the broadcasted transaction. This will be an empty string since the transaction must go through custodian screening first before being broadcasted.
caip2
'eip155:8453'
The CAIP-2 chain ID confirming the transaction was sent on Base.
transactionId
string
The transaction ID for the transaction.

Next steps