Skip to main content

Module strkey

Module strkey 

Source
Expand description

Shared Z/G/S text encodings; independent of either CLI. Text encodings shared by native clients. StrKeys encode type and checksum, not network. Contract addresses, public keys and private seeds are deliberately separate operations.

Enums§

Error
Invalid encoding, checksum, length or StrKey type. Never includes the supplied text.

Functions§

format_contract_address
Encode the same contract address bytes as a Z StrKey; no address derivation is performed.
format_public_key
Encode raw Ed25519 public key bytes as a G StrKey, not a wallet address.
format_secret_seed
Explicitly export a private seed as an S StrKey. The returned buffer is zeroed on drop.
parse_contract_address
Parse a checksummed Z StrKey or base58 address of exactly 32 bytes.
parse_public_key
Parse a G StrKey or base58 public key. Does not derive an account address.
parse_secret_seed
Parse an S StrKey or base58 seed of exactly 32 bytes. Secret buffers are zeroed on drop. The caller must also protect and clear the input string it owns.