Skip to main content

Module wallet

Module wallet 

Source
Expand description

Wallet descriptor types for FROST group spending policies.

Structs§

DeviceRegistration
Record of a hardware signer that has registered this wallet via NIP-46.
KeyHealthStatus
Health status of a key share from a liveness check.
WalletDescriptor
A finalized wallet descriptor associated with a FROST group.

Enums§

CanonicalHashError
Error produced when canonical_descriptor_hash is given invalid inputs.

Constants§

INITIAL_DESCRIPTOR_VERSION
The version assigned to the initial wallet descriptor for a group. Subsequent migrations increment this monotonically.
KEY_HEALTH_CRITICAL_THRESHOLD_SECS
7 days - key not checked in this period is critically stale.
KEY_HEALTH_STALE_THRESHOLD_SECS
24 hours - key not checked in this period is considered stale.

Functions§

canonical_descriptor_hash
Compute the canonical descriptor hash from its constituent parts. Centralizing this avoids drift between sites that recompute the hash (initiator, ack verifier, migrate verifier, persisted descriptor, mobile completion handler). Must match WalletDescriptor::canonical_hash and the on-wire descriptor_hash used by the FROST PSBT coordination protocol.
default_descriptor_version
Default value for WalletDescriptor::version when deserializing legacy records that predate the versioning field.
fold_descriptor_version_suffix
Domain-separated version suffix folded into the canonical descriptor hash for v2+ descriptors. v1 hashes intentionally omit this suffix to remain bit-identical to records written before descriptor versioning existed.