Function createAccount

  • Create and initialize a new 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 keypair: Keypair

      Optional keypair, defaulting to the associated token account for the mint and owner

    • Optional confirmOptions: ConfirmOptions

      Options for confirming the transaction

    • programId: PublicKey = TOKEN_PROGRAM_ID

      SPL Token program account

    Returns Promise<PublicKey>

    Address of the new token account

Generated using TypeDoc