@cashu/cashu-ts
    Preparing search index...

    Class SendBuilder

    Builder for composing a send or swap.

    If you only customise the send side, keep is omitted so the wallet may still attempt an offline exact match selection where possible.

    const { keep, send } = await wallet.ops
    .send(5, proofs)
    .asDeterministic() // counter 0 means auto reserve via CounterSource
    .keepAsRandom()
    .includeFees(true) // sender pays receiver’s future spend fee
    .run();
    Index

    Constructors

    Methods

    • Use deterministic outputs for the sent proofs.

      Parameters

      • counter: number = 0

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

      • Optionaldenoms: number[]

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

      Returns SendBuilder

    • Use random blinding for the sent outputs.

      Parameters

      • Optionaldenoms: number[]

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

      Returns SendBuilder

    • Make the sender cover the receiver’s future spend fee.

      Parameters

      • on: boolean = true

        When true, include fees in the sent amount. Default true if called.

      Returns SendBuilder

    • Use deterministic outputs for change.

      Parameters

      • counter: number = 0

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

      • Optionaldenoms: number[]

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

      Returns SendBuilder

    • Use random blinding for change outputs.

      Parameters

      • Optionaldenoms: number[]

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

      Returns SendBuilder

    • Force a pure offline selection that allows a close match, overspend permitted per wallet RGLI. No mint calls are made. Returns the best offline subset found, or throws if funds are insufficient.

      Parameters

      • requireDleq: boolean = false

        Only consider proofs with a DLEQ when true.

      Returns SendBuilder

    • Force a pure offline, exact match selection. No mint calls are made. If an exact match cannot be found, this throws.

      Parameters

      • requireDleq: boolean = false

        Only consider proofs with a DLEQ when true.

      Returns SendBuilder