Skip to main content

Crate thruput_encoding

Crate thruput_encoding 

Source
Expand description

Byte-preserving text codecs. Network identity and account derivation are separate.

Machine interfaces use base58 only. The typed human-input helpers also accept Thruput Z addresses and Stellar G/S StrKeys. No function guesses that an arbitrary byte array is an address. Z identifies Thruput, not a specific network.

Enums§

Error
Invalid text or a violated byte-length limit. Never contains the supplied text.

Functions§

address_strkey
Format the same address bytes as a Thruput Z StrKey.
decode
Decode a machine value with a required maximum byte length.
decode_fixed
Decode exactly N bytes without a heap-allocated intermediate byte buffer.
encode
Encode using the case-sensitive Bitcoin/Solana alphabet, preserving leading zeros.
max_encoded_len
Conservative text bound for a decoded byte limit; saturates on overflow.
parse_address
Parse a Thruput address from base58 or Z StrKey, without deriving an account.
parse_public_key
Parse an Ed25519 public key from base58 or G StrKey, never a wallet address.
parse_secret_seed
Parse a 32-byte Ed25519 seed from base58 or S StrKey.
public_key_strkey
Format an Ed25519 key as a G StrKey. No wallet derivation is performed.
secret_seed_strkey
Explicitly export an Ed25519 seed as an S StrKey in a zeroing buffer.