liminal_ark_relations/shielder/
types.rs

1use ark_std::vec::Vec;
2
3use crate::environment::CircuitField;
4
5#[cfg(feature = "circuit")]
6/// The circuit lifting for the byte type.
7pub type ByteVar = ark_r1cs_std::uint8::UInt8<CircuitField>;
8
9// Types accepted by the relation constructors.
10pub type FrontendNullifier = [u64; 4];
11pub type FrontendTrapdoor = [u64; 4];
12pub type FrontendNote = [u64; 4];
13pub type FrontendTokenId = u16;
14pub type FrontendTokenAmount = u128;
15pub type FrontendMerkleRoot = [u64; 4];
16pub type FrontendMerklePath = Vec<[u64; 4]>;
17pub type FrontendLeafIndex = u64;
18pub type FrontendAccount = [u8; 32];
19pub type FrontendMerklePathNode = [u64; 4];
20
21// Types used internally by the relations (but still outside circuit environment).
22pub type BackendNullifier = CircuitField;
23pub type BackendTrapdoor = CircuitField;
24pub type BackendNote = CircuitField;
25pub type BackendTokenId = CircuitField;
26pub type BackendTokenAmount = CircuitField;
27pub type BackendMerkleRoot = CircuitField;
28pub type BackendMerklePath = Vec<CircuitField>;
29pub type BackendLeafIndex = u64;
30pub type BackendAccount = CircuitField;