@coinbase/cdp-sdk
Version:
SDK for interacting with the Coinbase Developer Platform Wallet API
36 lines • 1.21 kB
TypeScript
import { Connection } from "@solana/web3.js";
import { type Network } from "./utils.js";
import type { SignatureResult } from "../../client/solana/solana.types.js";
import type { CdpOpenApiClientType } from "../../openapi-client/index.js";
export interface TransferOptions {
/**
* The base58 encoded Solana address of the source account.
*/
from: string;
/**
* The base58 encoded Solana address of the destination account.
*/
to: string;
/**
* The amount to transfer, represented as an atomic unit of the token.
*/
amount: bigint;
/**
* The token to transfer, or mint address of the SPL token to transfer.
*/
token: "sol" | "usdc" | string;
/**
* The network to use which will be used to create a Connection, otherwise a Connection can be provided.
*/
network: Network | Connection;
}
/**
* Transfers SOL or SPL tokens between accounts
*
* @param apiClient - The API client to use
* @param options - The transfer options
*
* @returns The transfer result
*/
export declare function transfer(apiClient: CdpOpenApiClientType, options: TransferOptions): Promise<SignatureResult>;
//# sourceMappingURL=transfer.d.ts.map