@lightprotocol/compressed-token - v0.22.1-alpha.2
    Preparing search index...

    Function compress

    • Compress SPL tokens

      Parameters

      • rpc: Rpc

        Rpc connection to use

      • payer: Signer

        Fee payer

      • mint: PublicKey

        SPL Mint address

      • amount: number | BN | number[] | BN[]

        Number of tokens to compress.

      • owner: Signer

        Owner of the SPL token account.

      • sourceTokenAccount: PublicKey

        Source SPL token account. (ATA)

      • toAddress: PublicKey | PublicKey[]

        Recipient owner address.

      • OptionaloutputStateTreeInfo: TreeInfo

        Optional: State tree account that the compressed tokens should be inserted into. Defaults to a shared state tree account.

      • OptionaltokenPoolInfo: TokenPoolInfo

        Optional: Token pool info.

      • OptionalconfirmOptions: ConfirmOptions

        Options for confirming the transaction

      Returns Promise<string>

      Signature of the confirmed transaction