Skip to content

Commit d43b406

Browse files
committed
updater version to 1.3.0
1 parent 42854eb commit d43b406

File tree

12 files changed

+80
-62
lines changed

12 files changed

+80
-62
lines changed

bounty/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ curve25519-dalek = { version = "1", features = [ "serde" ] }
1212
protobuf = "2.20.0"
1313
sha3 = "0.8"
1414
rand = "0.3.17"
15-
wedpr_l_crypto_zkp_discrete_logarithm_proof = "0.0.1"
16-
wedpr_l_crypto_zkp_range_proof = "0.0.1"
17-
wedpr_l_macros = "0.0.1"
18-
wedpr_s_protos = { path = "../protos", version = "1.3.0"}
19-
wedpr_l_protos = "0.0.1"
20-
wedpr_l_utils = "0.0.1"
21-
wedpr_l_crypto_zkp_utils = "0.0.1"
22-
wedpr_s_verifiable_confidential_ledger = { path = "../solution/verifiable_confidential_ledger" }
23-
wedpr_s_selective_certificate_disclosure = { path = "../solution/selective_certificate_disclosure" }
15+
wedpr_l_crypto_zkp_discrete_logarithm_proof = "1.0.0"
16+
wedpr_l_crypto_zkp_range_proof = "1.0.0"
17+
wedpr_l_macros = "1.0.0"
18+
wedpr_s_protos = "1.3.0"
19+
wedpr_l_protos = "1.0.0"
20+
wedpr_l_utils = "1.0.0"
21+
wedpr_l_crypto_zkp_utils = "1.0.0"
22+
wedpr_s_verifiable_confidential_ledger = "1.3.0"
23+
wedpr_s_selective_certificate_disclosure = "1.3.0"
2424

2525
[dev-dependencies]
26-
wedpr_l_common_coder_base64 = "0.0.1"
26+
wedpr_l_common_coder_base64 = "1.0.0"

ffi/ffi_c/ffi_c_ktb/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ crate-type = [ "cdylib", "staticlib" ]
1313
[dependencies]
1414
libc = "0.2.60"
1515
protobuf = "2.20.0"
16-
wedpr_s_hierarchical_deterministic_key = { path = "../../../solution/key_tool_box/hierarchical_deterministic_key" }
17-
wedpr_ffi_common = "0.0.1"
18-
wedpr_ffi_macros = "0.0.1"
19-
wedpr_s_protos = { path = "../../../protos/" }
20-
wedpr_l_macros = "0.0.1"
16+
wedpr_s_hierarchical_deterministic_key = "1.3.0"
17+
wedpr_ffi_common = "1.0.0"
18+
wedpr_ffi_macros = "1.0.0"
19+
wedpr_s_protos = "1.3.0"
20+
wedpr_l_macros = "1.0.0"
2121

2222

2323
# This is required to generate C/C++ header files.

ffi/ffi_c/ffi_c_scd/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ crate-type = [ "cdylib", "staticlib" ]
1313
[dependencies]
1414
libc = "0.2.60"
1515
protobuf = "2.20.0"
16-
wedpr_s_selective_certificate_disclosure = { path = "../../../solution/selective_certificate_disclosure" }
17-
wedpr_ffi_common = "0.0.1"
18-
wedpr_ffi_macros = "0.0.1"
19-
wedpr_s_protos = { path = "../../../protos/" }
20-
wedpr_l_macros = "0.0.1"
16+
wedpr_s_selective_certificate_disclosure = "1.3.0"
17+
wedpr_ffi_common = "1.0.0"
18+
wedpr_ffi_macros = "1.0.0"
19+
wedpr_s_protos = "1.3.0"
20+
wedpr_l_macros = "1.0.0"
2121

2222
# This is required to generate C/C++ header files.
2323
[build-dependencies]

ffi/ffi_c/ffi_c_vcl/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ crate-type = [ "cdylib", "staticlib" ]
1313
[dependencies]
1414
libc = "0.2.60"
1515
protobuf = "2.20.0"
16-
wedpr_s_verifiable_confidential_ledger = { path = "../../../solution/verifiable_confidential_ledger" }
17-
wedpr_ffi_common = "0.0.1"
18-
wedpr_ffi_macros = "0.0.1"
19-
wedpr_s_protos = { path = "../../../protos/" }
20-
wedpr_l_protos = "0.0.1"
21-
wedpr_l_macros = "0.0.1"
16+
wedpr_s_verifiable_confidential_ledger = "1.3.0"
17+
wedpr_ffi_common = "1.0.0"
18+
wedpr_ffi_macros = "1.0.0"
19+
wedpr_s_protos = "1.3.0"
20+
wedpr_l_protos = "1.0.0"
21+
wedpr_l_macros = "1.0.0"
2222

2323
# This is required to generate C/C++ header files.
2424
[build-dependencies]

ffi/ffi_java/ffi_java_ktb/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ crate-type = [ "cdylib", "staticlib" ]
1313
[dependencies]
1414
jni = "0.13.0"
1515
protobuf = "2.20.0"
16-
wedpr_s_hierarchical_deterministic_key = { path = "../../../solution/key_tool_box/hierarchical_deterministic_key" }
17-
wedpr_ffi_common = "0.0.1"
18-
wedpr_ffi_macros = "0.0.1"
19-
wedpr_s_protos = { path = "../../../protos/" }
16+
wedpr_s_hierarchical_deterministic_key = "1.3.0"
17+
wedpr_ffi_common = "1.0.0"
18+
wedpr_ffi_macros = "1.0.0"
19+
wedpr_s_protos = "1.3.0"
2020

2121
[build-dependencies]
2222
cbindgen = "0.9.0"

