Structs§
- Aggregation
Config - Aggregation config loaded from generated-bins/config.json. Must match the CircuitBinsConfig struct in qp-wormhole-aggregator/src/config.rs
- Binary
Hashes - SHA256 hashes of circuit binary files for integrity verification. Must match the BinaryHashes struct in qp-wormhole-aggregator/src/config.rs
- Proof
Output Assignment - Output assignment for a single proof (supports dual outputs)
- Verification
Result - Result of checking proof verification events
Enums§
Constants§
- NATIVE_
ASSET_ ID - Native asset id
- SCALE_
DOWN_ FACTOR - Scale down factor for quantizing amounts (10^10 to go from 12 to 2 decimal places)
- VOLUME_
FEE_ BPS - Volume fee rate in basis points (10 bps = 0.1%) This must match the on-chain VolumeFeeRateBps configuration
Functions§
- compute_
output_ amount - Compute output amount after fee deduction output = input * (10000 - fee_bps) / 10000
- compute_
random_ output_ assignments - Compute random output assignments for a set of proofs.
- format_
balance - Format a balance amount from raw units (12 decimals) to human-readable format
- handle_
wormhole_ command - parse_
exit_ account - Parse an exit account from either hex or SS58 format
- parse_
secret_ hex - Parse a hex-encoded secret string into a 32-byte array
- quantize_
funding_ amount - Quantize a funding amount from 12 decimal places to 2 decimal places Returns an error if the quantized value doesn’t fit in u32
- random_
partition - Randomly partition a total amount into n parts.
Each part will be at least
min_per_partand the sum equalstotal. Returns amounts aligned to SCALE_DOWN_FACTOR for clean quantization. - read_
proof_ file - Read and decode a hex-encoded proof file
- write_
proof_ file - Write a proof to a hex-encoded file