JNI APIs to fetch memo fields as UTF8
This commit is contained in:
parent
6ae75baf35
commit
b78a611f7b
|
@ -91,17 +91,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
[[package]]
|
||||
name = "bellman"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666#89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3#669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
dependencies = [
|
||||
"bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"group 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"group 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -274,17 +274,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
[[package]]
|
||||
name = "ff"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666#89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3#669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
dependencies = [
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff_derive 0.3.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"ff_derive 0.3.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ff_derive"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666#89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3#669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
dependencies = [
|
||||
"num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -344,9 +344,9 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "group"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666#89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3#669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
dependencies = [
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -479,11 +479,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
[[package]]
|
||||
name = "pairing"
|
||||
version = "0.14.2"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666#89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3#669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
dependencies = [
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"group 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"group 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -694,14 +694,14 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "sapling-crypto"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666#89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3#669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
dependencies = [
|
||||
"bellman 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"bellman 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"blake2-rfc 0.2.18 (git+https://github.com/gtank/blake2-rfc?rev=7a5b5fc99ae483a0043db7547fb79a6fa44b88a9)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -862,90 +862,90 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"android_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"jni 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log-panics 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rusqlite 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"zcash_client_backend 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"zcash_primitives 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"zip32 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"zcash_client_backend 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"zcash_primitives 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"zip32 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zcash_client_backend"
|
||||
version = "0.0.0"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666#89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3#669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
dependencies = [
|
||||
"bech32 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bellman 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"bellman 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"blake2-rfc 0.2.18 (git+https://github.com/gtank/blake2-rfc?rev=7a5b5fc99ae483a0043db7547fb79a6fa44b88a9)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chacha20-poly1305-aead 0.1.2 (git+https://github.com/gtank/chacha20-poly1305-aead?rev=aefc71f95e8bc43f2070e3c5b08130d9c86bbf4f)",
|
||||
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"protobuf-codegen-pure 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"zcash_primitives 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"zcash_proofs 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"zip32 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"zcash_primitives 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"zcash_proofs 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"zip32 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zcash_primitives"
|
||||
version = "0.0.0"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666#89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3#669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
dependencies = [
|
||||
"blake2-rfc 0.2.18 (git+https://github.com/gtank/blake2-rfc?rev=7a5b5fc99ae483a0043db7547fb79a6fa44b88a9)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zcash_proofs"
|
||||
version = "0.0.0"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666#89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3#669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
dependencies = [
|
||||
"bellman 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"bellman 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"blake2-rfc 0.2.18 (git+https://github.com/gtank/blake2-rfc?rev=7a5b5fc99ae483a0043db7547fb79a6fa44b88a9)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"zcash_primitives 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"zcash_primitives 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zip32"
|
||||
version = "0.0.0"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666#89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
source = "git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3#669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
dependencies = [
|
||||
"aes 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"blake2-rfc 0.2.18 (git+https://github.com/gtank/blake2-rfc?rev=7a5b5fc99ae483a0043db7547fb79a6fa44b88a9)",
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"fpe 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"zcash_primitives 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)",
|
||||
"pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
"zcash_primitives 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)",
|
||||
]
|
||||
|
||||
[metadata]
|
||||
|
@ -960,7 +960,7 @@ dependencies = [
|
|||
"checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5"
|
||||
"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6"
|
||||
"checksum bech32 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad20b907fd16610c3960c7fe9dae13dd243343409bab80299774c9a8b5d7bed8"
|
||||
"checksum bellman 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)" = "<none>"
|
||||
"checksum bellman 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)" = "<none>"
|
||||
"checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f"
|
||||
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
|
||||
"checksum blake2-rfc 0.2.18 (git+https://github.com/gtank/blake2-rfc?rev=7a5b5fc99ae483a0043db7547fb79a6fa44b88a9)" = "<none>"
|
||||
|
@ -985,15 +985,15 @@ dependencies = [
|
|||
"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
|
||||
"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
|
||||
"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
|
||||
"checksum ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)" = "<none>"
|
||||
"checksum ff_derive 0.3.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)" = "<none>"
|
||||
"checksum ff 0.4.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)" = "<none>"
|
||||
"checksum ff_derive 0.3.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)" = "<none>"
|
||||
"checksum fpe 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce3371c82bfbd984f624cab093f55e7336f5a6e589f8518e1258f54f011b89ad"
|
||||
"checksum fuchsia-cprng 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81f7f8eb465745ea9b02e2704612a9946a59fa40572086c6fd49d6ddcf30bf31"
|
||||
"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b"
|
||||
"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"
|
||||
"checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592"
|
||||
"checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d"
|
||||
"checksum group 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)" = "<none>"
|
||||
"checksum group 0.1.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)" = "<none>"
|
||||
"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
|
||||
"checksum jni 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ecfa3b81afc64d9a6539c4eece96ac9a93c551c713a313800dade8e33d7b5c1"
|
||||
"checksum jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
||||
|
@ -1012,7 +1012,7 @@ dependencies = [
|
|||
"checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238"
|
||||
"checksum opaque-debug 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d620c9c26834b34f039489ac0dfdb12c7ac15ccaf818350a64c9b5334a452ad7"
|
||||
"checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409"
|
||||
"checksum pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)" = "<none>"
|
||||
"checksum pairing 0.14.2 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)" = "<none>"
|
||||
"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c"
|
||||
"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915"
|
||||
"checksum protobuf 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d82d117bc7565ce6be0150159251c9b1eeec7b129f5a2aa86e10acb5970de1cb"
|
||||
|
@ -1037,7 +1037,7 @@ dependencies = [
|
|||
"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619"
|
||||
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267"
|
||||
"checksum sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)" = "<none>"
|
||||
"checksum sapling-crypto 0.0.1 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)" = "<none>"
|
||||
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
|
||||
|
@ -1057,7 +1057,7 @@ dependencies = [
|
|||
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9"
|
||||
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
"checksum zcash_client_backend 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)" = "<none>"
|
||||
"checksum zcash_primitives 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)" = "<none>"
|
||||
"checksum zcash_proofs 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)" = "<none>"
|
||||
"checksum zip32 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=89cfef8515d5d88809c485a44fdc54572b9e5666)" = "<none>"
|
||||
"checksum zcash_client_backend 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)" = "<none>"
|
||||
"checksum zcash_primitives 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)" = "<none>"
|
||||
"checksum zcash_proofs 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)" = "<none>"
|
||||
"checksum zip32 0.0.0 (git+https://github.com/str4d/librustzcash.git?rev=669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3)" = "<none>"
|
||||
|
|
12
Cargo.toml
12
Cargo.toml
|
@ -21,27 +21,27 @@ time = "0.1"
|
|||
|
||||
[dependencies.ff]
|
||||
git = "https://github.com/str4d/librustzcash.git"
|
||||
rev = "89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
rev = "669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
|
||||
[dependencies.pairing]
|
||||
git = "https://github.com/str4d/librustzcash.git"
|
||||
rev = "89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
rev = "669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
|
||||
[dependencies.sapling-crypto]
|
||||
git = "https://github.com/str4d/librustzcash.git"
|
||||
rev = "89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
rev = "669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
|
||||
[dependencies.zcash_client_backend]
|
||||
git = "https://github.com/str4d/librustzcash.git"
|
||||
rev = "89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
rev = "669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
|
||||
[dependencies.zcash_primitives]
|
||||
git = "https://github.com/str4d/librustzcash.git"
|
||||
rev = "89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
rev = "669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
|
||||
[dependencies.zip32]
|
||||
git = "https://github.com/str4d/librustzcash.git"
|
||||
rev = "89cfef8515d5d88809c485a44fdc54572b9e5666"
|
||||
rev = "669df0fa7b2fbd8e1d2ee78d7f0c6544ea04bfd3"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3"
|
||||
|
|
|
@ -19,6 +19,10 @@ class JniConverter {
|
|||
|
||||
external fun getBalance(dbData: String, account: Int): Long
|
||||
|
||||
external fun getReceivedMemoAsUtf8(dbData: String, idNote: Long): String
|
||||
|
||||
external fun getSentMemoAsUtf8(dbData: String, idNote: Long): String
|
||||
|
||||
external fun scanBlocks(db_cache: String, db_data: String): Boolean
|
||||
|
||||
external fun sendToAddress(
|
||||
|
|
|
@ -233,6 +233,56 @@ pub unsafe extern "C" fn Java_cash_z_wallet_sdk_jni_JniConverter_getBalance(
|
|||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn Java_cash_z_wallet_sdk_jni_JniConverter_getReceivedMemoAsUtf8(
|
||||
env: JNIEnv,
|
||||
_: JClass,
|
||||
db_data: JString,
|
||||
id_note: jlong,
|
||||
) -> jstring {
|
||||
let db_data: String = env
|
||||
.get_string(db_data)
|
||||
.expect("Couldn't get Java string!")
|
||||
.into();
|
||||
|
||||
let memo = match crate::sql::get_received_memo_as_utf8(db_data, id_note) {
|
||||
Ok(memo) => memo.unwrap_or_default(),
|
||||
Err(e) => {
|
||||
error!("Error while fetching memo: {}", e);
|
||||
// Return an empty string to indicate an error
|
||||
String::default()
|
||||
}
|
||||
};
|
||||
|
||||
let output = env.new_string(memo).expect("Couldn't create Java string!");
|
||||
output.into_inner()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn Java_cash_z_wallet_sdk_jni_JniConverter_getSentMemoAsUtf8(
|
||||
env: JNIEnv,
|
||||
_: JClass,
|
||||
db_data: JString,
|
||||
id_note: jlong,
|
||||
) -> jstring {
|
||||
let db_data: String = env
|
||||
.get_string(db_data)
|
||||
.expect("Couldn't get Java string!")
|
||||
.into();
|
||||
|
||||
let memo = match crate::sql::get_sent_memo_as_utf8(db_data, id_note) {
|
||||
Ok(memo) => memo.unwrap_or_default(),
|
||||
Err(e) => {
|
||||
error!("Error while fetching memo: {}", e);
|
||||
// Return an empty string to indicate an error
|
||||
String::default()
|
||||
}
|
||||
};
|
||||
|
||||
let output = env.new_string(memo).expect("Couldn't create Java string!");
|
||||
output.into_inner()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn Java_cash_z_wallet_sdk_jni_JniConverter_scanBlocks(
|
||||
env: JNIEnv,
|
||||
|
@ -321,8 +371,8 @@ pub unsafe extern "C" fn Java_cash_z_wallet_sdk_jni_JniConverter_sendToAddress(
|
|||
|
||||
let memo = match Memo::from_str(&memo) {
|
||||
Ok(memo) => Some(memo),
|
||||
Err(()) => {
|
||||
error!("Memo is too long");
|
||||
Err(e) => {
|
||||
error!("{}", e);
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -217,6 +217,38 @@ pub fn get_balance<P: AsRef<Path>>(db_data: P, account: u32) -> Result<Amount, E
|
|||
Ok(Amount(balance))
|
||||
}
|
||||
|
||||
pub fn get_received_memo_as_utf8<P: AsRef<Path>>(
|
||||
db_data: P,
|
||||
id_note: i64,
|
||||
) -> Result<Option<String>, Error> {
|
||||
let data = Connection::open(db_data)?;
|
||||
|
||||
let memo: Vec<_> = data.query_row(
|
||||
"SELECT memo FROM received_notes
|
||||
WHERE id_note = ?",
|
||||
&[id_note],
|
||||
|row| row.get(0),
|
||||
)?;
|
||||
|
||||
Memo::from_bytes(&memo).and_then(|memo| memo.to_utf8())
|
||||
}
|
||||
|
||||
pub fn get_sent_memo_as_utf8<P: AsRef<Path>>(
|
||||
db_data: P,
|
||||
id_note: i64,
|
||||
) -> Result<Option<String>, Error> {
|
||||
let data = Connection::open(db_data)?;
|
||||
|
||||
let memo: Vec<_> = data.query_row(
|
||||
"SELECT memo FROM sent_notes
|
||||
WHERE id_note = ?",
|
||||
&[id_note],
|
||||
|row| row.get(0),
|
||||
)?;
|
||||
|
||||
Memo::from_bytes(&memo).and_then(|memo| memo.to_utf8())
|
||||
}
|
||||
|
||||
/// Scans new blocks added to the cache for any transactions received by the
|
||||
/// tracked accounts.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue