Function addExtraAccountMetasForExecute

  • Adds all the extra accounts needed for a transfer hook to an instruction.

    Note this will modify the instruction passed in.

    Parameters

    • connection: Connection

      Connection to use

    • instruction: TransactionInstruction

      The instruction to add accounts to

    • programId: PublicKey

      Transfer hook program ID

    • source: PublicKey

      The source account

    • mint: PublicKey

      The mint account

    • destination: PublicKey

      The destination account

    • owner: PublicKey

      Owner of the source account

    • amount: number | bigint

      The amount of tokens to transfer

    • Optional commitment: Commitment

      Commitment to use

    Returns Promise<undefined | TransactionInstruction>

Generated using TypeDoc