Re-exports§
pub use crate::wormhole_lib::compute_output_amount;pub use crate::wormhole_lib::NATIVE_ASSET_ID;pub use crate::wormhole_lib::SCALE_DOWN_FACTOR;pub use crate::wormhole_lib::VOLUME_FEE_BPS;
Structs§
- Proof
Output Assignment - Output assignment for a single proof (supports dual outputs)
- Verification
Result - Result of checking proof verification events
Enums§
Functions§
- 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
Type Aliases§
- Transfer
Proof Data - Full transfer data including amount - used to compute the leaf_inputs_hash via Poseidon2. This is what the ZK circuit verifies.
- Transfer
Proof Key - Key for TransferProof storage - uniquely identifies a transfer. Uses (to, transfer_count) since transfer_count is atomic per recipient. This is hashed with Blake2_256 to form the storage key suffix.