@lightprotocol/compressed-token - v0.23.0-beta.8
    Preparing search index...

    Function createWrapInstruction

    • Create a wrap instruction that moves tokens from an SPL/T22 account to a light-token account.

      Parameters

      • source: PublicKey

        Source SPL/T22 token account

      • destination: PublicKey

        Destination light-token account

      • owner: PublicKey

        Owner of the source account (signer)

      • mint: PublicKey

        Mint address

      • amount: bigint

        Amount to wrap,

      • splInterfaceInfo: SplInterfaceInfo

        SPL interface info for the compression

      • decimals: number

        Mint decimals (required for transfer_checked)

      • payer: PublicKey = owner

        Fee payer (defaults to owner)

      • OptionalmaxTopUp: number

        Optional cap on rent top-up (units of 1k lamports; default no cap)

      Returns TransactionInstruction

      Instruction to wrap tokens