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

    Class WalletCounters

    Developer friendly view of the wallet's deterministic output counters.

    Index

    Constructors

    Methods

    • Bumps the counter if it is behind minNext (no-op if ahead).

      Parameters

      • keysetId: string
      • minNext: number

      Returns Promise<void>

    • Returns the "next" counter for a specified keyset.

      Parameters

      • keysetId: string

      Returns Promise<number>

    • Hard-sets the cursor (useful for tests or migrations).

      Parameters

      • keysetId: string
      • next: number

      Returns Promise<void>

      If the CounterSource does not support setNext()

    • Returns the current "next" per keyset (what will be reserved next).

      Returns Promise<Record<string, number>>

      If the CounterSource does not support snapshot()