Skip to main content

Module identity

Module identity 

Source

Structs§

AuthChallenge
A 32-byte random authentication challenge.
AuthResponse
Response to an authentication challenge.
FipsAddress
128-bit FIPS address with IPv6-compatible format.
Identity
A FIPS node identity consisting of a keypair and derived identifiers.
NodeAddr
16-byte node identifier derived from truncated SHA-256(pubkey).
PeerIdentity
A known peer’s identity (public key only, no signing capability).

Enums§

IdentityError
Errors that can occur in identity operations.

Constants§

FIPS_ADDRESS_PREFIX
FIPS address prefix (IPv6 ULA range).

Functions§

decode_npub
Decode an npub string to an x-only public key.
decode_nsec
Decode an nsec string to a secret key.
decode_secret
Decode a secret key from either nsec (bech32) or hex format.
encode_npub
Encode an x-only public key as a bech32 npub string (NIP-19).
encode_nsec
Encode a secret key as a bech32 nsec string (NIP-19).