Type alias SendTokensBuilderParams

SendTokensBuilderParams: {
    mintAddress: PublicKey;
    amount: SplTokenAmount;
    delegateAuthority?: undefined | Signer;
    toOwner?: undefined | PublicKey;
    toToken?: undefined | PublicKey | Signer;
    fromOwner?: undefined | PublicKey | Signer;
    fromToken?: undefined | PublicKey;
    fromMultiSigners?: undefined | KeypairSigner[];
    toTokenExists?: undefined | boolean;
    createAssociatedTokenAccountInstructionKey?: undefined | string;
    createAccountInstructionKey?: undefined | string;
    initializeTokenInstructionKey?: undefined | string;
    transferTokensInstructionKey?: undefined | string;
}

Type declaration

  • mintAddress: PublicKey

    The address of the mint account.

  • amount: SplTokenAmount

    The amount of tokens to send.

  • Optional delegateAuthority?: undefined | Signer

    The delegate authority of the source token account as a Signer.

    This is required when the owner of the source token account is provided as a PublicKey as someone needs to authorize that transfer of tokens.

    Default Value

    Defaults to not using a delegate authority.

  • Optional toOwner?: undefined | PublicKey

    The owner of the destination token account.

    Default Value

    metaplex.identity().publicKey

  • Optional toToken?: undefined | PublicKey | Signer

    The address of the destination token account.

    Note that this may be required as a Signer if the destination token account does not exist and we need to create it before sending the tokens.

    Default Value

    Defaults to using the associated token account from the mintAddress and toOwner parameters.

  • Optional fromOwner?: undefined | PublicKey | Signer

    The owner of the source token account.

    This may be provided as a PublicKey if one of the following is true:

    • the owner of the source token account is a multisig and the fromMultiSigners parameter is provided.
    • we are using a delegate authority to send the tokens and the delegateAuthority parameter is provided.

    Default Value

    metaplex.identity()

  • Optional fromToken?: undefined | PublicKey

    The address of the source token account.

    Default Value

    Defaults to using the associated token account from the mintAddress and fromOwner parameters.

  • Optional fromMultiSigners?: undefined | KeypairSigner[]

    The signing accounts to use if the source token owner is a multisig.

    Default Value

    []

  • Optional toTokenExists?: undefined | boolean

    Whether or not the receiving token account already exists. If false, we'll add another instruction to create it.

    Default Value

    true

  • Optional createAssociatedTokenAccountInstructionKey?: undefined | string

    A key to distinguish the instruction that creates the associated token account.

  • Optional createAccountInstructionKey?: undefined | string

    A key to distinguish the instruction that creates the token account.

  • Optional initializeTokenInstructionKey?: undefined | string

    A key to distinguish the instruction that initializes the token account.

  • Optional transferTokensInstructionKey?: undefined | string

    A key to distinguish the instruction that transfers the tokens.

Generated using TypeDoc