Function transfer

  • Transfer tokens from one account to another

    Parameters

    • connection: Connection

      Connection to use

    • payer: Signer

      Payer of the transaction fees

    • source: PublicKey

      Source account

    • destination: PublicKey

      Destination account

    • owner: PublicKey | Signer

      Owner of the source account

    • amount: number | bigint

      Number of tokens to transfer

    • multiSigners: Signer[] = []

      Signing accounts if owner is a multisig

    • Optional confirmOptions: ConfirmOptions

      Options for confirming the transaction

    • programId: PublicKey = TOKEN_PROGRAM_ID

      SPL Token program account

    Returns Promise<TransactionSignature>

    Signature of the confirmed transaction

Generated using TypeDoc