@lightprotocol/stateless.js - v0.22.1-alpha.1
    Preparing search index...

    Function compress

    • Compress lamports to a solana address

      Parameters

      • rpc: Rpc

        RPC to use

      • payer: Signer

        Payer of the transaction and initialization fees

      • lamports: number | BN

        Amount of lamports to compress

      • toAddress: PublicKey

        Address of the recipient compressed account

      • OptionaloutputStateTreeInfo: TreeInfo

        Optional output state tree. If not provided, fetches a random active state tree.

      • OptionalconfirmOptions: ConfirmOptions

        Options for confirming the transaction

      Returns Promise<string>

      Transaction signature