Function createWrappedNativeAccount

  • Create, initialize, and fund a new wrapped native SOL account

    Parameters

    • connection: Connection

      Connection to use

    • payer: Signer

      Payer of the transaction and initialization fees

    • owner: PublicKey

      Owner of the new token account

    • amount: number

      Number of lamports to wrap

    • Optional keypair: Keypair

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

    • Optional confirmOptions: ConfirmOptions

      Options for confirming the transaction

    • programId: PublicKey = TOKEN_PROGRAM_ID

      SPL Token program account

    • nativeMint: PublicKey = NATIVE_MINT

    Returns Promise<PublicKey>

    Address of the new wrapped native SOL account

Generated using TypeDoc