diff --git a/zcashtools/Cargo.lock b/zcashtools/Cargo.lock index 553a48a6..91663eb7 100644 --- a/zcashtools/Cargo.lock +++ b/zcashtools/Cargo.lock @@ -451,7 +451,7 @@ dependencies = [ [[package]] name = "equihash" version = "0.1.0" -source = "git+https://github.com/Zondax/librustzcash?rev=112eedd27b2e51b9e1b77603a776cd78e738c3ae#112eedd27b2e51b9e1b77603a776cd78e738c3ae" +source = "git+https://github.com/Zondax/librustzcash?rev=ce278848fef35903db46c3dced41658e90bbeb3c#ce278848fef35903db46c3dced41658e90bbeb3c" dependencies = [ "blake2b_simd", "byteorder", @@ -665,8 +665,28 @@ dependencies = [ [[package]] name = "ledger-zcash" +version = "2.0.0" +source = "git+https://github.com/Zondax/ledger-zcash-rs?tag=v2.0.0#e5f3e6d633ea316759b153c7edacaaabf580f32c" +dependencies = [ + "byteorder", + "cfg-if", + "educe", + "hex", + "lazy_static", + "ledger-transport", + "ledger-zondax-generic", + "log", + "serde", + "sha2 0.10.8", + "thiserror", + "tokio", + "zx-bip44", +] + +[[package]] +name = "ledger-zcash-app-builder" version = "0.11.2" -source = "git+https://github.com/Zondax/ledger-zcash-rs?rev=3bad2fa4a7870270627edc25ebdb5b4818fd1855#3bad2fa4a7870270627edc25ebdb5b4818fd1855" +source = "git+https://github.com/Zondax/ledger-zcash-tools?tag=v2.0.0#5e8588cc0fef85a74c22d1012ed951b7b44a5097" dependencies = [ "arrayvec", "byteorder", @@ -678,7 +698,8 @@ dependencies = [ "jubjub", "lazy_static", "ledger-transport", - "ledger-zcash-builder", + "ledger-zcash", + "ledger-zcash-chain-builder", "ledger-zondax-generic", "log", "rand_core", @@ -693,9 +714,9 @@ dependencies = [ ] [[package]] -name = "ledger-zcash-builder" +name = "ledger-zcash-chain-builder" version = "0.11.2" -source = "git+https://github.com/Zondax/ledger-zcash-rs?rev=3bad2fa4a7870270627edc25ebdb5b4818fd1855#3bad2fa4a7870270627edc25ebdb5b4818fd1855" +source = "git+https://github.com/Zondax/ledger-zcash-tools?tag=v2.0.0#5e8588cc0fef85a74c22d1012ed951b7b44a5097" dependencies = [ "bellman", "blake2b_simd", @@ -720,7 +741,7 @@ dependencies = [ "sha2 0.10.8", "thiserror", "tokio", - "zcash_note_encryption 0.1.0 (git+https://github.com/Zondax/librustzcash?rev=112eedd27b2e51b9e1b77603a776cd78e738c3ae)", + "zcash_note_encryption 0.1.0 (git+https://github.com/Zondax/librustzcash?rev=ce278848fef35903db46c3dced41658e90bbeb3c)", "zcash_primitives", "zcash_proofs", ] @@ -1592,7 +1613,7 @@ dependencies = [ [[package]] name = "zcash_encoding" version = "0.1.0" -source = "git+https://github.com/Zondax/librustzcash?rev=112eedd27b2e51b9e1b77603a776cd78e738c3ae#112eedd27b2e51b9e1b77603a776cd78e738c3ae" +source = "git+https://github.com/Zondax/librustzcash?rev=ce278848fef35903db46c3dced41658e90bbeb3c#ce278848fef35903db46c3dced41658e90bbeb3c" dependencies = [ "byteorder", "nonempty", @@ -1613,7 +1634,7 @@ dependencies = [ [[package]] name = "zcash_note_encryption" version = "0.1.0" -source = "git+https://github.com/Zondax/librustzcash?rev=112eedd27b2e51b9e1b77603a776cd78e738c3ae#112eedd27b2e51b9e1b77603a776cd78e738c3ae" +source = "git+https://github.com/Zondax/librustzcash?rev=ce278848fef35903db46c3dced41658e90bbeb3c#ce278848fef35903db46c3dced41658e90bbeb3c" dependencies = [ "chacha20", "chacha20poly1305", @@ -1624,7 +1645,7 @@ dependencies = [ [[package]] name = "zcash_primitives" version = "0.6.0" -source = "git+https://github.com/Zondax/librustzcash?rev=112eedd27b2e51b9e1b77603a776cd78e738c3ae#112eedd27b2e51b9e1b77603a776cd78e738c3ae" +source = "git+https://github.com/Zondax/librustzcash?rev=ce278848fef35903db46c3dced41658e90bbeb3c#ce278848fef35903db46c3dced41658e90bbeb3c" dependencies = [ "aes", "bip0039", @@ -1654,13 +1675,13 @@ dependencies = [ "sha2 0.9.9", "subtle", "zcash_encoding", - "zcash_note_encryption 0.1.0 (git+https://github.com/Zondax/librustzcash?rev=112eedd27b2e51b9e1b77603a776cd78e738c3ae)", + "zcash_note_encryption 0.1.0 (git+https://github.com/Zondax/librustzcash?rev=ce278848fef35903db46c3dced41658e90bbeb3c)", ] [[package]] name = "zcash_proofs" version = "0.6.0" -source = "git+https://github.com/Zondax/librustzcash?rev=112eedd27b2e51b9e1b77603a776cd78e738c3ae#112eedd27b2e51b9e1b77603a776cd78e738c3ae" +source = "git+https://github.com/Zondax/librustzcash?rev=ce278848fef35903db46c3dced41658e90bbeb3c#ce278848fef35903db46c3dced41658e90bbeb3c" dependencies = [ "bellman", "blake2b_simd", @@ -1680,8 +1701,8 @@ name = "zcashtool" version = "0.1.0" dependencies = [ "env_logger", - "ledger-zcash", - "ledger-zcash-builder", + "ledger-zcash-app-builder", + "ledger-zcash-chain-builder", "log", "neon", "neon-serde", diff --git a/zcashtools/Cargo.toml b/zcashtools/Cargo.toml index 28f590b4..9607a839 100644 --- a/zcashtools/Cargo.toml +++ b/zcashtools/Cargo.toml @@ -8,8 +8,8 @@ opt-level = "s" overflow-checks = true [patch.crates-io] -ledger-zcash-builder = { git = "https://github.com/Zondax/ledger-zcash-rs", rev = "3bad2fa4a7870270627edc25ebdb5b4818fd1855" } -ledger-zcash = { git = "https://github.com/Zondax/ledger-zcash-rs", rev = "3bad2fa4a7870270627edc25ebdb5b4818fd1855" } +ledger-zcash-chain-builder = { git = "https://github.com/Zondax/ledger-zcash-tools", tag = "v2.0.0" } +ledger-zcash-app-builder = { git = "https://github.com/Zondax/ledger-zcash-tools", tag = "v2.0.0" } -# ledger-zcash-builder = { path = "../../ledger-zcash-rs/ledger-zcash-builder" } -# ledger-zcash = { path = "../../ledger-zcash-rs/ledger-zcash" } +# ledger-zcash-chain-builder = { path = "../../ledger-zcash-tools/ledger-zcash-chain-builder" } +# ledger-zcash-app-builder = { path = "../../ledger-zcash-tools/ledger-zcash-app-builder" } diff --git a/zcashtools/neon/native/Cargo.toml b/zcashtools/neon/native/Cargo.toml index b3a526fc..ce3622b7 100644 --- a/zcashtools/neon/native/Cargo.toml +++ b/zcashtools/neon/native/Cargo.toml @@ -19,14 +19,14 @@ serde_derive = "1" serde = "1" log = "0.4" snafu = { version = "0.8.2" } -zcash_primitives = { git = "https://github.com/Zondax/librustzcash", rev = "112eedd27b2e51b9e1b77603a776cd78e738c3ae", features = ["transparent-inputs"], package = "zcash_primitives" } +zcash_primitives = { git = "https://github.com/Zondax/librustzcash", rev = "ce278848fef35903db46c3dced41658e90bbeb3c", features = ["transparent-inputs"], package = "zcash_primitives" } neon-serde = { git = "https://github.com/Zondax/neon-serde", branch = "master", default-features = false, features = [ "napi-6", ] } -ledger-zcash-builder = { git = "https://github.com/Zondax/ledger-zcash-rs", rev = "3bad2fa4a7870270627edc25ebdb5b4818fd1855", package = "ledger-zcash-builder" } -ledger-zcash = { git = "https://github.com/Zondax/ledger-zcash-rs", rev = "3bad2fa4a7870270627edc25ebdb5b4818fd1855", package = "ledger-zcash" } +ledger-zcash-chain-builder = { git = "https://github.com/Zondax/ledger-zcash-tools", tag = "v2.0.0", package = "ledger-zcash-chain-builder" } +ledger-zcash-app-builder = { git = "https://github.com/Zondax/ledger-zcash-tools", tag = "v2.0.0", package = "ledger-zcash-app-builder" } [dev-dependencies] serde = { version = "1", features = ["derive"] } diff --git a/zcashtools/neon/native/src/lib.rs b/zcashtools/neon/native/src/lib.rs index 83ceaab8..4b064bbc 100644 --- a/zcashtools/neon/native/src/lib.rs +++ b/zcashtools/neon/native/src/lib.rs @@ -1,9 +1,9 @@ -use ledger_zcash_builder::data::{ +use ledger_zcash_chain_builder::data::{ HsmTxData, InitData, OutputBuilderInfo, SpendBuilderInfo, TransactionSignatures, TransparentInputBuilderInfo, TransparentOutputBuilderInfo, }; -use ledger_zcash_builder::errors::Error; -use ledger_zcash_builder::{hsmauth, txbuilder, txprover}; +use ledger_zcash_chain_builder::errors::Error; +use ledger_zcash_chain_builder::{hsmauth, txbuilder, txprover}; use neon::prelude::*; use std::cell::RefCell; use std::path::Path; @@ -45,7 +45,7 @@ fn calculate_zip0317_fee(mut cx: FunctionContext) -> JsResult { ]; let fee: u64 = - ledger_zcash::builder::Builder::calculate_zip0317_fee(n_tin, n_tout, n_spend, n_sout) + ledger_zcash_app_builder::builder::Builder::calculate_zip0317_fee(n_tin, n_tout, n_spend, n_sout) .into(); Ok(cx.number(fee as f64)) diff --git a/zcashtools/neon/native/tests/builder_test.rs b/zcashtools/neon/native/tests/builder_test.rs index 61e6f01b..09d3a82a 100644 --- a/zcashtools/neon/native/tests/builder_test.rs +++ b/zcashtools/neon/native/tests/builder_test.rs @@ -1,6 +1,6 @@ use env_logger::Env; -use ledger_zcash::builder::Builder as ZcashBuilder; -use ledger_zcash_builder::{ +use ledger_zcash_app_builder::builder::Builder as ZcashBuilder; +use ledger_zcash_chain_builder::{ data::{OutputBuilderInfo, SpendBuilderInfo}, txbuilder::Builder, }; diff --git a/zcashtools/neon/native/tests/builder_test2.rs b/zcashtools/neon/native/tests/builder_test2.rs index 8c17cffc..c7f13b85 100644 --- a/zcashtools/neon/native/tests/builder_test2.rs +++ b/zcashtools/neon/native/tests/builder_test2.rs @@ -1,6 +1,6 @@ use env_logger::Env; -use ledger_zcash::builder::Builder as ZcashBuilder; -use ledger_zcash_builder::{ +use ledger_zcash_app_builder::builder::Builder as ZcashBuilder; +use ledger_zcash_chain_builder::{ data::{TransparentInputBuilderInfo, TransparentOutputBuilderInfo}, txbuilder::Builder, };