diff --git a/CHANGELOG.md b/CHANGELOG.md
index 681f4cf..2cbfa31 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,20 @@ and this library adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+## 0.8.0 - 2024-04-17
+
+### Added
+- `zcashlc_is_valid_sapling_address`
+
+### Changed
+- Updates to `zcash_client_sqlite` version `0.10.3` to add migrations that ensure the
+ wallet's default Unified address contains an Orchard receiver.
+- `zcashlc_get_memo` now takes an additional `output_pool` parameter. This fixes a problem
+ with the retrieval of Orchard memos.
+
+### Removed
+- `zcashlc_is_valid_shielded_address` - use `zcashlc_is_valid_sapling_address` instead.
+
## 0.7.4 - 2024-03-28
### Added
diff --git a/Makefile b/Makefile
index e9df2d7..098daf8 100644
--- a/Makefile
+++ b/Makefile
@@ -54,6 +54,9 @@ products/%/frameworks/libzcashlc.framework: products/%/universal/libzcashlc.a
cp -R rust/target/Headers $@
mkdir $@/Modules
cp support/module.modulemap $@/Modules
+ # Workaround for a bug in the XCode 15.3 build system.
+ # https://github.com/Electric-Coin-Company/zashi-ios/issues/1166
+ cp support/platform-Info.plist $@/Info.plist
products/macos/universal/libzcashlc.a: $(MACOS_ARCHS)
mkdir -p $(@D)
diff --git a/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/Headers/zcashlc.h b/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/Headers/zcashlc.h
index f9549ff..e9dda91 100644
--- a/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/Headers/zcashlc.h
+++ b/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/Headers/zcashlc.h
@@ -646,7 +646,7 @@ char *zcashlc_get_sapling_receiver_for_unified_address(const char *ua);
* - `address` must be non-null and must point to a null-terminated UTF-8 string.
* - The memory referenced by `address` must not be mutated for the duration of the function call.
*/
-bool zcashlc_is_valid_shielded_address(const char *address, uint32_t network_id);
+bool zcashlc_is_valid_sapling_address(const char *address, uint32_t network_id);
/**
* Returns the network type and address kind for the given address string,
@@ -823,6 +823,7 @@ int64_t zcashlc_get_total_transparent_balance_for_account(const uint8_t *db_data
bool zcashlc_get_memo(const uint8_t *db_data,
uintptr_t db_data_len,
const uint8_t *txid_bytes,
+ uint32_t output_pool,
uint16_t output_index,
uint8_t *memo_bytes_ret,
uint32_t network_id);
diff --git a/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/Info.plist b/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/Info.plist
new file mode 100644
index 0000000..87c0eb9
--- /dev/null
+++ b/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/Info.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ CFBundleExecutable
+ libzcashlc
+ CFBundleIdentifier
+ libzcashlc
+ CFBundleName
+ libzcashlc
+ CFBundlePackageType
+ BNDL
+ CFBundleVersion
+ 0.8.0
+ CFBundleSupportedPlatforms
+
+ iphonesimulator
+
+ MinimumOSVersion
+ 100.0
+
+
diff --git a/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/libzcashlc b/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/libzcashlc
index d8d8204..ac10ef4 100644
Binary files a/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/libzcashlc and b/releases/XCFramework/libzcashlc.xcframework/ios-arm64/libzcashlc.framework/libzcashlc differ
diff --git a/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/Headers/zcashlc.h b/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/Headers/zcashlc.h
index f9549ff..e9dda91 100644
--- a/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/Headers/zcashlc.h
+++ b/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/Headers/zcashlc.h
@@ -646,7 +646,7 @@ char *zcashlc_get_sapling_receiver_for_unified_address(const char *ua);
* - `address` must be non-null and must point to a null-terminated UTF-8 string.
* - The memory referenced by `address` must not be mutated for the duration of the function call.
*/
-bool zcashlc_is_valid_shielded_address(const char *address, uint32_t network_id);
+bool zcashlc_is_valid_sapling_address(const char *address, uint32_t network_id);
/**
* Returns the network type and address kind for the given address string,
@@ -823,6 +823,7 @@ int64_t zcashlc_get_total_transparent_balance_for_account(const uint8_t *db_data
bool zcashlc_get_memo(const uint8_t *db_data,
uintptr_t db_data_len,
const uint8_t *txid_bytes,
+ uint32_t output_pool,
uint16_t output_index,
uint8_t *memo_bytes_ret,
uint32_t network_id);
diff --git a/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/Info.plist b/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/Info.plist
new file mode 100644
index 0000000..87c0eb9
--- /dev/null
+++ b/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/Info.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ CFBundleExecutable
+ libzcashlc
+ CFBundleIdentifier
+ libzcashlc
+ CFBundleName
+ libzcashlc
+ CFBundlePackageType
+ BNDL
+ CFBundleVersion
+ 0.8.0
+ CFBundleSupportedPlatforms
+
+ iphonesimulator
+
+ MinimumOSVersion
+ 100.0
+
+
diff --git a/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/libzcashlc b/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/libzcashlc
index 2aaf337..b94bf3c 100644
Binary files a/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/libzcashlc and b/releases/XCFramework/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.framework/libzcashlc differ
diff --git a/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/Headers/zcashlc.h b/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/Headers/zcashlc.h
index f9549ff..e9dda91 100644
--- a/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/Headers/zcashlc.h
+++ b/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/Headers/zcashlc.h
@@ -646,7 +646,7 @@ char *zcashlc_get_sapling_receiver_for_unified_address(const char *ua);
* - `address` must be non-null and must point to a null-terminated UTF-8 string.
* - The memory referenced by `address` must not be mutated for the duration of the function call.
*/
-bool zcashlc_is_valid_shielded_address(const char *address, uint32_t network_id);
+bool zcashlc_is_valid_sapling_address(const char *address, uint32_t network_id);
/**
* Returns the network type and address kind for the given address string,
@@ -823,6 +823,7 @@ int64_t zcashlc_get_total_transparent_balance_for_account(const uint8_t *db_data
bool zcashlc_get_memo(const uint8_t *db_data,
uintptr_t db_data_len,
const uint8_t *txid_bytes,
+ uint32_t output_pool,
uint16_t output_index,
uint8_t *memo_bytes_ret,
uint32_t network_id);
diff --git a/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/Info.plist b/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/Info.plist
new file mode 100644
index 0000000..87c0eb9
--- /dev/null
+++ b/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/Info.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ CFBundleExecutable
+ libzcashlc
+ CFBundleIdentifier
+ libzcashlc
+ CFBundleName
+ libzcashlc
+ CFBundlePackageType
+ BNDL
+ CFBundleVersion
+ 0.8.0
+ CFBundleSupportedPlatforms
+
+ iphonesimulator
+
+ MinimumOSVersion
+ 100.0
+
+
diff --git a/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/libzcashlc b/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/libzcashlc
index a6d8234..bf73aa9 100644
Binary files a/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/libzcashlc and b/releases/XCFramework/libzcashlc.xcframework/macos-arm64_x86_64/libzcashlc.framework/libzcashlc differ
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
index 545eb29..3d8d920 100644
--- a/rust/Cargo.lock
+++ b/rust/Cargo.lock
@@ -46,15 +46,15 @@ dependencies = [
[[package]]
name = "allocator-api2"
-version = "0.2.16"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
+checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
[[package]]
name = "anyhow"
-version = "1.0.81"
+version = "1.0.82"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247"
+checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519"
[[package]]
name = "arrayref"
@@ -133,7 +133,7 @@ dependencies = [
"bitflags 2.5.0",
"cexpr",
"clang-sys",
- "itertools 0.12.1",
+ "itertools",
"lazy_static",
"lazycell",
"log",
@@ -143,7 +143,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
- "syn 2.0.55",
+ "syn 2.0.59",
"which",
]
@@ -241,9 +241,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.15.4"
+version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa"
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
@@ -273,7 +273,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da6bc11b07529f16944307272d5bd9b22530bc7d05751717c9d416586cedab49"
dependencies = [
"clap",
- "heck",
+ "heck 0.4.1",
"indexmap 1.9.3",
"log",
"proc-macro2",
@@ -287,9 +287,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.0.90"
+version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5"
+checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7"
[[package]]
name = "cexpr"
@@ -481,9 +481,9 @@ dependencies = [
[[package]]
name = "either"
-version = "1.10.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
+checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2"
[[package]]
name = "equihash"
@@ -598,9 +598,9 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.12"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
+checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c"
dependencies = [
"cfg-if",
"libc",
@@ -709,6 +709,12 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
[[package]]
name = "hermit-abi"
version = "0.1.19"
@@ -786,15 +792,6 @@ dependencies = [
"generic-array",
]
-[[package]]
-name = "itertools"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
-dependencies = [
- "either",
-]
-
[[package]]
name = "itertools"
version = "0.12.1"
@@ -892,7 +889,7 @@ dependencies = [
[[package]]
name = "libzcashlc"
-version = "0.7.4"
+version = "0.8.0"
dependencies = [
"anyhow",
"bindgen",
@@ -982,9 +979,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "multimap"
-version = "0.8.3"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
+checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03"
[[package]]
name = "nom"
@@ -1174,9 +1171,9 @@ dependencies = [
[[package]]
name = "pin-project-lite"
-version = "0.2.13"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
+checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
[[package]]
name = "pkg-config"
@@ -1209,28 +1206,28 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "prettyplease"
-version = "0.2.17"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7"
+checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550"
dependencies = [
"proc-macro2",
- "syn 2.0.55",
+ "syn 2.0.59",
]
[[package]]
name = "proc-macro2"
-version = "1.0.79"
+version = "1.0.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"
+checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba"
dependencies = [
"unicode-ident",
]
[[package]]
name = "prost"
-version = "0.12.3"
+version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a"
+checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922"
dependencies = [
"bytes",
"prost-derive",
@@ -1238,13 +1235,13 @@ dependencies = [
[[package]]
name = "prost-build"
-version = "0.12.3"
+version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2"
+checksum = "80b776a1b2dc779f5ee0641f8ade0125bc1298dd41a9a0c16d8bd57b42d222b1"
dependencies = [
"bytes",
- "heck",
- "itertools 0.11.0",
+ "heck 0.5.0",
+ "itertools",
"log",
"multimap",
"once_cell",
@@ -1253,38 +1250,37 @@ dependencies = [
"prost",
"prost-types",
"regex",
- "syn 2.0.55",
+ "syn 2.0.59",
"tempfile",
- "which",
]
[[package]]
name = "prost-derive"
-version = "0.12.3"
+version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"
+checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48"
dependencies = [
"anyhow",
- "itertools 0.11.0",
+ "itertools",
"proc-macro2",
"quote",
- "syn 2.0.55",
+ "syn 2.0.59",
]
[[package]]
name = "prost-types"
-version = "0.12.3"
+version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e"
+checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe"
dependencies = [
"prost",
]
[[package]]
name = "quote"
-version = "1.0.35"
+version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
+checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
dependencies = [
"proc-macro2",
]
@@ -1553,29 +1549,29 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.197"
+version = "1.0.198"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
+checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.197"
+version = "1.0.198"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
+checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.55",
+ "syn 2.0.59",
]
[[package]]
name = "serde_json"
-version = "1.0.115"
+version = "1.0.116"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd"
+checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813"
dependencies = [
"itoa",
"ryu",
@@ -1604,9 +1600,9 @@ dependencies = [
[[package]]
name = "shardtree"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d766257c56a1bdd75479c256b97c92e72788a9afb18b5199f58faf7188dc99d9"
+checksum = "3b3cdd24424ce0b381646737fedddc33c4dcf7dcd2d545056b53f7982097bef5"
dependencies = [
"bitflags 2.5.0",
"either",
@@ -1663,9 +1659,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.55"
+version = "2.0.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0"
+checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a"
dependencies = [
"proc-macro2",
"quote",
@@ -1722,7 +1718,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.55",
+ "syn 2.0.59",
]
[[package]]
@@ -1737,9 +1733,9 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.34"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
@@ -1758,9 +1754,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.17"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
"num-conv",
"time-core",
@@ -1800,7 +1796,7 @@ dependencies = [
"proc-macro2",
"prost-build",
"quote",
- "syn 2.0.55",
+ "syn 2.0.59",
]
[[package]]
@@ -1822,7 +1818,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.55",
+ "syn 2.0.59",
]
[[package]]
@@ -1960,7 +1956,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.55",
+ "syn 2.0.59",
"wasm-bindgen-shared",
]
@@ -1982,7 +1978,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.55",
+ "syn 2.0.59",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -2057,13 +2053,14 @@ dependencies = [
[[package]]
name = "windows-targets"
-version = "0.52.4"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
+checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
+ "windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
@@ -2072,45 +2069,51 @@ dependencies = [
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.52.4"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
+checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.52.4"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
+checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
[[package]]
name = "windows_i686_gnu"
-version = "0.52.4"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
+checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
[[package]]
name = "windows_i686_msvc"
-version = "0.52.4"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
+checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.52.4"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
+checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.52.4"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
+checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.52.4"
+version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
+checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
[[package]]
name = "wyz"
@@ -2184,9 +2187,9 @@ dependencies = [
[[package]]
name = "zcash_client_sqlite"
-version = "0.10.2"
+version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fff139fa4c2b05441b3e429429c13f5c3cc5b4176a6126d74bbceae4e39bfd53"
+checksum = "d2f94a5b293baca4b99be38695caa65a5e6981e8068f0bb80a69d60f4ee78346"
dependencies = [
"bs58",
"byteorder",
@@ -2368,7 +2371,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.55",
+ "syn 2.0.59",
]
[[package]]
@@ -2388,7 +2391,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.55",
+ "syn 2.0.59",
]
[[package]]
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index 5ccc67f..2d92089 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "libzcashlc"
-version = "0.7.4"
+version = "0.8.0"
authors = [
"Jack Grigg ",
"Francisco Gindre",
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index 73a5688..b7c8b5d 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -144,15 +144,27 @@ fn account_id_from_ffi(
.filter_map(|account_id| {
db_data
.get_account(account_id)
- .transpose()
- .expect("account_id exists")
- .map(|account| match account.source() {
- AccountSource::Derived { account_index, .. }
- if account_index == requested_account_index =>
- {
- Some(account)
- }
- _ => None,
+ .map_err(|e| {
+ anyhow!(
+ "Database error encountered retrieving account {:?}: {}",
+ account_id,
+ e
+ )
+ })
+ .and_then(|acct_opt| {
+ acct_opt
+ .ok_or(anyhow!(
+ "Wallet data corrupted: unable to retrieve account data for account {:?}",
+ account_id
+ ))
+ .map(|account| match account.source() {
+ AccountSource::Derived { account_index, .. }
+ if account_index == requested_account_index =>
+ {
+ Some(account)
+ }
+ _ => None,
+ })
})
.transpose()
});
@@ -1012,19 +1024,19 @@ pub unsafe extern "C" fn zcashlc_get_sapling_receiver_for_unified_address(
/// - `address` must be non-null and must point to a null-terminated UTF-8 string.
/// - The memory referenced by `address` must not be mutated for the duration of the function call.
#[no_mangle]
-pub unsafe extern "C" fn zcashlc_is_valid_shielded_address(
+pub unsafe extern "C" fn zcashlc_is_valid_sapling_address(
address: *const c_char,
network_id: u32,
) -> bool {
let res = catch_panic(|| {
let network = parse_network(network_id)?;
let addr = unsafe { CStr::from_ptr(address).to_str()? };
- Ok(is_valid_shielded_address(addr, &network))
+ Ok(is_valid_sapling_address(addr, &network))
});
unwrap_exc_or(res, false)
}
-fn is_valid_shielded_address(address: &str, network: &Network) -> bool {
+fn is_valid_sapling_address(address: &str, network: &Network) -> bool {
match Address::decode(network, address) {
Some(addr) => match addr {
Address::Sapling(_) => true,
@@ -1511,6 +1523,14 @@ pub unsafe extern "C" fn zcashlc_get_total_transparent_balance_for_account(
unwrap_exc_or(res, -1)
}
+fn parse_protocol(code: u32) -> Option {
+ match code {
+ 2 => Some(ShieldedProtocol::Sapling),
+ 3 => Some(ShieldedProtocol::Orchard),
+ _ => None,
+ }
+}
+
/// Returns the memo for a note by copying the corresponding bytes to the received
/// pointer in `memo_bytes_ret`.
///
@@ -1530,6 +1550,7 @@ pub unsafe extern "C" fn zcashlc_get_memo(
db_data: *const u8,
db_data_len: usize,
txid_bytes: *const u8,
+ output_pool: u32,
output_index: u16,
memo_bytes_ret: *mut u8,
network_id: u32,
@@ -1541,8 +1562,13 @@ pub unsafe extern "C" fn zcashlc_get_memo(
let txid_bytes = unsafe { slice::from_raw_parts(txid_bytes, 32) };
let txid = TxId::read(&txid_bytes[..])?;
+ let protocol = parse_protocol(output_pool).ok_or(anyhow!(
+ "Shielded protocol not recognized for code: {}",
+ output_pool
+ ))?;
+
let memo_bytes = db_data
- .get_memo(NoteId::new(txid, ShieldedProtocol::Sapling, output_index))
+ .get_memo(NoteId::new(txid, protocol, output_index))
.map_err(|e| anyhow!("An error occurred retrieving the memo: {}", e))
.and_then(|memo| memo.ok_or(anyhow!("Memo not available")))
.map(|memo| memo.encode())?;
@@ -2742,7 +2768,7 @@ fn zip317_helper(
StandardFeeRule::PreZip313
};
GreedyInputSelector::new(
- SingleOutputChangeStrategy::new(fee_rule, change_memo, ShieldedProtocol::Sapling),
+ SingleOutputChangeStrategy::new(fee_rule, change_memo, ShieldedProtocol::Orchard),
DustOutputPolicy::default(),
)
}
diff --git a/support/platform-Info.plist b/support/platform-Info.plist
new file mode 100644
index 0000000..87c0eb9
--- /dev/null
+++ b/support/platform-Info.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ CFBundleExecutable
+ libzcashlc
+ CFBundleIdentifier
+ libzcashlc
+ CFBundleName
+ libzcashlc
+ CFBundlePackageType
+ BNDL
+ CFBundleVersion
+ 0.8.0
+ CFBundleSupportedPlatforms
+
+ iphonesimulator
+
+ MinimumOSVersion
+ 100.0
+
+