Module peer_ref

Module peer_ref 

Source
Expand description

<peer-ref> token resolution used by every peer-naming command.

Accepts any of:

  • a registered alias (ASCII, up to 16 chars),
  • the canonical fixed-width base58 address (exactly 44 chars),
  • hex-encoded 32-byte pubkey (64 hex chars, optional 0x prefix),
  • base64-encoded 32-byte pubkey (standard or URL-safe alphabet).

3-byte hints are NOT accepted — they aren’t unique and the CLI refuses to guess.

Functions§

try_parse_pubkey
Decode a <peer-ref> token into a PublicKey. Alias lookup is the caller’s concern; this helper only handles the encoded forms.