Expand description
§zanolib
A Zano wallet library: address parsing, transaction (de)serialization, offline signing, deposit scanning, and threshold (MPC) spend keys.
§Layout
| module | contents |
|---|---|
crypto | curve helpers, hash-to-point, key derivation, CLSAG-GGX, Bulletproof+, BGE |
base | varints, the binary codec, transactions and their variant payloads |
epee | the portable-storage codec used by the daemon’s .bin endpoints |
proof | transaction-wide balance, range and asset surjection proofs |
rpc | JSON-RPC client and deposit scanner (feature rpc) |
mpc | threshold spend key via FROST (feature mpc) |
Everything else — addresses, wallets, scanning and signing — lives at the crate root.
use zanolib::Wallet;
let mut secret = [0u8; 32];
secret[0] = 1; // any canonical scalar
let wallet = Wallet::load_spend_secret(&secret, 0)?;
println!("{}", wallet.address());Modules§
- base
- Zano’s on-the-wire data model: varints, the binary codec, transactions and the tagged-union payloads they carry.
- crypto
- Zano’s cryptographic primitives: the curve helpers, hash-to-point/scalar functions, key derivation, ChaCha8, and the CLSAG-GGX / Bulletproof+ / BGE proof systems.
- epee
- A minimal encoder/decoder for epee’s “portable storage” binary format — the
serialization used by Zano’s daemon
.binRPC endpoints. - mpc
- A Zano spend key under multi-party threshold control, using tsslib’s FROST-ed25519 protocol.
- proof
- Transaction-wide proofs: balance, output range, and asset surjection.
- rng
- Randomness sources.
- rpc
- A minimal client for a Zano daemon, plus the deposit scanner built on it.
Macros§
- err
- Builds an
Error::Msgwithformat!syntax.
Structs§
- Address
- A parsed Zano address.
- Clsag
Request - Everything a signature needs from an input, minus the spend key.
- Finalize
TxParam - Parameters for finalizing and signing a transaction.
- Finalized
Tx - A constructed (and usually signed) transaction with the parameters it was built from.
- Local
Input Signer - Signs with a spend secret held in this process — the default, non-MPC path.
- Received
Output - An output detected as belonging to the wallet.
- Ring
Member - One output in an input’s decoy ring, identified by its chain-wide global index. The point fields are the on-chain (1/8-premultiplied) values, exactly as the daemon returns them.
- Scan
Result - The outputs of one transaction that belong to the wallet.
- Transfer
Dest - An output to create: send
amountofasset_idtoaddress. - Transfer
Input - One output to spend: what
Wallet::scan_txrecovered, plus a ring of decoys that must include the real output. - TxDest
- An output to create: an amount of an asset, to one (or more) addresses.
- TxDest
Htlc Out - HTLC (hash time-locked contract) options for a destination.
- TxSource
- An input to spend: its ring, which member is real, and the blinding masks recovered when the output was received.
- TxSource
Output Entry - One ring member of a source: the referenced output and its public data.
- View
Wallet Data - A JSON-marshalable view-only wallet plus the height to resume scanning from.
- Wallet
- A Zano wallet: the spend and view key pairs, plus the address flags.
Enums§
- Address
Type - The kind of a Zano address, encoded as a varint prefix.
- Error
- Anything that can go wrong while parsing, scanning or signing.
Traits§
- Input
Signer - Produces the two spend-key-dependent values for one confidential input: the key image and the CLSAG-GGX ring signature.
Functions§
- native_
coin_ asset_ id - The native coin’s asset id.
Type Aliases§
- Result
- The result type used throughout this crate.