Function createAssociatedTokenAccount

  • Create and initialize a new associated token account

    Parameters

    • connection: Connection

      Connection to use

    • payer: Signer

      Payer of the transaction and initialization fees

    • mint: PublicKey

      Mint for the account

    • owner: PublicKey

      Owner of the new account

    • Optional confirmOptions: ConfirmOptions

      Options for confirming the transaction

    • programId: PublicKey = TOKEN_PROGRAM_ID

      SPL Token program account

    • associatedTokenProgramId: PublicKey = ASSOCIATED_TOKEN_PROGRAM_ID

      SPL Associated Token program account

    Returns Promise<PublicKey>

    Address of the new associated token account

Generated using TypeDoc