For the complete documentation index, see llms.txt
Detailed API reference
Structs
Maybe
Encapsulates an optionally present value. If isSome is false, value
should be default<T> by convention.
struct Maybe<T> {
isSome: Boolean;
value: T;
}
Either
Disjoint union of A and B. Iff isLeft if true, left should be
populated, otherwise right. The other should be default< > by convention.
struct Either<A, B> {
isLeft: Boolean;
left: A;
right: B;
}
NativePoint
A point on the proof systems embedded curve, in affine coordinates.
Only outputs of elliptic curve operations are actually guaranteed to lie on the curve.
struct NativePoint {
x: Field;
y: Field;
}
MerkleTreeDigest
The root hash of a Merkle tree, represented by a single Field.
struct MerkleTreeDigest { field: Field; }
MerkleTreePathEntry
An entry in a Merkle tree path, indicating if the path leads left or right, and
the root of the sibling node. Primarily used in MerkleTreePath
struct MerkleTreePathEntry {
sibling: MerkleTreeDigest;
goesLeft: Boolean;
}
MerkleTreePath
A path in a depth n Merkle tree, leading to a leaf of type T.
Primarily used for merkleTreePathRoot.
This can be constructed from witnesses that use the compiler output's
findPathForLeaf and pathForLeaf functions.
struct MerkleTreePath<#n, T> {
leaf: T;
path: Vector<n, MerkleTreePathEntry>;
}
ContractAddress
The address of a contract, used as a recipient in sendShielded,
sendImmediateShielded,
createZswapOutput, and mintShieldedToken.
struct ContractAddress { bytes: Bytes<32>; }
ShieldedCoinInfo
The description of a newly created shielded coin, used in outputting shielded coins, or spending/receiving shielded coins that originate in the current transaction.
nonce can be deterministically derived with evolveNonce.
Used in:
struct ShieldedCoinInfo {
nonce: Bytes<32>;
color: Bytes<32>;
value: Uint<128>;
}
QualifiedShieldedCoinInfo
The description of an existing shielded coin in the ledger, ready to be spent.
Used in:
struct QualifiedShieldedCoinInfo {
nonce: Bytes<32>;
color: Bytes<32>;
value: Uint<128>;
mtIndex: Uint<64>;
}