Cashu-TS - v4.0.0-rc3
    Preparing search index...

    Class ReceiveBuilder

    Builder for receiving a token.

    If you do not call a type method, the wallet’s policy default is used.

    const proofs = await wallet.ops
    .receive(token) // or array of proofs
    .asDeterministic() // counter 0 auto reserves
    .requireDleq(true)
    .run();
    Index

    Constructors

    Methods

    • Use deterministic outputs for the received proofs.

      Parameters

      • counter: number = 0

        Starting counter. Zero means auto reserve using the wallet’s CounterSource.

      • Optionaldenoms: AmountLike[]

        Optional custom split. Can be partial if you only need SOME specific amounts.

      Returns ReceiveBuilder

      If denoms specified, proofsWeHave() will have no effect.

    • Prepare the swap to receive.

      Returns Promise<SwapPreview>

      A SwapPreview containing inputs, outputs, amount, and fee.

      Call wallet.completeSwap(SwapPreview) to complete the receive.

    • Provide existing proofs to help optimise denomination selection.

      Parameters

      • p: Pick<Proof, "amount">[]

        Proofs currently held by the wallet, used to hit denomination targets.

      Returns ReceiveBuilder

      Has no effect if denominations (custom split) was specified.