Expand description
Process-wide (wallet, subaccount) nonce manager for Derive self-custodial requests.
Derive’s venue schema defines a unique nonce as UTC milliseconds followed
by a suffix of up to three digits and illustrates the suffix as 001. The
reference SDK accepts caller-selected suffixes in 0..=999. The allocator
uses a fixed three-digit suffix field: utc_ms * 1000 + suffix.
Manager guarantees:
- Unique and monotonically increasing per
(wallet, subaccount)across every manager in the process, including during clock rollback. - Suffixes stay within the venue’s documented
0..=999range. - Atomic allocation per key under contention. A process-wide
DashMapshards the state and acompare_exchangeloop serialises allocators.
Structs§
- Nonce
Manager - Thread-safe process-wide nonce allocator keyed by
(wallet, subaccount_id).
Enums§
- Nonce
Error - Errors raised by
NonceManager.