Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 36 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ subxt-metadata = "0.44"
# ZK proof generation (aligned with chain)
anyhow = "1.0"

qp-wormhole-circuit = { version = "1.3.0", default-features = false, features = ["std"] }
qp-wormhole-prover = { version = "1.3.0", default-features = false, features = ["std"] }
qp-wormhole-verifier = { version = "1.3.0", default-features = false, features = ["std"] }
qp-wormhole-aggregator = { version = "1.3.0", default-features = false, features = ["rayon", "std"] }
qp-wormhole-inputs = { version = "1.3.0", default-features = false, features = ["std"] }
qp-zk-circuits-common = { version = "1.3.0", default-features = false, features = ["std"] }
qp-plonky2 = { version = "1.1.6", default-features = false, features = ["rand", "std"] }
qp-wormhole-circuit-builder = { version = "1.3.0" }
qp-plonky2 = { version = "1.4.0", default-features = false, features = ["rand", "std"] }
qp-wormhole-circuit = { version = "1.4.0", default-features = false, features = ["std"] }
qp-wormhole-prover = { version = "1.4.0", default-features = false, features = ["std"] }
qp-wormhole-verifier = { version = "1.4.0", default-features = false, features = ["std"] }
qp-wormhole-aggregator = { version = "1.4.0", default-features = false, features = ["rayon", "std"] }
qp-wormhole-inputs = { version = "1.4.0", default-features = false, features = ["std"] }
qp-zk-circuits-common = { version = "1.4.0", default-features = false, features = ["std"] }
qp-wormhole-circuit-builder = { version = "1.4.0" }


[build-dependencies]
qp-wormhole-circuit-builder = { version = "1.3.0" }
qp-wormhole-circuit-builder = { version = "1.4.0" }

[dev-dependencies]
tempfile = "3.8.1"
Expand Down
3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ fn main() {
.parse()
.expect("QP_NUM_LEAF_PROOFS must be a valid usize");

println!("cargo:rerun-if-changed=build.rs");
// Don't emit any rerun-if-changed directives - this forces the build script
// to run on every build. Circuit generation is fast enough in release mode.

println!(
"cargo:warning=[quantus-cli] Generating ZK circuit binaries (num_leaf_proofs={})...",
Expand Down
12 changes: 12 additions & 0 deletions src/cli/address_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,15 @@ impl QuantusSS58 for subxt::ext::subxt_core::utils::AccountId32 {
sp_account_id.to_ss58check_with_version(quantus_ss58_format())
}
}

/// Convert raw 32-byte account to Quantus SS58 format
pub fn bytes_to_quantus_ss58(bytes: &[u8; 32]) -> String {
let sp_account_id = sp_core::crypto::AccountId32::from(*bytes);
sp_account_id.to_ss58check_with_version(quantus_ss58_format())
}

/// Convert a byte slice to Quantus SS58 format (panics if not 32 bytes)
pub fn slice_to_quantus_ss58(bytes: &[u8]) -> String {
let arr: [u8; 32] = bytes.try_into().expect("account must be 32 bytes");
bytes_to_quantus_ss58(&arr)
}
Loading
Loading