ffi/ffi_java/ffi_java_ktb/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,12 @@ public class HdkResult extends WedprResult {
1313
public String extendedPrivateKey;
1414
public String extendedPublicKey;
1515
}
16+
```
17+
18+
```java
19+
public class NativeInterface {
20+
public static native HdkResult createMnemonicEn(String word_count);
21+
public static native HdkResult createMasterKeyEn(String password, String mnemonic);
22+
public static native HdkResult deriveExtendedKey(String master_key, int purpose_type, int asset_type, int account, int change, int address_index);
23+
}
1624
```

ffi/ffi_java/ffi_java_scd/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ crate-type = [ "cdylib" ]
1212
[dependencies]
1313
jni = "0.13.0"
1414
protobuf = "2.20.0"
15-
wedpr_s_selective_certificate_disclosure = { path = "../../../solution/selective_certificate_disclosure" }
16-
wedpr_ffi_common = "0.0.1"
17-
wedpr_ffi_macros = "0.0.1"
18-
wedpr_s_protos = { path = "../../../protos/" }
19-
wedpr_l_protos = "0.0.1"
15+
wedpr_s_selective_certificate_disclosure = "1.3.0"
16+
wedpr_ffi_common = "1.0.0"
17+
wedpr_ffi_macros = "1.0.0"
18+
wedpr_s_protos = "1.3.0"
19+
wedpr_l_protos = "1.0.0"
2020

2121
[build-dependencies]
2222
cbindgen = "0.9.0"

ffi/ffi_java/ffi_java_vcl/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ crate-type = [ "cdylib", "staticlib" ]
1313
[dependencies]
1414
jni = "0.13.0"
1515
protobuf = "2.20.0"
16-
wedpr_s_verifiable_confidential_ledger = { path = "../../../solution/verifiable_confidential_ledger" }
17-
wedpr_ffi_common = "0.0.1"
18-
wedpr_ffi_macros = "0.0.1"
19-
wedpr_s_protos = { path = "../../../protos/" }
20-
wedpr_l_protos = "0.0.1"
16+
wedpr_s_verifiable_confidential_ledger = "1.3.0"
17+
wedpr_ffi_common = "1.0.0"
18+
wedpr_ffi_macros = "1.0.0"
19+
wedpr_s_protos = "1.3.0"
20+
wedpr_l_protos = "1.0.0"
2121

2222
[build-dependencies]
2323
cbindgen = "0.9.0"

solution/key_tool_box/hierarchical_deterministic_key/Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ hex = "0.3"
1313
rand = "0.7"
1414
wagyu_lib = { package = "wagyu-bitcoin", version = "0.6.3" }
1515
wagyu-model = "0.6.3"
16-
wedpr_l_macros = "0.0.1"
17-
wedpr_s_protos = { path = "../../../protos", version = "1.3.0"}
18-
wedpr_l_utils = "0.0.1"
16+
wedpr_l_macros = "1.0.0"
17+
wedpr_s_protos = "1.3.0"
18+
wedpr_l_utils = "1.0.0"
1919

2020
[dev-dependencies]
21-
wedpr_l_crypto_ecies_secp256k1 = "0.0.1"
22-
wedpr_l_crypto_signature_secp256k1 = "0.0.1"
23-
wedpr_l_crypto_hash_keccak256 = "0.0.1"
21+
wedpr_l_crypto_ecies_secp256k1 = "1.0.0"
22+
wedpr_l_crypto_signature_secp256k1 = "1.0.0"
23+
wedpr_l_crypto_hash_keccak256 = "1.0.0"
24+
wedpr_l_common_coder_base64 = "1.0.0"

solution/key_tool_box/hierarchical_deterministic_key/src/hdk.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,22 +182,31 @@ mod tests {
182182
use wedpr_l_crypto_ecies_secp256k1::WedprSecp256k1Ecies;
183183
use wedpr_l_crypto_hash_keccak256::WedprKeccak256;
184184
use wedpr_l_crypto_signature_secp256k1::WedprSecp256k1Recover;
185-
use wedpr_l_utils::traits::{Ecies, Hash, Signature};
185+
use wedpr_l_utils::traits::{Ecies, Hash, Signature, Coder};
186+
use wedpr_l_common_coder_base64::WedprBase64;
186187

187188
#[test]
188189
fn test_hdk_usage() {
189190
// Create a master key.
190-
let mnemonic = create_mnemonic_en(24).unwrap();
191-
let password = "DO NOT USE REAL PASSWORD HERE";
191+
// let mnemonic = create_mnemonic_en(24).unwrap();
192+
let mnemonic = "engage wagon riot toe odor metal palm donor trumpet slight exercise taste burst sense smile curtain cheese sketch unable token suggest lab rain dolphin";
193+
// let password = "DO NOT USE REAL PASSWORD HERE";
194+
let password = "wi_wallet";
195+
192196
let master_key = create_master_key_en(password, &mnemonic).unwrap();
197+
let coder = WedprBase64::default();
198+
println!("master_key = {:?}", coder.encode(&master_key));
193199

194200
// Derive an extended key.
195-
let key_derivation_path = create_key_derivation_path(44, 1, 1, 1, 0);
201+
let key_derivation_path = create_key_derivation_path(44, 513866, 1, 0, 1000);
196202
let extended_key =
197203
derive_extended_key(&master_key, &key_derivation_path).unwrap();
198204
let private_key = extended_key.get_extended_private_key();
199205
let public_key = extended_key.get_extended_public_key();
200206

207+
println!("private_key = {:?}", hex::encode(private_key));
208+
println!("public_key = {:?}", hex::encode(public_key));
209+
201210
// Test the derived key pair for signature functions.
202211
let message = "WeDPR TEST";
203212
let hash = WedprKeccak256::default();

0 commit comments

Comments
 (0)