Expand description
Typed wrappers + named shapes returned by the Rust source emitted
by moonproof-codegen. Mirrors compactc’s compact-types.ts
type SET; the projection from atom buffers happens through
crate::walker (single source of truth across every binding
language).
These live in moonproof-runtime so generated code, library code,
and downstream consumers all reach for the same type — there’s no
per-language duplicate.
Structs§
- Compact
List - Typed wrapper over a
List<T>snapshot. - Compact
Map - Typed wrapper over a
Map<K, V>ledger snapshot. - Compact
Set - Typed wrapper over a
Set<T>snapshot. - Contract
Address - Contract-address wrapper (the descriptor-projection shape; distinct
from
moonproof_ledger::coin_structure::contract::ContractAddress). - Curve25519
Point - Point on Curve25519 in twisted-Edwards form.
xandyare little-endian 32-byte values in the Curve25519 base field. Unlike the secp curves there is no identity flag: the identity is the ordinary point(0, 1). - Jubjub
Point - Point in the embedded elliptic curve. Field elements are little- endian 32-byte BLS-scalar repr.
- Merkle
Tree Digest - Hash value of a Merkle tree.
- Merkle
Tree Path - Path demonstrating inclusion in a Merkle tree.
- Merkle
Tree Path Entry - Entry in a Merkle path.
- Owner
Either - Canonical
OpenZeppelinEither<ZswapCoinPublicKey, ContractAddress>shape. - Qualified
Shielded Coin Info - Qualified shielded coin descriptor (coin + Merkle tree index).
- Recipient
- Recipient of a coin produced by a circuit.
- Secp256k1
Point - Point on secp256k1.
xandyare little-endian 32-byte values in the secp256k1 base field;identityflags the point at infinity, which has no coordinate representation. - Secp256r1
Point - Point on secp256r1 (P-256), laid out as
Secp256k1Point:xandylittle-endian in the secp256r1 base field,identityflagging the point at infinity. - Shielded
Coin Info - Shielded coin descriptor.
- Shielded
Coin Recipient - Shielded-coin recipient.
- User
Address - Unshielded user-address wrapper.
- Zswap
Coin Public Key - Coin public-key wrapper.
Functions§
- decode_
array - Decode a
RuntimeValue::Arrayof exact lengthNinto[T; N]. - decode_
contract_ address - Decode a contract address from either
{ "bytes": Bytes(32) }or rawBytes(32). - encode_
array - Encode a fixed-size array into a
RuntimeValue::Array. - encode_
contract_ address - Encode a 32-byte contract address as
{ "bytes": Bytes(...) }. - expect_
object - Extract the field map of a
RuntimeValue::Objector report a typed error. - expect_
string - Extract a string from a
RuntimeValue::Stringor report a typed error. - take_
field - Remove and project a typed field from an object map.
- take_
raw_ field - Remove a raw field from an object map or report a missing-field error.
- unknown_
variant - Construct an unknown-variant error for an enum projection.