Options for funding a single C-address via OnboardingBridgeSDK.fundCAddress.

const result = await sdk.fundCAddress(
{
source: keypair.publicKey(), // G-address of the sender
target: 'CC...', // destination C-address
asset: 'CD...', // token contract (e.g. USDC)
amount: '10000000', // 1 USDC (7 decimal places)
},
keypair,
);
interface FundCOptions {
    amount: string;
    asset: string;
    source: string;
    target: string;
}

Properties

amount: string

Gross transfer amount in the token's smallest unit. For a token with 7 decimal places, "10000000" equals 1 token. The protocol fee is deducted from this before crediting the target.

asset: string

Token contract address for the asset being transferred. The asset must be whitelisted on the bridge contract.

source: string

Source account that authorises the token transfer. Must be a valid G-address (Ed25519 public key).

target: string

Destination C-address (smart contract account) to receive the net funds. Must start with C and be a valid Stellar contract address.