diff --git a/.gitignore b/.gitignore index 6ba72f63..a03edfb6 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ playground.xcworkspace # Swift Package Manager .build/ +.swiftpm/ # Carthage Carthage/Checkouts diff --git a/.rustc_info.json b/.rustc_info.json deleted file mode 100644 index 7ac56c7d..00000000 --- a/.rustc_info.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc_fingerprint":9702058127967770953,"outputs":{"7418947162089833526":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/pacu/.rustup/toolchains/stable-x86_64-apple-darwin\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"ssse3\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n",""],"1164083562126845933":["rustc 1.38.0 (625451e37 2019-09-23)\nbinary: rustc\ncommit-hash: 625451e376bb2e5283fc4741caa0a3e8a2ca4d54\ncommit-date: 2019-09-23\nhost: x86_64-apple-darwin\nrelease: 1.38.0\nLLVM version: 9.0\n",""],"1138116330425514636":["___\n",""],"4476964694761187371":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/pacu/.rustup/toolchains/stable-x86_64-apple-darwin\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"ssse3\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n",""]},"successes":{}} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 4e48fb3e..00000000 --- a/Cargo.lock +++ /dev/null @@ -1,1659 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher", - "opaque-debug", -] - -[[package]] -name = "ahash" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "backtrace" -version = "0.3.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744" -dependencies = [ - "addr2line", - "cc", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base-x" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" - -[[package]] -name = "base58" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bech32" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9ff0bbfd639f15c74af777d81383cf53efb7c93613f6cab67c6c11e05bbf8b" - -[[package]] -name = "bellman" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7089887635778eabf0038a166f586eee5413fb85c8fa6c9a754914f0f644f49f" -dependencies = [ - "bitvec 0.18.5", - "blake2s_simd", - "byteorder", - "crossbeam", - "ff", - "futures", - "futures-cpupool", - "group", - "num_cpus", - "pairing", - "rand_core 0.5.1", - "subtle", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitvec" -version = "0.18.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98fcd36dda4e17b7d7abc64cb549bf0201f4ab71e00700c798ca7e62ed3761fa" -dependencies = [ - "funty", - "radium 0.3.0", - "wyz", -] - -[[package]] -name = "bitvec" -version = "0.19.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33" -dependencies = [ - "funty", - "radium 0.5.3", - "tap", - "wyz", -] - -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - -[[package]] -name = "blake2s_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding", - "cipher", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "bls12_381" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caf0101205582491f772d60a6fcb6bcec19963e68209cb631851eeadb01421f" -dependencies = [ - "bitvec 0.18.5", - "ff", - "group", - "pairing", - "rand_core 0.5.1", - "subtle", -] - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" -dependencies = [ - "sha2", -] - -[[package]] -name = "bumpalo" -version = "3.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "cbindgen" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e03a705df2e735cc5486f104a48e25a8f72ae06eaea5b7753a81270ed00859" -dependencies = [ - "clap", - "heck", - "log", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn", - "tempfile", - "toml", -] - -[[package]] -name = "cc" -version = "1.0.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "cpufeatures" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" -dependencies = [ - "libc", -] - -[[package]] -name = "crossbeam" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-deque" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "crossbeam-utils", - "lazy_static", - "maybe-uninit", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", -] - -[[package]] -name = "crypto_api" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f855e87e75a4799e18b8529178adcde6fd4f97c1449ff4821e747ff728bb102" - -[[package]] -name = "crypto_api_chachapoly" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930b6a026ce9d358a17f9c9046c55d90b14bb847f36b6ebb6b19365d4feffb8" -dependencies = [ - "crypto_api", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "directories" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e69600ff1703123957937708eb27f7a564e48885c537782722ed0ba3189ce1d7" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "equihash" -version = "0.1.0" -source = "git+https://github.com/zcash/librustzcash?branch=autoshielding-poc-sdk-dnm#8e3e7de50c3c35bd7c18988bb629dd1baeb1a3d1" -dependencies = [ - "blake2b_simd", - "byteorder", -] - -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - -[[package]] -name = "fallible-streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" - -[[package]] -name = "fastrand" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779d043b6a0b90cc4c0ed7ee380a6504394cee7efd7db050e3774eee387324b2" -dependencies = [ - "instant", -] - -[[package]] -name = "ff" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01646e077d4ebda82b73f1bca002ea1e91561a77df2431a9e79729bcc31950ef" -dependencies = [ - "bitvec 0.18.5", - "rand_core 0.5.1", - "subtle", -] - -[[package]] -name = "ffi_helpers" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a21261040ffbc3999698b39170d6e951f2823dd9ad7b50469309156060a50c" -dependencies = [ - "failure", - "failure_derive", - "libc", -] - -[[package]] -name = "fpe" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25080721bbcd2cd4d765b7d607ea350425fa087ce53cd3e31afcacdab850352" -dependencies = [ - "aes", - "block-modes", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - -[[package]] -name = "futures-cpupool" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -dependencies = [ - "futures", - "num_cpus", -] - -[[package]] -name = "generic-array" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.10.2+wasi-snapshot-preview1", -] - -[[package]] -name = "gimli" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" - -[[package]] -name = "group" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc11f9f5fbf1943b48ae7c2bf6846e7d827a512d1be4f23af708f5ca5d01dde1" -dependencies = [ - "byteorder", - "ff", - "rand_core 0.5.1", - "subtle", -] - -[[package]] -name = "hashbrown" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashlink" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d99cf782f0dc4372d26846bec3de7804ceb5df083c2d4462c0b8d2330e894fa8" -dependencies = [ - "hashbrown", -] - -[[package]] -name = "hdwallet" -version = "0.2.5" -source = "git+https://github.com/nuttycom/hdwallet?rev=72f1f7a56c114eed484cefd6d402b7ef28158712#72f1f7a56c114eed484cefd6d402b7ef28158712" -dependencies = [ - "lazy_static", - "rand_core 0.6.3", - "ring", - "secp256k1", -] - -[[package]] -name = "hdwallet" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2033326faddc94885c26775db24683819bf3ae9461e016c45df18b910bdeedd7" -dependencies = [ - "lazy_static", - "rand_core 0.6.3", - "ring", - "secp256k1", -] - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "itoa" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" - -[[package]] -name = "js-sys" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "jubjub" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "620638af3b80d23f4df0cae21e3cc9809ac8826767f345066f010bcea66a2c55" -dependencies = [ - "bitvec 0.18.5", - "bls12_381", - "ff", - "group", - "rand_core 0.5.1", - "subtle", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec", - "bitflags", - "cfg-if 1.0.0", - "ryu", - "static_assertions", -] - -[[package]] -name = "libc" -version = "0.2.112" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" - -[[package]] -name = "libsqlite3-sys" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d31059f22935e6c31830db5249ba2b7ecd54fd73a9909286f0a67aa55c2fbd" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "libzcashlc" -version = "0.0.8" -dependencies = [ - "base58", - "cbindgen", - "failure", - "ffi_helpers", - "hdwallet 0.2.5", - "hex", - "num-bigint", - "secp256k1", - "time", - "zcash_client_backend", - "zcash_client_sqlite", - "zcash_primitives", - "zcash_proofs", -] - -[[package]] -name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "memchr" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" - -[[package]] -name = "memoffset" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - -[[package]] -name = "nom" -version = "6.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6" -dependencies = [ - "bitvec 0.19.6", - "funty", - "lexical-core", - "memchr", - "version_check", -] - -[[package]] -name = "num-bigint" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" - -[[package]] -name = "once_cell" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "pairing" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f702cdbee9e0a6272452c20dec82465bc821116598b4eeb63e9a71a69dbf7fd" -dependencies = [ - "ff", - "group", -] - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "pkg-config" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" - -[[package]] -name = "ppv-lite86" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro2" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "protobuf" -version = "2.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c327e191621a2158159df97cdbc2e7074bb4e940275e35abf38eb3d2595754" - -[[package]] -name = "protobuf-codegen" -version = "2.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3df8c98c08bd4d6653c2dbae00bd68c1d1d82a360265a5b0bbc73d48c63cb853" -dependencies = [ - "protobuf", -] - -[[package]] -name = "protobuf-codegen-pure" -version = "2.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "394a73e2a819405364df8d30042c0f1174737a763e0170497ec9d36f8a2ea8f7" -dependencies = [ - "protobuf", - "protobuf-codegen", -] - -[[package]] -name = "quote" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" - -[[package]] -name = "radium" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "redox_syscall" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" -dependencies = [ - "getrandom 0.2.3", - "redox_syscall", -] - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi", -] - -[[package]] -name = "ripemd160" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" -dependencies = [ - "block-buffer", - "digest", - "opaque-debug", -] - -[[package]] -name = "rusqlite" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38ee71cbab2c827ec0ac24e76f82eca723cee92c509a65f67dee393c25112" -dependencies = [ - "bitflags", - "fallible-iterator", - "fallible-streaming-iterator", - "hashlink", - "libsqlite3-sys", - "memchr", - "smallvec", - "time", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - -[[package]] -name = "ryu" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "secp256k1" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6179428c22c73ac0fbb7b5579a56353ce78ba29759b3b8575183336ea74cdfb" -dependencies = [ - "secp256k1-sys", -] - -[[package]] -name = "secp256k1-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11553d210db090930f4432bea123b31f70bbf693ace14504ea2a35e796c28dd2" -dependencies = [ - "cc", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "serde" -version = "1.0.133" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.133" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer", - "cfg-if 1.0.0", - "cpufeatures", - "digest", - "opaque-debug", -] - -[[package]] -name = "smallvec" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1", - "syn", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "syn" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" -dependencies = [ - "cfg-if 1.0.0", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros", - "version_check", - "winapi", -] - -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn", -] - -[[package]] -name = "toml" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" -dependencies = [ - "serde", -] - -[[package]] -name = "typenum" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" - -[[package]] -name = "unicode-segmentation" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" - -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - -[[package]] -name = "wasm-bindgen" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" -dependencies = [ - "cfg-if 1.0.0", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" - -[[package]] -name = "web-sys" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - -[[package]] -name = "zcash_client_backend" -version = "0.5.0" -source = "git+https://github.com/zcash/librustzcash?branch=autoshielding-poc-sdk-dnm#8e3e7de50c3c35bd7c18988bb629dd1baeb1a3d1" -dependencies = [ - "base64", - "bech32", - "bls12_381", - "bs58", - "ff", - "group", - "hdwallet 0.3.0", - "hex", - "jubjub", - "log", - "nom", - "percent-encoding", - "protobuf", - "protobuf-codegen-pure", - "rand_core 0.5.1", - "ripemd160", - "secp256k1", - "sha2", - "subtle", - "time", - "zcash_note_encryption", - "zcash_primitives", -] - -[[package]] -name = "zcash_client_sqlite" -version = "0.3.0" -source = "git+https://github.com/zcash/librustzcash?branch=autoshielding-poc-sdk-dnm#8e3e7de50c3c35bd7c18988bb629dd1baeb1a3d1" -dependencies = [ - "bech32", - "bs58", - "ff", - "group", - "jubjub", - "protobuf", - "rand_core 0.5.1", - "rusqlite", - "secp256k1", - "time", - "zcash_client_backend", - "zcash_primitives", -] - -[[package]] -name = "zcash_note_encryption" -version = "0.0.0" -source = "git+https://github.com/zcash/librustzcash?branch=autoshielding-poc-sdk-dnm#8e3e7de50c3c35bd7c18988bb629dd1baeb1a3d1" -dependencies = [ - "blake2b_simd", - "byteorder", - "crypto_api_chachapoly", - "ff", - "group", - "rand_core 0.5.1", - "subtle", -] - -[[package]] -name = "zcash_primitives" -version = "0.5.0" -source = "git+https://github.com/zcash/librustzcash?branch=autoshielding-poc-sdk-dnm#8e3e7de50c3c35bd7c18988bb629dd1baeb1a3d1" -dependencies = [ - "aes", - "bitvec 0.18.5", - "blake2b_simd", - "blake2s_simd", - "bls12_381", - "byteorder", - "crypto_api_chachapoly", - "equihash", - "ff", - "fpe", - "funty", - "group", - "hex", - "jubjub", - "lazy_static", - "log", - "rand", - "rand_core 0.5.1", - "ripemd160", - "secp256k1", - "sha2", - "subtle", - "zcash_note_encryption", -] - -[[package]] -name = "zcash_proofs" -version = "0.5.0" -source = "git+https://github.com/zcash/librustzcash?branch=autoshielding-poc-sdk-dnm#8e3e7de50c3c35bd7c18988bb629dd1baeb1a3d1" -dependencies = [ - "bellman", - "blake2b_simd", - "bls12_381", - "byteorder", - "directories", - "ff", - "group", - "jubjub", - "lazy_static", - "rand_core 0.5.1", - "zcash_primitives", -] diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index 045ab4b9..00000000 --- a/Cargo.toml +++ /dev/null @@ -1,56 +0,0 @@ -[package] -name = "libzcashlc" -version = "0.0.8" -authors = ["Jack Grigg ", - "Francisco Gindre ", -] -edition = "2018" -build = "rust/build.rs" - -[dependencies] -failure = "0.1" -ffi_helpers = "0.2" -hex = "0.4" -zcash_client_backend = "0.5" -zcash_client_sqlite = "0.3" -zcash_primitives = "0.5" -zcash_proofs = "0.5" - -#### Temporary additions: #################################### -#bitvec = "0.22" -base58 = "0.1.0" -#sha2 = "0.9" -#bs58 = { version = "0.3", features = ["check"] } -#hdwallet = "0.3.0" -#ripemd160 = "0.9" -hdwallet = { git = "https://github.com/nuttycom/hdwallet", rev = "72f1f7a56c114eed484cefd6d402b7ef28158712"} -secp256k1 = "0.19" -time = "0.2" -num-bigint = "0.3.3" -############################################################## - -#[dependencies.zcash_proofs] -#version = "0.5" -#default-features = false -#features = ["local-prover"] - -[build-dependencies] -cbindgen = "0.14" - -[lib] -name = "zcashlc" -path = "rust/src/lib.rs" -crate-type = ["staticlib"] - -[profile.release] -lto = true - -[patch.crates-io] -zcash_client_backend = {git = "https://github.com/zcash/librustzcash", branch = "autoshielding-poc-sdk-dnm"} -zcash_client_sqlite = {git = "https://github.com/zcash/librustzcash", branch = "autoshielding-poc-sdk-dnm"} -zcash_primitives = {git = "https://github.com/zcash/librustzcash", branch = "autoshielding-poc-sdk-dnm"} -zcash_proofs = {git = "https://github.com/zcash/librustzcash", branch = "autoshielding-poc-sdk-dnm"} - -[features] -mainnet = ["zcash_client_sqlite/mainnet"] -testnet = [] \ No newline at end of file diff --git a/Example/ZcashLightClientSample/Podfile b/Example/ZcashLightClientSample/Podfile deleted file mode 100644 index 2bc760bd..00000000 --- a/Example/ZcashLightClientSample/Podfile +++ /dev/null @@ -1,48 +0,0 @@ -platform :ios, '13.0' - -target 'ZcashLightClientSample' do - # Comment the next line if you don't want to use dynamic frameworks - use_frameworks! - pod "KRProgressHUD" - # Pods for ZcashLightClientSample - pod 'ZcashLightClientKit', :path => '../../', :testspecs => ['Tests', 'DerivationToolTests'] - pod 'gRPC-Swift', '= 1.0.0' - pod 'PaginatedTableView' - pod 'NotificationBubbles' - pod 'MnemonicSwift', :git => 'https://github.com/zcash-hackworks/MnemonicSwift.git', :tag => '2.1.0' - pod 'gRPC-Swift-Plugins', '= 1.0.0' - target 'ZcashLightClientSampleTests' do - use_frameworks! - inherit! :search_paths - # Pods for testing - end - - target 'ZcashLightClientSampleUITests' do - inherit! :search_paths - # Pods for testing - end -end - -target 'ZcashLightClientSample-Mainnet' do - inherit! :search_paths - use_frameworks! - pod 'MnemonicSwift', :git => 'https://github.com/zcash-hackworks/MnemonicSwift.git', :tag => '2.1.0' - pod "KRProgressHUD" - pod 'PaginatedTableView' - pod 'NotificationBubbles' - pod 'ZcashLightClientKit', :path => '../../' -end - - -post_install do |installer| - installer.pods_project.targets.each do |target| - - target.build_configurations.each do |config| - if target.name == 'ZcashLightClientKit-Unit-Tests' - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0" - end - - config.build_settings['ENABLE_BITCODE'] = 'NO' - end - end -end diff --git a/Example/ZcashLightClientSample/Podfile.lock b/Example/ZcashLightClientSample/Podfile.lock deleted file mode 100644 index 46eec855..00000000 --- a/Example/ZcashLightClientSample/Podfile.lock +++ /dev/null @@ -1,167 +0,0 @@ -PODS: - - CGRPCZlib (1.0.0) - - CNIOAtomics (2.27.0) - - CNIOBoringSSL (2.10.5) - - CNIOBoringSSLShims (2.10.5): - - CNIOBoringSSL (= 2.10.5) - - CNIODarwin (2.27.0) - - CNIOHTTPParser (2.27.0) - - CNIOLinux (2.27.0) - - CNIOWindows (2.27.0) - - gRPC-Swift (1.0.0): - - CGRPCZlib (= 1.0.0) - - Logging (< 2.0.0, >= 1.4.0) - - SwiftNIO (< 3.0.0, >= 2.22.0) - - SwiftNIOExtras (< 2.0.0, >= 1.4.0) - - SwiftNIOHTTP2 (< 2.0.0, >= 1.16.1) - - SwiftNIOSSL (< 3.0.0, >= 2.8.0) - - SwiftNIOTransportServices (< 2.0.0, >= 1.6.0) - - SwiftProtobuf (< 2.0.0, >= 1.9.0) - - gRPC-Swift-Plugins (1.0.0): - - gRPC-Swift (= 1.0.0) - - KRActivityIndicatorView (3.0.5) - - KRProgressHUD (3.4.5): - - KRActivityIndicatorView (= 3.0.5) - - Logging (1.4.0) - - MnemonicSwift (2.1.0) - - NotificationBubbles (0.1.1) - - PaginatedTableView (1.0.1) - - SQLite.swift (0.12.2): - - SQLite.swift/standard (= 0.12.2) - - SQLite.swift/standard (0.12.2) - - SwiftNIO (2.27.0): - - CNIODarwin (= 2.27.0) - - CNIOLinux (= 2.27.0) - - CNIOWindows (= 2.27.0) - - SwiftNIOConcurrencyHelpers (= 2.27.0) - - SwiftNIOConcurrencyHelpers (2.27.0): - - CNIOAtomics (= 2.27.0) - - SwiftNIOExtras (1.8.0): - - SwiftNIO (< 3, >= 2.9.0) - - SwiftNIOFoundationCompat (2.27.0): - - SwiftNIO (= 2.27.0) - - SwiftNIOHPACK (1.16.3): - - SwiftNIO (< 3, >= 2.18.0) - - SwiftNIOConcurrencyHelpers (< 3, >= 2.18.0) - - SwiftNIOHTTP1 (< 3, >= 2.18.0) - - SwiftNIOHTTP1 (2.27.0): - - CNIOHTTPParser (= 2.27.0) - - SwiftNIO (= 2.27.0) - - SwiftNIOConcurrencyHelpers (= 2.27.0) - - SwiftNIOHTTP2 (1.16.3): - - SwiftNIO (< 3, >= 2.18.0) - - SwiftNIOConcurrencyHelpers (< 3, >= 2.18.0) - - SwiftNIOHPACK (= 1.16.3) - - SwiftNIOHTTP1 (< 3, >= 2.18.0) - - SwiftNIOTLS (< 3, >= 2.18.0) - - SwiftNIOSSL (2.10.5): - - CNIOBoringSSL (= 2.10.5) - - CNIOBoringSSLShims (= 2.10.5) - - SwiftNIO (< 3, >= 2.15.0) - - SwiftNIOConcurrencyHelpers (< 3, >= 2.15.0) - - SwiftNIOTLS (< 3, >= 2.15.0) - - SwiftNIOTLS (2.27.0): - - SwiftNIO (= 2.27.0) - - SwiftNIOTransportServices (1.9.2): - - SwiftNIO (< 3, >= 2.19.0) - - SwiftNIOConcurrencyHelpers (< 3, >= 2.19.0) - - SwiftNIOFoundationCompat (< 3, >= 2.19.0) - - SwiftNIOTLS (< 3, >= 2.19.0) - - SwiftProtobuf (1.16.0) - - ZcashLightClientKit (0.12.0-beta.6): - - gRPC-Swift (= 1.0.0) - - SQLite.swift (~> 0.12.2) - - ZcashLightClientKit/DerivationToolTests (0.12.0-beta.6): - - gRPC-Swift (= 1.0.0) - - SQLite.swift (~> 0.12.2) - - ZcashLightClientKit/Tests (0.12.0-beta.6): - - gRPC-Swift (= 1.0.0) - - SQLite.swift (~> 0.12.2) - -DEPENDENCIES: - - gRPC-Swift (= 1.0.0) - - gRPC-Swift-Plugins (= 1.0.0) - - KRProgressHUD - - MnemonicSwift (from `https://github.com/zcash-hackworks/MnemonicSwift.git`, tag `2.1.0`) - - NotificationBubbles - - PaginatedTableView - - ZcashLightClientKit (from `../../`) - - ZcashLightClientKit/DerivationToolTests (from `../../`) - - ZcashLightClientKit/Tests (from `../../`) - -SPEC REPOS: - trunk: - - CGRPCZlib - - CNIOAtomics - - CNIOBoringSSL - - CNIOBoringSSLShims - - CNIODarwin - - CNIOHTTPParser - - CNIOLinux - - CNIOWindows - - gRPC-Swift - - gRPC-Swift-Plugins - - KRActivityIndicatorView - - KRProgressHUD - - Logging - - NotificationBubbles - - PaginatedTableView - - SQLite.swift - - SwiftNIO - - SwiftNIOConcurrencyHelpers - - SwiftNIOExtras - - SwiftNIOFoundationCompat - - SwiftNIOHPACK - - SwiftNIOHTTP1 - - SwiftNIOHTTP2 - - SwiftNIOSSL - - SwiftNIOTLS - - SwiftNIOTransportServices - - SwiftProtobuf - -EXTERNAL SOURCES: - MnemonicSwift: - :git: https://github.com/zcash-hackworks/MnemonicSwift.git - :tag: 2.1.0 - ZcashLightClientKit: - :path: "../../" - -CHECKOUT OPTIONS: - MnemonicSwift: - :git: https://github.com/zcash-hackworks/MnemonicSwift.git - :tag: 2.1.0 - -SPEC CHECKSUMS: - CGRPCZlib: b0c9d704a12fa667f1824ffff20688f191945989 - CNIOAtomics: 43316aa185f4bd639aa0a9cd49741151bbe8de7f - CNIOBoringSSL: 7ff9c35139a115f93269915b9555044d741b2ac9 - CNIOBoringSSLShims: 6edde63429e353ba78992b2d4d1b0627752a4a43 - CNIODarwin: 9eb3c09e9f3fc5ed47cecdd032aad926df81e3a6 - CNIOHTTPParser: c6051552c5f332e4ec0756581e5cbd5632ca24e6 - CNIOLinux: 79227941d64216792c3c59238b0106b9e0df25bc - CNIOWindows: f2baa102255e986467578337ffa2f777cb6bdf7f - gRPC-Swift: 77154009a019e97f8c4bd8f2bb75fe9726801157 - gRPC-Swift-Plugins: 22f2e8578f332e72ee59671c63264e219c982755 - KRActivityIndicatorView: 912bc0413d98340f384b12a4e1e6aa8f42fb377d - KRProgressHUD: df4cdc3a1baf708d4276a089ee34d133fa9a6f3e - Logging: beeb016c9c80cf77042d62e83495816847ef108b - MnemonicSwift: 2415962992f524a762222c3aa1cc912736252b43 - NotificationBubbles: 91ee10deee54f35b5d49a161e1cb3d788ab5d011 - PaginatedTableView: 294d9831d5ddf5c0dcfbb4a281d4fcfb8d12f55a - SQLite.swift: d2b4642190917051ce6bd1d49aab565fe794eea3 - SwiftNIO: 81d33ce8c500b7e41b6cdde5f2f12330b9750219 - SwiftNIOConcurrencyHelpers: 23fc68bac541a465162d7225d2c743edd2f1012c - SwiftNIOExtras: aa561b71020cd6844f722cf4513fb176c577414d - SwiftNIOFoundationCompat: 0e52ac0e2c9b7b60ff9141eebb64f5a82d974118 - SwiftNIOHPACK: 38e855a72ae0c5176485ddd039b3933b99daa2b7 - SwiftNIOHTTP1: 846277d7fc7661fba655540e529d7ba3c728ca50 - SwiftNIOHTTP2: de7eff9d32fd347338f85b86c6fd0e13c3fbd1a0 - SwiftNIOSSL: 6a1f0499a5319e823eae0b6f053ecb502bcce3f5 - SwiftNIOTLS: 4f8df225f03393f08e0b47b4d876ae38167f8a27 - SwiftNIOTransportServices: 896c9a4ac98698d32aa2feea7657ade219ae80bb - SwiftProtobuf: 4e16842b83c6fda06b10fac50d73b3f1fce8ab7b - ZcashLightClientKit: e6d2d19781f0fab725ed4b9b8796c54a72d3de1d - -PODFILE CHECKSUM: 04cc0428dd2604ef8e1bad37e4a870165d530505 - -COCOAPODS: 1.11.2 diff --git a/Example/ZcashLightClientSample/README.md b/Example/ZcashLightClientSample/README.md index 02a4a14b..1c5546bb 100644 --- a/Example/ZcashLightClientSample/README.md +++ b/Example/ZcashLightClientSample/README.md @@ -7,24 +7,13 @@ It relies on [Lightwalletd](https://github.com/zcash/lightwalletd), a backend se ## Contents - [Requirements](#requirements) -- [Installation](#installation) - [Exploring the demo app](#exploring-the-demo-app) - [Demos](#demos) - [Getting started](#getting-started) - [Resources](#resources) ## Requirements -Demo app requires a target device running iOS 12+. The demo directly links source code so building it also requires Rust, Sourcery, and Xcode. - -[Back to contents](#contents) - -## Installation -Refer to [build instructions](https://github.com/zcash/ZcashLightClientKit) in the readme of the android-wallet-sdk repository for detailed instructions. In short, you will need to: - -1. Install rust: https://www.rust-lang.org/learn/get-started -1. Install sourcery: https://github.com/krzysztofzablocki/Sourcery -1. Clone this repo, https://github.com/zcash/ZcashLightClientKit -1. Launch from Xcode, https://developer.apple.com/xcode/ +Demo app requires a target device running iOS 12+. [Back to contents](#contents) diff --git a/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.pbxproj b/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.pbxproj index 028332e3..9c0257c6 100644 --- a/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.pbxproj +++ b/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -40,7 +40,6 @@ 0D907F1D2322CC5B00D641FE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0D907F1C2322CC5B00D641FE /* Assets.xcassets */; }; 0D907F202322CC5B00D641FE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0D907F1E2322CC5B00D641FE /* LaunchScreen.storyboard */; }; 0D907F2B2322CC5B00D641FE /* ZcashLightClientSampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D907F2A2322CC5B00D641FE /* ZcashLightClientSampleTests.swift */; }; - 0D907F362322CC5B00D641FE /* ZcashLightClientSampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D907F352322CC5B00D641FE /* ZcashLightClientSampleUITests.swift */; }; 0DA58B942397DDD9004596EA /* TransactionsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DA58B932397DDD9004596EA /* TransactionsTableViewController.swift */; }; 0DA58B962397F2CB004596EA /* TransactionsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DA58B952397F2CB004596EA /* TransactionsDataSource.swift */; }; 0DBF8F9523A80F5A0010B85F /* TransactionDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DBF8F9423A80F5A0010B85F /* TransactionDetailViewController.swift */; }; @@ -48,10 +47,15 @@ 0DDFB33C236B743000AED892 /* LatestHeightViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DDFB33B236B743000AED892 /* LatestHeightViewController.swift */; }; 0DDFB33E236B844900AED892 /* DemoAppConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DDFB33D236B844900AED892 /* DemoAppConfig.swift */; }; 0DF53E6723A438F100D7249C /* PaginatedTransactionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DF53E6623A438F100D7249C /* PaginatedTransactionsViewController.swift */; }; - 6355F11E6389A7F4FD9F21F7 /* Pods_ZcashLightClientSample_Mainnet.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49540782BAF7E579947E23C4 /* Pods_ZcashLightClientSample_Mainnet.framework */; }; - 742DCA7AFF9FBEA217FD3EED /* Pods_ZcashLightClientSampleUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33F67E6BA5A27016288E77EB /* Pods_ZcashLightClientSampleUITests.framework */; }; - A337DEF9CF408DD9F8C200DD /* Pods_ZcashLightClientSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCCFED26DDACC4FBD997470C /* Pods_ZcashLightClientSample.framework */; }; - A459F9A413C2AB70A02FE894 /* Pods_ZcashLightClientSampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C89C3AE14EA6993FECC643BC /* Pods_ZcashLightClientSampleTests.framework */; }; + 481792F96AA8DF873DDD19A8 /* Pods_ZcashLightClientSampleUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 372CC57DB80CC242BA556A30 /* Pods_ZcashLightClientSampleUITests.framework */; }; + 8462F5B5D7D1652782D6917E /* Pods_ZcashLightClientSampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22AE1E6F756FD3EA41A397FC /* Pods_ZcashLightClientSampleTests.framework */; }; + F94912632790D7C4004BB3DE /* ZcashLightClientSample-Mainnet-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = F94912622790D7C4004BB3DE /* ZcashLightClientSample-Mainnet-Info.plist */; }; + F94912642790D7C4004BB3DE /* ZcashLightClientSample-Mainnet-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = F94912622790D7C4004BB3DE /* ZcashLightClientSample-Mainnet-Info.plist */; }; + F9D63D1F27CD114A00F4DC5F /* ZcashLightClientKit in Frameworks */ = {isa = PBXBuildFile; productRef = F9D63D1E27CD114A00F4DC5F /* ZcashLightClientKit */; }; + F9D63D2227CD125300F4DC5F /* KRProgressHUD in Frameworks */ = {isa = PBXBuildFile; productRef = F9D63D2127CD125300F4DC5F /* KRProgressHUD */; }; + F9D63D2527CD12AA00F4DC5F /* MnemonicSwift in Frameworks */ = {isa = PBXBuildFile; productRef = F9D63D2427CD12AA00F4DC5F /* MnemonicSwift */; }; + F9D63D2927CD131300F4DC5F /* PaginatedTableView in Frameworks */ = {isa = PBXBuildFile; productRef = F9D63D2827CD131300F4DC5F /* PaginatedTableView */; }; + F9D63D2C27CD132800F4DC5F /* NotificationBubbles in Frameworks */ = {isa = PBXBuildFile; productRef = F9D63D2B27CD132800F4DC5F /* NotificationBubbles */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -83,7 +87,6 @@ 0D7A4A82236CCD88001F4DD8 /* SyncBlocksViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncBlocksViewController.swift; sourceTree = ""; }; 0D7C85E423AD5A9B006878FC /* SampleStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleStorage.swift; sourceTree = ""; }; 0D8BB46C23B1DA0700D5E2A1 /* ZcashLightClientSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZcashLightClientSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 0D8BB46D23B1DA0700D5E2A1 /* ZcashLightClientSample-Mainnet-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "ZcashLightClientSample-Mainnet-Info.plist"; path = "/Users/pacu/Repos/ECC/ZcashLightClientKit/Example/ZcashLightClientSample/ZcashLightClientSample-Mainnet-Info.plist"; sourceTree = ""; }; 0D907F122322CC5900D641FE /* ZcashLightClientSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZcashLightClientSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 0D907F152322CC5900D641FE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 0D907F172322CC5900D641FE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -95,8 +98,6 @@ 0D907F2A2322CC5B00D641FE /* ZcashLightClientSampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZcashLightClientSampleTests.swift; sourceTree = ""; }; 0D907F2C2322CC5B00D641FE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 0D907F312322CC5B00D641FE /* ZcashLightClientSampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZcashLightClientSampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 0D907F352322CC5B00D641FE /* ZcashLightClientSampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZcashLightClientSampleUITests.swift; sourceTree = ""; }; - 0D907F372322CC5B00D641FE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 0DA58B932397DDD9004596EA /* TransactionsTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionsTableViewController.swift; sourceTree = ""; }; 0DA58B952397F2CB004596EA /* TransactionsDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionsDataSource.swift; sourceTree = ""; }; 0DBF8F9423A80F5A0010B85F /* TransactionDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransactionDetailViewController.swift; sourceTree = ""; }; @@ -104,18 +105,12 @@ 0DDFB33B236B743000AED892 /* LatestHeightViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LatestHeightViewController.swift; sourceTree = ""; }; 0DDFB33D236B844900AED892 /* DemoAppConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoAppConfig.swift; sourceTree = ""; }; 0DF53E6623A438F100D7249C /* PaginatedTransactionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaginatedTransactionsViewController.swift; sourceTree = ""; }; - 1BEB1273671D6E7883C81472 /* Pods-ZcashLightClientSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZcashLightClientSample.release.xcconfig"; path = "Target Support Files/Pods-ZcashLightClientSample/Pods-ZcashLightClientSample.release.xcconfig"; sourceTree = ""; }; - 2460FDF219C57FCA6113E129 /* Pods-ZcashLightClientSampleUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZcashLightClientSampleUITests.release.xcconfig"; path = "Target Support Files/Pods-ZcashLightClientSampleUITests/Pods-ZcashLightClientSampleUITests.release.xcconfig"; sourceTree = ""; }; - 33F67E6BA5A27016288E77EB /* Pods_ZcashLightClientSampleUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZcashLightClientSampleUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 47991618469ABD2A7FE69E73 /* Pods-ZcashLightClientSample-Mainnet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZcashLightClientSample-Mainnet.release.xcconfig"; path = "Target Support Files/Pods-ZcashLightClientSample-Mainnet/Pods-ZcashLightClientSample-Mainnet.release.xcconfig"; sourceTree = ""; }; - 49540782BAF7E579947E23C4 /* Pods_ZcashLightClientSample_Mainnet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZcashLightClientSample_Mainnet.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 501B4B56030ED65B9C170CE2 /* Pods-ZcashLightClientSampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZcashLightClientSampleTests.debug.xcconfig"; path = "Target Support Files/Pods-ZcashLightClientSampleTests/Pods-ZcashLightClientSampleTests.debug.xcconfig"; sourceTree = ""; }; - 81B2AC726EA5CC3FEF521F84 /* Pods-ZcashLightClientSampleUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZcashLightClientSampleUITests.debug.xcconfig"; path = "Target Support Files/Pods-ZcashLightClientSampleUITests/Pods-ZcashLightClientSampleUITests.debug.xcconfig"; sourceTree = ""; }; - 90F55027AEE5406E35644223 /* Pods-ZcashLightClientSample-Mainnet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZcashLightClientSample-Mainnet.debug.xcconfig"; path = "Target Support Files/Pods-ZcashLightClientSample-Mainnet/Pods-ZcashLightClientSample-Mainnet.debug.xcconfig"; sourceTree = ""; }; - 93F435FD5C95BEE3BC7BBC28 /* Pods-ZcashLightClientSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZcashLightClientSample.debug.xcconfig"; path = "Target Support Files/Pods-ZcashLightClientSample/Pods-ZcashLightClientSample.debug.xcconfig"; sourceTree = ""; }; - BEA142AE2F3C339269CBA120 /* Pods-ZcashLightClientSampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZcashLightClientSampleTests.release.xcconfig"; path = "Target Support Files/Pods-ZcashLightClientSampleTests/Pods-ZcashLightClientSampleTests.release.xcconfig"; sourceTree = ""; }; - C89C3AE14EA6993FECC643BC /* Pods_ZcashLightClientSampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZcashLightClientSampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CCCFED26DDACC4FBD997470C /* Pods_ZcashLightClientSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZcashLightClientSample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 22AE1E6F756FD3EA41A397FC /* Pods_ZcashLightClientSampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZcashLightClientSampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 372CC57DB80CC242BA556A30 /* Pods_ZcashLightClientSampleUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZcashLightClientSampleUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 541D36743362A797BF085D14 /* Pods_ZcashLightClientSample_Mainnet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZcashLightClientSample_Mainnet.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EBA186B246C4205F9BF71EED /* Pods_ZcashLightClientSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZcashLightClientSample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F94912622790D7C4004BB3DE /* ZcashLightClientSample-Mainnet-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "ZcashLightClientSample-Mainnet-Info.plist"; sourceTree = SOURCE_ROOT; }; + F9D63D1D27CD103E00F4DC5F /* ZcashLightClientKit */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ZcashLightClientKit; path = ../..; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -123,7 +118,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 6355F11E6389A7F4FD9F21F7 /* Pods_ZcashLightClientSample_Mainnet.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -131,7 +125,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A337DEF9CF408DD9F8C200DD /* Pods_ZcashLightClientSample.framework in Frameworks */, + F9D63D2227CD125300F4DC5F /* KRProgressHUD in Frameworks */, + F9D63D2527CD12AA00F4DC5F /* MnemonicSwift in Frameworks */, + F9D63D2927CD131300F4DC5F /* PaginatedTableView in Frameworks */, + F9D63D1F27CD114A00F4DC5F /* ZcashLightClientKit in Frameworks */, + F9D63D2C27CD132800F4DC5F /* NotificationBubbles in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -139,7 +137,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A459F9A413C2AB70A02FE894 /* Pods_ZcashLightClientSampleTests.framework in Frameworks */, + 8462F5B5D7D1652782D6917E /* Pods_ZcashLightClientSampleTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -147,7 +145,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 742DCA7AFF9FBEA217FD3EED /* Pods_ZcashLightClientSampleUITests.framework in Frameworks */, + 481792F96AA8DF873DDD19A8 /* Pods_ZcashLightClientSampleUITests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -214,13 +212,11 @@ 0D907F092322CC5900D641FE = { isa = PBXGroup; children = ( + F9D63D1C27CD103E00F4DC5F /* Packages */, 0D907F142322CC5900D641FE /* ZcashLightClientSample */, 0D907F292322CC5B00D641FE /* ZcashLightClientSampleTests */, - 0D907F342322CC5B00D641FE /* ZcashLightClientSampleUITests */, 0D907F132322CC5900D641FE /* Products */, - 66EF5A44FD6A5AC92244F054 /* Pods */, - A4E309895AA511479901D67E /* Frameworks */, - 0D8BB46D23B1DA0700D5E2A1 /* ZcashLightClientSample-Mainnet-Info.plist */, + F93EF550279077B70063E43A /* Frameworks */, ); sourceTree = ""; }; @@ -256,6 +252,7 @@ 0D907F1C2322CC5B00D641FE /* Assets.xcassets */, 0D907F1E2322CC5B00D641FE /* LaunchScreen.storyboard */, 0D907F212322CC5B00D641FE /* Info.plist */, + F94912622790D7C4004BB3DE /* ZcashLightClientSample-Mainnet-Info.plist */, 0DDFB33D236B844900AED892 /* DemoAppConfig.swift */, 0D7C85E423AD5A9B006878FC /* SampleStorage.swift */, 0D49A18B241698A800CC0649 /* SampleLogger.swift */, @@ -272,15 +269,6 @@ path = ZcashLightClientSampleTests; sourceTree = ""; }; - 0D907F342322CC5B00D641FE /* ZcashLightClientSampleUITests */ = { - isa = PBXGroup; - children = ( - 0D907F352322CC5B00D641FE /* ZcashLightClientSampleUITests.swift */, - 0D907F372322CC5B00D641FE /* Info.plist */, - ); - path = ZcashLightClientSampleUITests; - sourceTree = ""; - }; 0DA58B922397DDBC004596EA /* List Transactions */ = { isa = PBXGroup; children = ( @@ -322,32 +310,25 @@ path = "Paginated Transactions"; sourceTree = ""; }; - 66EF5A44FD6A5AC92244F054 /* Pods */ = { + F93EF550279077B70063E43A /* Frameworks */ = { isa = PBXGroup; children = ( - 93F435FD5C95BEE3BC7BBC28 /* Pods-ZcashLightClientSample.debug.xcconfig */, - 1BEB1273671D6E7883C81472 /* Pods-ZcashLightClientSample.release.xcconfig */, - 501B4B56030ED65B9C170CE2 /* Pods-ZcashLightClientSampleTests.debug.xcconfig */, - BEA142AE2F3C339269CBA120 /* Pods-ZcashLightClientSampleTests.release.xcconfig */, - 81B2AC726EA5CC3FEF521F84 /* Pods-ZcashLightClientSampleUITests.debug.xcconfig */, - 2460FDF219C57FCA6113E129 /* Pods-ZcashLightClientSampleUITests.release.xcconfig */, - 90F55027AEE5406E35644223 /* Pods-ZcashLightClientSample-Mainnet.debug.xcconfig */, - 47991618469ABD2A7FE69E73 /* Pods-ZcashLightClientSample-Mainnet.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - A4E309895AA511479901D67E /* Frameworks */ = { - isa = PBXGroup; - children = ( - C89C3AE14EA6993FECC643BC /* Pods_ZcashLightClientSampleTests.framework */, - 33F67E6BA5A27016288E77EB /* Pods_ZcashLightClientSampleUITests.framework */, - 49540782BAF7E579947E23C4 /* Pods_ZcashLightClientSample_Mainnet.framework */, - CCCFED26DDACC4FBD997470C /* Pods_ZcashLightClientSample.framework */, + EBA186B246C4205F9BF71EED /* Pods_ZcashLightClientSample.framework */, + 541D36743362A797BF085D14 /* Pods_ZcashLightClientSample_Mainnet.framework */, + 22AE1E6F756FD3EA41A397FC /* Pods_ZcashLightClientSampleTests.framework */, + 372CC57DB80CC242BA556A30 /* Pods_ZcashLightClientSampleUITests.framework */, ); name = Frameworks; sourceTree = ""; }; + F9D63D1C27CD103E00F4DC5F /* Packages */ = { + isa = PBXGroup; + children = ( + F9D63D1D27CD103E00F4DC5F /* ZcashLightClientKit */, + ); + name = Packages; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -355,12 +336,10 @@ isa = PBXNativeTarget; buildConfigurationList = 0D8BB46923B1DA0700D5E2A1 /* Build configuration list for PBXNativeTarget "ZcashLightClientSample-Mainnet" */; buildPhases = ( - 0D8BB44F23B1DA0700D5E2A1 /* [CP] Check Pods Manifest.lock */, 0D8BB45023B1DA0700D5E2A1 /* ShellScript */, 0D8BB45123B1DA0700D5E2A1 /* Sources */, 0D8BB45F23B1DA0700D5E2A1 /* Frameworks */, 0D8BB46123B1DA0700D5E2A1 /* Resources */, - A18B8A4D55F1DF8B808ABB67 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -375,18 +354,23 @@ isa = PBXNativeTarget; buildConfigurationList = 0D907F3A2322CC5B00D641FE /* Build configuration list for PBXNativeTarget "ZcashLightClientSample" */; buildPhases = ( - 33EFC5F94E60AC06AD108A01 /* [CP] Check Pods Manifest.lock */, 0DCB58A4237B5B580040096C /* ShellScript */, 0D907F0E2322CC5900D641FE /* Sources */, 0D907F0F2322CC5900D641FE /* Frameworks */, 0D907F102322CC5900D641FE /* Resources */, - AD38BD608A7D4F64E720F342 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( ); name = ZcashLightClientSample; + packageProductDependencies = ( + F9D63D1E27CD114A00F4DC5F /* ZcashLightClientKit */, + F9D63D2127CD125300F4DC5F /* KRProgressHUD */, + F9D63D2427CD12AA00F4DC5F /* MnemonicSwift */, + F9D63D2827CD131300F4DC5F /* PaginatedTableView */, + F9D63D2B27CD132800F4DC5F /* NotificationBubbles */, + ); productName = ZcashLightClientSample; productReference = 0D907F122322CC5900D641FE /* ZcashLightClientSample.app */; productType = "com.apple.product-type.application"; @@ -395,7 +379,6 @@ isa = PBXNativeTarget; buildConfigurationList = 0D907F3D2322CC5B00D641FE /* Build configuration list for PBXNativeTarget "ZcashLightClientSampleTests" */; buildPhases = ( - A715D89E618E44427C0608E2 /* [CP] Check Pods Manifest.lock */, 0D907F222322CC5B00D641FE /* Sources */, 0D907F232322CC5B00D641FE /* Frameworks */, 0D907F242322CC5B00D641FE /* Resources */, @@ -414,7 +397,6 @@ isa = PBXNativeTarget; buildConfigurationList = 0D907F402322CC5B00D641FE /* Build configuration list for PBXNativeTarget "ZcashLightClientSampleUITests" */; buildPhases = ( - A80B091D1115175E507D0D44 /* [CP] Check Pods Manifest.lock */, 0D907F2D2322CC5B00D641FE /* Sources */, 0D907F2E2322CC5B00D641FE /* Frameworks */, 0D907F2F2322CC5B00D641FE /* Resources */, @@ -461,6 +443,12 @@ Base, ); mainGroup = 0D907F092322CC5900D641FE; + packageReferences = ( + F9D63D2027CD125300F4DC5F /* XCRemoteSwiftPackageReference "KRProgressHUD" */, + F9D63D2327CD12AA00F4DC5F /* XCRemoteSwiftPackageReference "MnemonicSwift" */, + F9D63D2727CD131300F4DC5F /* XCRemoteSwiftPackageReference "PaginatedTableView" */, + F9D63D2A27CD132800F4DC5F /* XCRemoteSwiftPackageReference "NotificationBubbles" */, + ); productRefGroup = 0D907F132322CC5900D641FE /* Products */; projectDirPath = ""; projectRoot = ""; @@ -481,6 +469,7 @@ 0D8BB46223B1DA0700D5E2A1 /* LaunchScreen.storyboard in Resources */, 0D8BB46323B1DA0700D5E2A1 /* Assets.xcassets in Resources */, 0D8BB46423B1DA0700D5E2A1 /* Main.storyboard in Resources */, + F94912642790D7C4004BB3DE /* ZcashLightClientSample-Mainnet-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -491,6 +480,7 @@ 0D907F202322CC5B00D641FE /* LaunchScreen.storyboard in Resources */, 0D907F1D2322CC5B00D641FE /* Assets.xcassets in Resources */, 0D907F1B2322CC5900D641FE /* Main.storyboard in Resources */, + F94912632790D7C4004BB3DE /* ZcashLightClientSample-Mainnet-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -511,28 +501,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0D8BB44F23B1DA0700D5E2A1 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ZcashLightClientSample-Mainnet-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; 0D8BB45023B1DA0700D5E2A1 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -567,106 +535,6 @@ shellPath = /bin/sh; shellScript = "cd ../../\nif which swiftlint >/dev/null; then\n swiftlint lint --config .swiftlint.yml\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; - 33EFC5F94E60AC06AD108A01 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ZcashLightClientSample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - A18B8A4D55F1DF8B808ABB67 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ZcashLightClientSample-Mainnet/Pods-ZcashLightClientSample-Mainnet-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ZcashLightClientSample-Mainnet/Pods-ZcashLightClientSample-Mainnet-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZcashLightClientSample-Mainnet/Pods-ZcashLightClientSample-Mainnet-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - A715D89E618E44427C0608E2 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ZcashLightClientSampleTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - A80B091D1115175E507D0D44 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ZcashLightClientSampleUITests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - AD38BD608A7D4F64E720F342 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ZcashLightClientSample/Pods-ZcashLightClientSample-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ZcashLightClientSample/Pods-ZcashLightClientSample-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZcashLightClientSample/Pods-ZcashLightClientSample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -729,7 +597,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 0D907F362322CC5B00D641FE /* ZcashLightClientSampleUITests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -770,7 +637,6 @@ /* Begin XCBuildConfiguration section */ 0D8BB46A23B1DA0700D5E2A1 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 90F55027AEE5406E35644223 /* Pods-ZcashLightClientSample-Mainnet.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -792,7 +658,6 @@ }; 0D8BB46B23B1DA0700D5E2A1 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 47991618469ABD2A7FE69E73 /* Pods-ZcashLightClientSample-Mainnet.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -934,7 +799,6 @@ }; 0D907F3B2322CC5B00D641FE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 93F435FD5C95BEE3BC7BBC28 /* Pods-ZcashLightClientSample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -958,7 +822,6 @@ }; 0D907F3C2322CC5B00D641FE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1BEB1273671D6E7883C81472 /* Pods-ZcashLightClientSample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -982,7 +845,6 @@ }; 0D907F3E2322CC5B00D641FE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 501B4B56030ED65B9C170CE2 /* Pods-ZcashLightClientSampleTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -1004,7 +866,6 @@ }; 0D907F3F2322CC5B00D641FE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BEA142AE2F3C339269CBA120 /* Pods-ZcashLightClientSampleTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -1026,7 +887,6 @@ }; 0D907F412322CC5B00D641FE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 81B2AC726EA5CC3FEF521F84 /* Pods-ZcashLightClientSampleUITests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; @@ -1047,7 +907,6 @@ }; 0D907F422322CC5B00D641FE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2460FDF219C57FCA6113E129 /* Pods-ZcashLightClientSampleUITests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; @@ -1115,6 +974,68 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + F9D63D2027CD125300F4DC5F /* XCRemoteSwiftPackageReference "KRProgressHUD" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/krimpedance/KRProgressHUD.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 3.0.0; + }; + }; + F9D63D2327CD12AA00F4DC5F /* XCRemoteSwiftPackageReference "MnemonicSwift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/zcash-hackworks/MnemonicSwift.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 2.0.0; + }; + }; + F9D63D2727CD131300F4DC5F /* XCRemoteSwiftPackageReference "PaginatedTableView" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/dh-ecc/PaginatedTableView"; + requirement = { + branch = master; + kind = branch; + }; + }; + F9D63D2A27CD132800F4DC5F /* XCRemoteSwiftPackageReference "NotificationBubbles" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/pacu/NotificationBubbles.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + F9D63D1E27CD114A00F4DC5F /* ZcashLightClientKit */ = { + isa = XCSwiftPackageProductDependency; + productName = ZcashLightClientKit; + }; + F9D63D2127CD125300F4DC5F /* KRProgressHUD */ = { + isa = XCSwiftPackageProductDependency; + package = F9D63D2027CD125300F4DC5F /* XCRemoteSwiftPackageReference "KRProgressHUD" */; + productName = KRProgressHUD; + }; + F9D63D2427CD12AA00F4DC5F /* MnemonicSwift */ = { + isa = XCSwiftPackageProductDependency; + package = F9D63D2327CD12AA00F4DC5F /* XCRemoteSwiftPackageReference "MnemonicSwift" */; + productName = MnemonicSwift; + }; + F9D63D2827CD131300F4DC5F /* PaginatedTableView */ = { + isa = XCSwiftPackageProductDependency; + package = F9D63D2727CD131300F4DC5F /* XCRemoteSwiftPackageReference "PaginatedTableView" */; + productName = PaginatedTableView; + }; + F9D63D2B27CD132800F4DC5F /* NotificationBubbles */ = { + isa = XCSwiftPackageProductDependency; + package = F9D63D2A27CD132800F4DC5F /* XCRemoteSwiftPackageReference "NotificationBubbles" */; + productName = NotificationBubbles; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 0D907F0A2322CC5900D641FE /* Project object */; } diff --git a/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 9b56a154..919434a6 100644 --- a/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..e6ed947a --- /dev/null +++ b/Example/ZcashLightClientSample/ZcashLightClientSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,151 @@ +{ + "object": { + "pins": [ + { + "package": "grpc-swift", + "repositoryURL": "https://github.com/grpc/grpc-swift.git", + "state": { + "branch": null, + "revision": "5cc08ebf77e68598bfe4c793927d0f2838598607", + "version": "1.6.1" + } + }, + { + "package": "KRActivityIndicatorView", + "repositoryURL": "https://github.com/krimpedance/KRActivityIndicatorView.git", + "state": { + "branch": null, + "revision": "bcb0e841d6de0cd343a32bd5056580a56d06c0bc", + "version": "3.0.7" + } + }, + { + "package": "KRProgressHUD", + "repositoryURL": "https://github.com/krimpedance/KRProgressHUD.git", + "state": { + "branch": null, + "revision": "265142816d8f8ea93840accaf4ac7c49998e77c2", + "version": "3.4.7" + } + }, + { + "package": "libzcashlc", + "repositoryURL": "https://github.com/dh-ecc/libzcashlc.git", + "state": { + "branch": "main", + "revision": "900dbfe0bc8c0e5f4774bf038678292ee5de0150", + "version": null + } + }, + { + "package": "MnemonicSwift", + "repositoryURL": "https://github.com/zcash-hackworks/MnemonicSwift.git", + "state": { + "branch": null, + "revision": "27711179a75a1172d6f04ceb5d86419cf0cba401", + "version": "2.1.0" + } + }, + { + "package": "NotificationBubbles", + "repositoryURL": "https://github.com/pacu/NotificationBubbles.git", + "state": { + "branch": null, + "revision": "ae6d47f3a415c9eec5daa8e04d040c0e68654f00", + "version": "1.0.0" + } + }, + { + "package": "PaginatedTableView", + "repositoryURL": "https://github.com/dh-ecc/PaginatedTableView", + "state": { + "branch": "master", + "revision": "a3fd9f079d6c9ac3095ee3ef2369a68c29ba04db", + "version": null + } + }, + { + "package": "SQLite.swift", + "repositoryURL": "https://github.com/stephencelis/SQLite.swift.git", + "state": { + "branch": null, + "revision": "60a65015f6402b7c34b9a924f755ca0a73afeeaa", + "version": "0.13.1" + } + }, + { + "package": "swift-crypto", + "repositoryURL": "https://github.com/apple/swift-crypto.git", + "state": { + "branch": null, + "revision": "a8911e0fadc25aef1071d582355bd1037a176060", + "version": "2.0.4" + } + }, + { + "package": "swift-log", + "repositoryURL": "https://github.com/apple/swift-log.git", + "state": { + "branch": null, + "revision": "5d66f7ba25daf4f94100e7022febf3c75e37a6c7", + "version": "1.4.2" + } + }, + { + "package": "swift-nio", + "repositoryURL": "https://github.com/apple/swift-nio.git", + "state": { + "branch": null, + "revision": "51c3fc2e4a0fcdf4a25089b288dd65b73df1b0ef", + "version": "2.37.0" + } + }, + { + "package": "swift-nio-extras", + "repositoryURL": "https://github.com/apple/swift-nio-extras.git", + "state": { + "branch": null, + "revision": "f73ca5ee9c6806800243f1ac415fcf82de9a4c91", + "version": "1.10.2" + } + }, + { + "package": "swift-nio-http2", + "repositoryURL": "https://github.com/apple/swift-nio-http2.git", + "state": { + "branch": null, + "revision": "6e94a7be32891d1b303a3fcfde8b5bf64d162e74", + "version": "1.19.1" + } + }, + { + "package": "swift-nio-ssl", + "repositoryURL": "https://github.com/apple/swift-nio-ssl.git", + "state": { + "branch": null, + "revision": "52a486ff6de9bc3e26bf634c5413c41c5fa89ca5", + "version": "2.17.2" + } + }, + { + "package": "swift-nio-transport-services", + "repositoryURL": "https://github.com/apple/swift-nio-transport-services.git", + "state": { + "branch": null, + "revision": "8ab824b140d0ebcd87e9149266ddc353e3705a3e", + "version": "1.11.4" + } + }, + { + "package": "SwiftProtobuf", + "repositoryURL": "https://github.com/apple/swift-protobuf.git", + "state": { + "branch": null, + "revision": "7e2c5f3cbbeea68e004915e3a8961e20bd11d824", + "version": "1.18.0" + } + } + ] + }, + "version": 1 +} diff --git a/Example/ZcashLightClientSample/ZcashLightClientSample.xcworkspace/contents.xcworkspacedata b/Example/ZcashLightClientSample/ZcashLightClientSample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 809ee900..00000000 --- a/Example/ZcashLightClientSample/ZcashLightClientSample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Example/ZcashLightClientSample/ZcashLightClientSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/ZcashLightClientSample/ZcashLightClientSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/Example/ZcashLightClientSample/ZcashLightClientSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Example/ZcashLightClientSample/ZcashLightClientSample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Example/ZcashLightClientSample/ZcashLightClientSample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/Example/ZcashLightClientSample/ZcashLightClientSample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/Example/ZcashLightClientSample/ZcashLightClientSample/Get Balance/GetBalanceViewController.swift b/Example/ZcashLightClientSample/ZcashLightClientSample/Get Balance/GetBalanceViewController.swift index be27d888..dccefe0e 100644 --- a/Example/ZcashLightClientSample/ZcashLightClientSample/Get Balance/GetBalanceViewController.swift +++ b/Example/ZcashLightClientSample/ZcashLightClientSample/Get Balance/GetBalanceViewController.swift @@ -8,6 +8,7 @@ import UIKit import ZcashLightClientKit + class GetBalanceViewController: UIViewController { @IBOutlet weak var balance: UILabel! @IBOutlet weak var verified: UILabel! diff --git a/Example/ZcashLightClientSample/ZcashLightClientSampleUITests/Info.plist b/Example/ZcashLightClientSample/ZcashLightClientSampleUITests/Info.plist deleted file mode 100644 index 6c40a6cd..00000000 --- a/Example/ZcashLightClientSample/ZcashLightClientSampleUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Example/ZcashLightClientSample/ZcashLightClientSampleUITests/ZcashLightClientSampleUITests.swift b/Example/ZcashLightClientSample/ZcashLightClientSampleUITests/ZcashLightClientSampleUITests.swift deleted file mode 100644 index 7e2c98a8..00000000 --- a/Example/ZcashLightClientSample/ZcashLightClientSampleUITests/ZcashLightClientSampleUITests.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// ZcashLightClientSampleUITests.swift -// ZcashLightClientSampleUITests -// -// Created by Francisco Gindre on 06/09/2019. -// Copyright © 2019 Electric Coin Company. All rights reserved. -// - -import XCTest - -class ZcashLightClientSampleUITests: XCTestCase { - - override func setUp() { - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - - // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. - XCUIApplication().launch() - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() { - // Use recording to get started writing UI tests. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - -} diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 00000000..502dc50c --- /dev/null +++ b/Package.resolved @@ -0,0 +1,97 @@ +{ + "object": { + "pins": [ + { + "package": "grpc-swift", + "repositoryURL": "https://github.com/grpc/grpc-swift.git", + "state": { + "branch": null, + "revision": "5cc08ebf77e68598bfe4c793927d0f2838598607", + "version": "1.6.1" + } + }, + { + "package": "SQLite.swift", + "repositoryURL": "https://github.com/stephencelis/SQLite.swift.git", + "state": { + "branch": null, + "revision": "60a65015f6402b7c34b9a924f755ca0a73afeeaa", + "version": "0.13.1" + } + }, + { + "package": "swift-log", + "repositoryURL": "https://github.com/apple/swift-log.git", + "state": { + "branch": null, + "revision": "5d66f7ba25daf4f94100e7022febf3c75e37a6c7", + "version": "1.4.2" + } + }, + { + "package": "swift-nio", + "repositoryURL": "https://github.com/apple/swift-nio.git", + "state": { + "branch": null, + "revision": "51c3fc2e4a0fcdf4a25089b288dd65b73df1b0ef", + "version": "2.37.0" + } + }, + { + "package": "swift-nio-extras", + "repositoryURL": "https://github.com/apple/swift-nio-extras.git", + "state": { + "branch": null, + "revision": "f73ca5ee9c6806800243f1ac415fcf82de9a4c91", + "version": "1.10.2" + } + }, + { + "package": "swift-nio-http2", + "repositoryURL": "https://github.com/apple/swift-nio-http2.git", + "state": { + "branch": null, + "revision": "6e94a7be32891d1b303a3fcfde8b5bf64d162e74", + "version": "1.19.1" + } + }, + { + "package": "swift-nio-ssl", + "repositoryURL": "https://github.com/apple/swift-nio-ssl.git", + "state": { + "branch": null, + "revision": "52a486ff6de9bc3e26bf634c5413c41c5fa89ca5", + "version": "2.17.2" + } + }, + { + "package": "swift-nio-transport-services", + "repositoryURL": "https://github.com/apple/swift-nio-transport-services.git", + "state": { + "branch": null, + "revision": "8ab824b140d0ebcd87e9149266ddc353e3705a3e", + "version": "1.11.4" + } + }, + { + "package": "SwiftProtobuf", + "repositoryURL": "https://github.com/apple/swift-protobuf.git", + "state": { + "branch": null, + "revision": "7e2c5f3cbbeea68e004915e3a8961e20bd11d824", + "version": "1.18.0" + } + }, + { + "package": "libzcashlc", + "repositoryURL": "https://github.com/zcash-hackworks/zcash-light-client-ffi.git", + "state": { + "branch": "main", + "revision": "e5aaf60faf16554e47e4bb123a8b4e5c22475e9f", + "version": null + } + } + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 00000000..783abe20 --- /dev/null +++ b/Package.swift @@ -0,0 +1,61 @@ +// swift-tools-version:5.5 +import PackageDescription + +let package = Package( + name: "ZcashLightClientKit", + platforms: [ + .iOS(.v12), + .macOS(.v10_12) + ], + products: [ + .library( + name: "ZcashLightClientKit", + targets: ["ZcashLightClientKit"] + ), + ], + dependencies: [ + .package(url: "https://github.com/grpc/grpc-swift.git", from: "1.0.0"), + .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.13.0"), + .package(name:"libzcashlc", url: "https://github.com/zcash-hackworks/zcash-light-client-ffi.git", branch: "main"), + ], + targets: [ + .target( + name: "ZcashLightClientKit", + dependencies: [ + .product(name: "SQLite", package: "SQLite.swift"), + .product(name: "GRPC", package: "grpc-swift"), + .product(name: "libzcashlc", package: "libzcashlc"), + ], + exclude: [ + "Service/ProtoBuf/proto/compact_formats.proto", + "Service/ProtoBuf/proto/service.proto", + "Stencil" + ] + ), + .target( + name: "TestUtils", + dependencies: ["ZcashLightClientKit"], + path: "Tests/TestUtils", + exclude: [ + "proto/darkside.proto" + ], + resources: [ + .copy("test_data.db"), + .copy("cache.db"), + .copy("ZcashSdk_Data.db"), + ] + ), + .testTarget( + name: "OfflineTests", + dependencies: ["ZcashLightClientKit", "TestUtils"] + ), + .testTarget( + name: "NetworkTests", + dependencies: ["ZcashLightClientKit", "TestUtils"] + ), + .testTarget( + name: "DarksideTests", + dependencies: ["ZcashLightClientKit", "TestUtils"] + ) + ] +) diff --git a/README.md b/README.md index ef980805..86ad394d 100644 --- a/README.md +++ b/README.md @@ -16,124 +16,45 @@ This is an alpha build and is currently under active development. Please be advi - Developers using this SDK must familiarize themselves with the current [threat model](https://zcash.readthedocs.io/en/latest/rtd_pages/wallet_threat_model.html), especially the known weaknesses described there. -# Build dependencies +# Installation -ZcashLightClientKit uses a rust library called Librustzcash. In order to build it, you need to have rust and cargo installed on your environment. +## Swift Package Manager -Install [Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) following these directions, and then install `cargo-lipo` and add the appropriate architectures using `rustup` with the following example: +Add a package with the source "https://github.com/zcash/ZcashLightClientKit.git" and from version "0.13.0" onwards in either Xcode's GUI or in your "Package.swift" file -``` -$ cargo install cargo-lipo -$ rustup target add aarch64-apple-ios x86_64-apple-ios +## Cocoapods Support + +1. Add the following to the top of your podfile to resolve downstream dependencies. + +```ruby +source "https://github.com/dh-ecc/CocoaPodsSpecs.git" +source "https://cdn.cocoapods.org/" ``` -# Cocoapods Support - -## Installing ZcashLightClientKit as a Contributor -``` ruby -use_frameworks! - -pod 'ZcashLightClientKit', :path => '../../', :testspecs => ['Tests'] # include testspecs if you want to run the tests -``` - -## Installing ZcashLightClientKit as a wallet app developer -```` ruby -use_frameworks! - -pod 'ZcashLightClientKit' -```` - -### Custom build phases warning -When running `pod install` you will see this warning upon success: -```` bash -[!] ZcashLightClientKit has added 2 script phases. Please inspect before executing a build. -See `https://guides.cocoapods.org/syntax/podspec.html#script_phases` for more information. -```` -Integrating Rust code with Swift code and delivering it in a consistent and (build) reproducible way, is hard. We've taken the lead to get that burden off your shoulders as much as possible by leveraging the `prepare_command` and `script_phases` features from Cocoapods to carefully generate a build for the Rust layer. - -## Build system - -This section explains the 'Build System' that integrates the rust code and creates the corresponding environment. - -### Overview - -There are some basic steps to build ZcashLightClientKit. Even though they are 'basic' they can be cumbersome. So we automated them in scripts. - -**1. Pod install and `prepare_command`** - -ZcashLightClientKit needs files to be present at pod installation time, but that can't be defined properly yet and depend on librustzcash building properly and for an environment to be set up at build time. For know we just need to let Cocoapods that these files exist: - -- `${ZCASH_POD_SRCROOT}/zcashlc/libzcashlc.a` this is the librustzcash build .a file itself -- `lib/libzcashlc.a` (as vendored library that will be added as an asset by xcodeproj) - - -**2. Build Phase** - -The build Phase scripts executes within the Xcode Build Step and has all the known variables of a traditional build at hand. - -```` ruby -s.script_phase = { - :name => 'Build generate constants and build librustzcash', - :script => 'sh ${PODS_TARGET_SRCROOT}/Scripts/build_librustzcash_xcode.sh', - :execution_position => :before_compile - } -```` - -This step will generate files needed on the next steps and build the librustzcash with Xcode but *not using cargo's built-in Xcode integration* - -** Building librustzcash and integrating it to the pod structure** - -Where the magic happens. Here we will make sure that everything is set up properly to start building librustzcash. When on mainnet, the build will append a parameter to include mainnet features. - -### Scripts - -On the Scripts folder you will find the following files: -```` - | Scripts - |-/prepare_zcash_sdk.sh - |-/generate_test_constants.sh - |-/build_librustzcash_xcode.sh - |-/build_librustzcash.sh - |-/script_commons.sh - ```` - -#### prepare_zcash_sdk.sh -This script is run by the Cocoapods 'prepare_command'. - -```` Ruby -s.prepare_command = <<-CMD - sh Scripts/prepare_zcash_sdk.sh - CMD -```` -It basically creates empty files that cocoapods needs to pick up on its pod structure but that are still not present in the file system and that will be generated in later build phases. - -NOTE: pod install will only run this phase when no Pods/ folder is present or if your pod hash has changed or is not present on manifest.lock. When in doubt, just clean the Pods/ folder and start over. That usually gets rid of weirdness caused by Xcode caching a lot of stuff you are not aware of. - -#### script_commons.sh -A lot of important environment variables and helper functions live in the `script_commons.sh`. - +2. Add `pod "ZcashLightClientKit", ~> "0.13.0"` to the target you want to add the kit too. # Testing -Currently tests depend on a `lightwalletd` server instance running locally or remotely to pass. -To know more about running `lightwalletd`, refer to its repo https://github.com/zcash/lightwalletd +The best way to run tests is to open "Package.swift" in Xcode and use the Test panel and target an iOS device. Tests will build and run for a Mac target but are not currently working as expected. -## Pointing tests to a lightwalletd instance +There are three test targets grouped by external requirements: +1. `OfflineTests` + - No external requirements. +2. `NetworkTests` + - Require an active internet connection. +3. `DarksideTests` + - Require an instance of `lightwalletd` to be running while the tests are being run, see below for some information on how to set up. (Darkside refers to a mode in lightwalletd that allows it to be updated to represent/mock different states of the underlying blockchain.) -Tests use `Sourcery` to generate a Constants file which injects the `lightwalletd` server address to the test themselves. +## lightwalletd -### Installing sourcery - -Refer to the official repo https://github.com/krzysztofzablocki/Sourcery - -### Setting env-var.sh file to run locally - -Create a file called `env-var.sh` on the project root to create the `LIGHTWALLETD_ADDRESS` environment variable on build time. +The `DarksideTests` test target depend on a `lightwalletd` server instance running locally (or remotely). For convenience, we have added a universal (Mac) `lightwalletd` binary (in `Tests/lightwalletd/lightwalletd) and it can be run locally for use by the tests with the following command: ``` -export LIGHTWALLETD_ADDRESS="localhost%3a9067" +Tests/lightwalletd/lightwalletd --no-tls-very-insecure --data-dir /tmp --darkside-very-insecure --log-file /dev/stdout ``` +You can find out more about running `lightwalletd`, from the main repo https://github.com/zcash/lightwalletd. + ### Integrating with CD/CI The `LIGHTWALLETD_ADDRESS` environment variable can also be added to your shell of choice and `xcodebuild` will pick it up accordingly. @@ -166,44 +87,8 @@ For more details look the Sample App's `AppDelegate` code. # Swiftlint We don't like reinventing the wheel, so we gently borrowed swift lint rules from AirBnB which we find pretty cool and reasonable. - -## Troubleshooting - -#### clean pod install -it's not necessary to delete the whole Pods/ directory and download all of your dependencies again -1. on your project root, locate the `Pods/` directory -2. remove ZcashLightClientKit from it -3. clean derived data from Xcode -4. close Xcode -5. run `pod install` (run --verbose to see more details) -6. open Xcode project -7. build - -### _function_name referenced from... -if you get a build error similar to ```_function_name referenced from...``` - -* on your project root directory * -1. remove the 'Pods' directory ``` rm -rf Pods/``` -2. delete derived data and clean -3. run `pod install` -4. build - -### can't find crate for ... target may not be installed -This error could be a side effect of having more then one rust toolchain installed. -If you worked with ZcashLightClientKit 0.6.6 or below you might have had to set the compiler to 1.40.0 which can cause this compilation error to happen. -make sure that the directory that you are working on has the correct rust environment. -You can do so by calling `rustup show` in the working directory. - -### Building in Apple Silicon -So far we have come up with this set up (april 2021) - -* Clone a terminal and run it in rosetta mode -* Clone your Xcode of choice and run it in rosetta mode -* Installing the right toolchain for cargo - * `rustup toolchain add stable-x86_64-apple-darwin` - * `rustup target add aarch64-apple-ios x86_64-apple-darwin x86_64-apple-ios` -## Versioning +# Versioning This project follows [semantic versioning](https://semver.org/) with pre-release versions. An example of a valid version number is `1.0.4-alpha11` denoting the `11th` iteration of the `alpha` pre-release of version `1.0.4`. Stable releases, such as `1.0.4` will not contain any pre-release identifiers. Pre-releases include the following, in order of stability: `alpha`, `beta`, `rc`. Version codes offer a numeric representation of the build name that always increases. The first six significant digits represent the major, minor and patch number (two digits each) and the last 3 significant digits represent the pre-release identifier. The first digit of the identifier signals the build type. Lastly, each new build has a higher version code than all previous builds. The following table breaks this down: diff --git a/Scripts/build_librustzcash.sh b/Scripts/build_librustzcash.sh deleted file mode 100644 index c993360e..00000000 --- a/Scripts/build_librustzcash.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -BASEPATH="${PWD}" -TARGET_DIR="target" - - -LIB_PATH="ZcashLightClientKit/$FLAVOR_FOLDER/zcashlc" -echo "++++ Building librustzcash $NETWORK_TYPE library ++++" - - -if [ -f $TARGET_DIR ]; then - rm -rf $TARGET_DIR -fi - -cargo lipo --manifest-path ${PODS_TARGET_SRCROOT}/Cargo.toml --release - - -if [ -f $LIB_PATH ]; then - rm -rf $LIB_PATH - mkdir -p $LIB_PATH -fi - -cp -rf $TARGET_DIR/universal/release/* $LIB_PATH diff --git a/Scripts/build_librustzcash_xcode.sh b/Scripts/build_librustzcash_xcode.sh deleted file mode 100755 index 6325b4f3..00000000 --- a/Scripts/build_librustzcash_xcode.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh - -set -x - -SCRIPT_COMMONS="${PODS_TARGET_SRCROOT}/Scripts/script_commons.sh" -if [ ! -f $SCRIPT_COMMONS ]; then - echo "Failed to load $SCRIPT_COMMONS" - exit 1 -fi - source $SCRIPT_COMMONS - -if [ "$ACTION" = "clean" ]; then - echo "CLEAN DETECTED" - clean - exit 0 -fi - -echo "Building Rust backend" -echo "" -echo "platform name" -echo $PLATFORM_NAME -if [ $PLATFORM_NAME = "iphonesimulator" ]; then - ZCASH_ACTIVE_ARCHITECTURE="aarch64-apple-ios-sim x86_64-apple-ios" - RUSTUP_TOOLCHAIN="stable" -else - ZCASH_ACTIVE_ARCHITECTURE="aarch64-apple-ios" - RUSTUP_TOOLCHAIN="stable" -fi - -echo "fix 'permission denied issue'" -chmod -R +w ${PODS_TARGET_SRCROOT} - -echo "RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN} cargo build --manifest-path ${PODS_TARGET_SRCROOT}/Cargo.toml --target $ZCASH_ACTIVE_ARCHITECTURE --release" -if [[ -n "${DEVELOPER_SDK_DIR:-}" ]]; then - # Assume we're in Xcode, which means we're probably cross-compiling. - # In this case, we need to add an extra library search path for build scripts and proc-macros, - # which run on the host instead of the target. - # (macOS Big Sur does not have linkable libraries in /usr/lib/.) - echo "export LIBRARY_PATH=\"${DEVELOPER_SDK_DIR}/MacOSX.sdk/usr/lib:${LIBRARY_PATH:-}\"" - export LIBRARY_PATH="${DEVELOPER_SDK_DIR}/MacOSX.sdk/usr/lib:${LIBRARY_PATH:-}" -fi -if [ ! -f ${ZCASH_LIB_RUST_BUILD_PATH}/universal/release/${ZCASH_LIB_RUST_NAME} ]; then - RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN} cargo lipo --manifest-path ${PODS_TARGET_SRCROOT}/Cargo.toml --targets $ZCASH_ACTIVE_ARCHITECTURE --release - persist_environment -fi - - - -if [ ! -d "${RUST_LIB_PATH}" ]; then - mkdir -p "${RUST_LIB_PATH}" -fi - -echo "clean up existing artifacts: rm -f ${ZCASH_SDK_RUST_LIB_PATH}/${ZCASH_LIB_RUST_NAME}" -rm -f "${ZCASH_SDK_RUST_LIB_PATH}/${ZCASH_LIB_RUST_NAME}" -echo "clean up sdk lib path: rm -f ${RUST_LIB_PATH}/${ZCASH_LIB_RUST_NAME}" - -rm -f "${RUST_LIB_PATH}/${ZCASH_LIB_RUST_NAME}" -echo "copying artifacts: cp -f ${ZCASH_LIB_RUST_BUILD_PATH}/universal/release/${ZCASH_LIB_RUST_NAME} ${ZCASH_SDK_RUST_LIB_PATH}/${ZCASH_LIB_RUST_NAME}" -# ALWAYS SHIP RELEASE NO MATTER WHAT YOUR BUILD IS (FOR NOW AT LEAST) -cp -f "${ZCASH_LIB_RUST_BUILD_PATH}/universal/release/${ZCASH_LIB_RUST_NAME}" "${ZCASH_SDK_RUST_LIB_PATH}/${ZCASH_LIB_RUST_NAME}" -echo "copying artifacts: cp -f ${ZCASH_LIB_RUST_BUILD_PATH}/universal/release/${ZCASH_LIB_RUST_NAME} ${RUST_LIB_PATH}/${ZCASH_LIB_RUST_NAME}" -cp -f "${ZCASH_LIB_RUST_BUILD_PATH}/universal/release/${ZCASH_LIB_RUST_NAME}" "${RUST_LIB_PATH}/${ZCASH_LIB_RUST_NAME}" - diff --git a/Scripts/generate_test_constants.sh b/Scripts/generate_test_constants.sh deleted file mode 100644 index 67a06336..00000000 --- a/Scripts/generate_test_constants.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -#check if env-vars.sh exists -ENV_VARS_PATH=${PODS_TARGET_SRCROOT}/env-vars.sh -if [ -f $ENV_VARS_PATH ]; then - source $ENV_VARS_PATH - echo "importing $ENV_VARS_PATH" -fi - -export ZCASH_TEST_SRC_PATH="${PODS_TARGET_SRCROOT}/ZcashLightClientKitTests" -if [ ! ${LIGHTWALLETD_ADDRESS} ]; then - echo "LIGHTWALLETD_ADDRESS VARIABLE NOT DEFINED" - exit 1 -fi -echo "export ZCASH_TEST_SRC_PATH=$ZCASH_TEST_SRC_PATH" -#no `else` case needed if the CI works as expected -sourcery --templates "${ZCASH_TEST_SRC_PATH}/Stencil" --sources ${ZCASH_TEST_SRC_PATH} --output ${ZCASH_TEST_SRC_PATH} --args addr=$LIGHTWALLETD_ADDRESS diff --git a/Scripts/prepare_zcash_sdk.sh b/Scripts/prepare_zcash_sdk.sh deleted file mode 100644 index 21c6ef3b..00000000 --- a/Scripts/prepare_zcash_sdk.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -echo "PWD: ${PWD}" - -echo "*********************************************" -echo "* create fake .a so pod install picks it up *" -echo "*********************************************" -RUST_LIB_PATH="${PWD}"/lib -mkdir -p -v $RUST_LIB_PATH -echo "******************************************************************************" -echo " touch $RUST_LIB_PATH/libzcashlc.a " -echo "******************************************************************************" -touch $RUST_LIB_PATH/libzcashlc.a - - -ZCASH_POD_ROOT="${PWD}" -ZCASH_POD_SRCROOT="${ZCASH_POD_ROOT}/ZcashLightClientKit" -ZCASH_SDK_GENERATED_SOURCES_FOLDER="${ZCASH_POD_SRCROOT}/Generated" - -echo "***************************************************************************" -echo " touch ${ZCASH_POD_ROOT}/zcashlc/libzcashlc.a" -echo "***************************************************************************" -touch ${ZCASH_POD_SRCROOT}/zcashlc/libzcashlc.a - -echo "***************************************************************************" -echo " touch ${ZCASH_POD_ROOT}/zcashlc/zcashlc.h" -echo "***************************************************************************" -touch ${ZCASH_POD_SRCROOT}/zcashlc/zcashlc.h diff --git a/Scripts/script_commons.sh b/Scripts/script_commons.sh deleted file mode 100644 index 1f88afd7..00000000 --- a/Scripts/script_commons.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -export PATH="$HOME/.cargo/bin:$PATH" -export RUST_LIB_PATH="${PODS_TARGET_SRCROOT}/lib" -export ZCASH_POD_SCRIPTS="${PODS_TARGET_SRCROOT}/Scripts" -export ZCASH_LIB_RUST_BUILD_PATH="${PODS_TARGET_SRCROOT}/target" - -export ZCASH_LIB_RUST_NAME="libzcashlc.a" - -export ZCASH_SRC_PATH="${PODS_TARGET_SRCROOT}/ZcashLightClientKit" -export ZCASH_SDK_RUST_LIB_PATH="${ZCASH_SRC_PATH}/zcashlc" - - -function clean { - echo "CLEAN DETECTED" - cargo clean - if [ -d "${RUST_LIB_PATH}" ]; then - rm -rf "${RUST_LIB_PATH}" - fi - if [ -d "${ZCASH_LIB_RUST_BUILD_PATH}" ]; then - rm -rf "${ZCASH_LIB_RUST_BUILD_PATH}" - fi -} diff --git a/Scripts/travis/ZcashLightClientSample_setup.sh b/Scripts/travis/ZcashLightClientSample_setup.sh deleted file mode 100755 index 4c4192e7..00000000 --- a/Scripts/travis/ZcashLightClientSample_setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -x - -APP_DIR=${TRAVIS_BUILD_DIR}/Example/ZcashLightClientSample -cd ${APP_DIR} - -pod install diff --git a/Scripts/travis/rust_setup.sh b/Scripts/travis/rust_setup.sh deleted file mode 100755 index dde117dc..00000000 --- a/Scripts/travis/rust_setup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -x - -rustup-init --verbose -y - -source $HOME/.cargo/env - -rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim -rustup toolchain add nightly-2021-09-24 -rustup +nightly-2021-09-24 target add aarch64-apple-ios-sim x86_64-apple-ios - -cargo install cargo-lipo \ No newline at end of file diff --git a/ZcashLightClientKit/Block/DatabaseStorage/CompactBlockStorage.swift b/Sources/ZcashLightClientKit/Block/DatabaseStorage/CompactBlockStorage.swift similarity index 100% rename from ZcashLightClientKit/Block/DatabaseStorage/CompactBlockStorage.swift rename to Sources/ZcashLightClientKit/Block/DatabaseStorage/CompactBlockStorage.swift diff --git a/ZcashLightClientKit/Block/DatabaseStorage/DatabaseMigrationManager.swift b/Sources/ZcashLightClientKit/Block/DatabaseStorage/DatabaseMigrationManager.swift similarity index 100% rename from ZcashLightClientKit/Block/DatabaseStorage/DatabaseMigrationManager.swift rename to Sources/ZcashLightClientKit/Block/DatabaseStorage/DatabaseMigrationManager.swift diff --git a/ZcashLightClientKit/Block/DatabaseStorage/StorageError.swift b/Sources/ZcashLightClientKit/Block/DatabaseStorage/StorageError.swift similarity index 100% rename from ZcashLightClientKit/Block/DatabaseStorage/StorageError.swift rename to Sources/ZcashLightClientKit/Block/DatabaseStorage/StorageError.swift diff --git a/ZcashLightClientKit/Block/DatabaseStorage/StorageManager.swift b/Sources/ZcashLightClientKit/Block/DatabaseStorage/StorageManager.swift similarity index 100% rename from ZcashLightClientKit/Block/DatabaseStorage/StorageManager.swift rename to Sources/ZcashLightClientKit/Block/DatabaseStorage/StorageManager.swift diff --git a/ZcashLightClientKit/Block/Downloader/BlockDownloader.swift b/Sources/ZcashLightClientKit/Block/Downloader/BlockDownloader.swift similarity index 100% rename from ZcashLightClientKit/Block/Downloader/BlockDownloader.swift rename to Sources/ZcashLightClientKit/Block/Downloader/BlockDownloader.swift diff --git a/ZcashLightClientKit/Block/Downloader/CompactBlockDownloaderBuilder.swift b/Sources/ZcashLightClientKit/Block/Downloader/CompactBlockDownloaderBuilder.swift similarity index 100% rename from ZcashLightClientKit/Block/Downloader/CompactBlockDownloaderBuilder.swift rename to Sources/ZcashLightClientKit/Block/Downloader/CompactBlockDownloaderBuilder.swift diff --git a/ZcashLightClientKit/Block/Processor/CompactBlockDownloadOperation.swift b/Sources/ZcashLightClientKit/Block/Processor/CompactBlockDownloadOperation.swift similarity index 100% rename from ZcashLightClientKit/Block/Processor/CompactBlockDownloadOperation.swift rename to Sources/ZcashLightClientKit/Block/Processor/CompactBlockDownloadOperation.swift diff --git a/ZcashLightClientKit/Block/Processor/CompactBlockEnhancementOperation.swift b/Sources/ZcashLightClientKit/Block/Processor/CompactBlockEnhancementOperation.swift similarity index 100% rename from ZcashLightClientKit/Block/Processor/CompactBlockEnhancementOperation.swift rename to Sources/ZcashLightClientKit/Block/Processor/CompactBlockEnhancementOperation.swift diff --git a/ZcashLightClientKit/Block/Processor/CompactBlockProcessor.swift b/Sources/ZcashLightClientKit/Block/Processor/CompactBlockProcessor.swift similarity index 100% rename from ZcashLightClientKit/Block/Processor/CompactBlockProcessor.swift rename to Sources/ZcashLightClientKit/Block/Processor/CompactBlockProcessor.swift diff --git a/ZcashLightClientKit/Block/Processor/CompactBlockScanningOperation.swift b/Sources/ZcashLightClientKit/Block/Processor/CompactBlockScanningOperation.swift similarity index 100% rename from ZcashLightClientKit/Block/Processor/CompactBlockScanningOperation.swift rename to Sources/ZcashLightClientKit/Block/Processor/CompactBlockScanningOperation.swift diff --git a/ZcashLightClientKit/Block/Processor/CompactBlockValidationInformation.swift b/Sources/ZcashLightClientKit/Block/Processor/CompactBlockValidationInformation.swift similarity index 100% rename from ZcashLightClientKit/Block/Processor/CompactBlockValidationInformation.swift rename to Sources/ZcashLightClientKit/Block/Processor/CompactBlockValidationInformation.swift diff --git a/ZcashLightClientKit/Block/Processor/FetchUnspentTxOutputsOperation.swift b/Sources/ZcashLightClientKit/Block/Processor/FetchUnspentTxOutputsOperation.swift similarity index 100% rename from ZcashLightClientKit/Block/Processor/FetchUnspentTxOutputsOperation.swift rename to Sources/ZcashLightClientKit/Block/Processor/FetchUnspentTxOutputsOperation.swift diff --git a/ZcashLightClientKit/Block/Processor/FigureNextBatchOperation.swift b/Sources/ZcashLightClientKit/Block/Processor/FigureNextBatchOperation.swift similarity index 100% rename from ZcashLightClientKit/Block/Processor/FigureNextBatchOperation.swift rename to Sources/ZcashLightClientKit/Block/Processor/FigureNextBatchOperation.swift diff --git a/ZcashLightClientKit/Block/Processor/ZcashOperation.swift b/Sources/ZcashLightClientKit/Block/Processor/ZcashOperation.swift similarity index 100% rename from ZcashLightClientKit/Block/Processor/ZcashOperation.swift rename to Sources/ZcashLightClientKit/Block/Processor/ZcashOperation.swift diff --git a/ZcashLightClientKit/Constants/WalletBirthday+Constants.swift b/Sources/ZcashLightClientKit/Constants/WalletBirthday+Constants.swift similarity index 100% rename from ZcashLightClientKit/Constants/WalletBirthday+Constants.swift rename to Sources/ZcashLightClientKit/Constants/WalletBirthday+Constants.swift diff --git a/ZcashLightClientKit/Constants/WalletBirthday+mainnet.swift b/Sources/ZcashLightClientKit/Constants/WalletBirthday+mainnet.swift similarity index 100% rename from ZcashLightClientKit/Constants/WalletBirthday+mainnet.swift rename to Sources/ZcashLightClientKit/Constants/WalletBirthday+mainnet.swift diff --git a/ZcashLightClientKit/Constants/WalletBirthday+testnet.swift b/Sources/ZcashLightClientKit/Constants/WalletBirthday+testnet.swift similarity index 99% rename from ZcashLightClientKit/Constants/WalletBirthday+testnet.swift rename to Sources/ZcashLightClientKit/Constants/WalletBirthday+testnet.swift index 00c4e207..964c753d 100644 --- a/ZcashLightClientKit/Constants/WalletBirthday+testnet.swift +++ b/Sources/ZcashLightClientKit/Constants/WalletBirthday+testnet.swift @@ -17,6 +17,7 @@ extension WalletBirthday { time: 1535262293, tree: "000000" ) + case 421720 ..< 425865: return WalletBirthday( height: 421720, @@ -24,6 +25,7 @@ extension WalletBirthday { time: 1550762014, tree: "015495a30aef9e18b9c774df6a9fcd583748c8bba1a6348e70f59bc9f0c2bc673b000f00000000018054b75173b577dc36f2c80dfc41f83d6716557597f74ec54436df32d4466d57000120f1825067a52ca973b07431199d5866a0d46ef231d08aa2f544665936d5b4520168d782e3d028131f59e9296c75de5a101898c5e53108e45baa223c608d6c3d3d01fb0a8d465b57c15d793c742df9470b116ddf06bd30d42123fdb7becef1fd63640001a86b141bdb55fd5f5b2e880ea4e07caf2bbf1ac7b52a9f504977913068a917270001dd960b6c11b157d1626f0768ec099af9385aea3f31c91111a8c5b899ffb99e6b0192acd61b1853311b0bf166057ca433e231c93ab5988844a09a91c113ebc58e18019fbfd76ad6d98cafa0174391546e7022afe62e870e20e16d57c4c419a5c2bb69" ) + case 425865 ..< 518000: return WalletBirthday( height: 425865, @@ -31,6 +33,7 @@ extension WalletBirthday { time: 1551215770, tree: "01881e4da7e4767ee8a144a32ab8a5719a513bb05854477773bb55e6cd7f15055201f8a99a3a5ae3528ec2fc0bda9652b6728aecb08bf364e06ac511fd6654d782720f019ef0b9bdd075c38519fa4ab8210fe7e94c609f52672796e33e3cab58b1602831000001f803bf338ff1526b2ca527288974cb9be3fe240a2eadb7507e46ba59eaddb9320129fc0148ac088a6aa509f8f64ef79fda92232020369b58a12b32c05b6f428f22015e3dd0950c442940bd015c2176f7c817f22104f54c61159727483188c539dc13000000013589be9e2d9e9e38fd78b1e8eaec5b5f5167bf7fd2b1c95c316fa366a24cac4c01a86b141bdb55fd5f5b2e880ea4e07caf2bbf1ac7b52a9f504977913068a917270001dd960b6c11b157d1626f0768ec099af9385aea3f31c91111a8c5b899ffb99e6b0192acd61b1853311b0bf166057ca433e231c93ab5988844a09a91c113ebc58e18019fbfd76ad6d98cafa0174391546e7022afe62e870e20e16d57c4c419a5c2bb69" ) + case 518000 ..< 523240: return WalletBirthday( height: 518000, @@ -38,6 +41,7 @@ extension WalletBirthday { time: 1560645743, tree: "01a4f5240a88a6eb4ffbda7961a1430506aad1a50ba011593f02c243d968feb0550010000140f91773b4ab669846e5bcb96f60e68256c49a27872a98e9d5ce50b30a0c434e0000018968663d6a7b444591de83f8a07223113f5de7e8203807adacc7677c3bcd4f420194c7ecac0ef6d702d475680ec32051fdf6368af0c459ab450009c001bcbf7a5300000001f0eead5192c3b3ab7208429877570676647e448210332c6da7e18660b142b80e01b98b14cab05247195b3b3be3dd8639bae99a0dd10bed1282ac25b62a134afd7200000000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 523240 ..< 620000: return WalletBirthday( height: 523240, @@ -45,6 +49,7 @@ extension WalletBirthday { time: 1561002603, tree: "01d3e02bc1c2d66762f370b329a3063067701ad66c44b40285686bc8ff25f5616f00100154bff87bd0bda3b70a6d7754eca261de15fee3cd9bc53073a232e07fc3261e27000001a54dcaccb4c5e578aef89f2a3b4e3c3d8a487e6e904c5da5916118d721948d07000000000118fa9c6fef4963049dc7002a13bb0021d5e950591e48c9e5f2cbd1199429b80401f0eead5192c3b3ab7208429877570676647e448210332c6da7e18660b142b80e01b98b14cab05247195b3b3be3dd8639bae99a0dd10bed1282ac25b62a134afd7200000000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 620000 ..< 680000: return WalletBirthday( height: 620000, @@ -52,6 +57,7 @@ extension WalletBirthday { time: 1569572035, tree: "0170cf036ea1ea3c6e08432e18b6a372ca0b8b83671cc13ab0cf9e28c182f6c36f00100000013f3fc2c16ac4780f1c472ca65534ab08911f325a9edde5ea7f24364b47c9a95300017621b12e518cbbbdb7511ab423e0bddda412ed61ed3cff5be2140de65d6a0069010576153a5a2098812e7a028c37c3398e186f398c9b07bc199784ab97e5535c3e0000019a6ce2f0f7dbb2de493a315abf62d8ca96ccc701f116b6ddfae33870a2183d3c01c9d3564eff54ebc328eab2e4f1150c3637f4f47516f879a0cfebdf49fe7b1d5201c104705fac60a85596010e41260d07f3a64f38f37a112eaef41cd9d736edc5270145e3d4899fcd7f0f1236ae31eafb3f4b65ad6b11a17eae1729cec09bd3afa01a000000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 680000 ..< 720000: return WalletBirthday( height: 680000, @@ -59,6 +65,7 @@ extension WalletBirthday { time: 1573569367, tree: "010a57f939a267f8b1e8b77288c783432e48fa95f7b22ead5e8ff46a788181453801d6457d98d3698a367aef4a2fe5675a575790d5d8081b731f979f0e64043fb7351001afaaf81d6d982b401444dbcf89e63c2583d234c1a60de17940a9b3a15f3494660001ba7acc730584a689413c44781d3b13cd497bfdca3fe27fb78cd9b50e9929906300000000000129e195df514840a20b95200b92d5b8d196b119cd6887508d8de077beffdbfe68016482af04b979e08e4e5760d55832292e55dbdd88143992f123840c8983db7b3f000001e3ec5d790cc9acc2586fc6e9ce5aae5f5aba32d33e386165c248c4a03ec8ed670000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 720000 ..< 740000: return WalletBirthday( height: 720000, @@ -66,6 +73,7 @@ extension WalletBirthday { time: 1575943651, tree: "012cfde48dff4f20ddc50a7aca3746f7d77920eebc8cf4ef53feac34cb8719c03a012c668d234aaa485862e1d06e46d6d7093c2581e2b9cda90aafd691d6e325410610014f3a875476cb8159d46fec1aba18c201c268cd61b01811b7e5bf83998fb8222500011f19160cc75325c090f3eb3fa0cff2d94e43e2713c89e7b02a34f6ed08fbcd26000001edc05305223f7f2839abc1dc7d900468349577d6d6f5c182ef3a81a848753b5b0000000129cbee0c11a827718f126d9e037155a9e173ee2d2ecf57dc68f7b66437d44f7301a113bcf163405e4286bc080ac55aa68555d2c9e63334e7b9a5eb756872f14c470001e3ec5d790cc9acc2586fc6e9ce5aae5f5aba32d33e386165c248c4a03ec8ed670000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 740000 ..< 760000: return WalletBirthday( height: 740000, @@ -73,6 +81,7 @@ extension WalletBirthday { time: 1577389695, tree: "0135ee37f83d0b924eed58bcceb249a4977dcb21495561b97bc747a272ebe5d6580010000001fe65cfbb8a76e0d29ac94e5ada80c80b607d1addfc287754f37ddef531eb122500013a1d604d978f716fcb2887cdaa3c582a608b795ed1b3c57998cbede2be479931000108ffb0fbc6b653305b37cd5568b85112b996cd514fe97ec73f7169dae0cef05101baf5541e853483315273c25c1956d233513c3dabd8741972136b2f8f8cd89035000129cbee0c11a827718f126d9e037155a9e173ee2d2ecf57dc68f7b66437d44f7301a113bcf163405e4286bc080ac55aa68555d2c9e63334e7b9a5eb756872f14c470001e3ec5d790cc9acc2586fc6e9ce5aae5f5aba32d33e386165c248c4a03ec8ed670000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 760000 ..< 780000: return WalletBirthday( height: 760000, @@ -80,6 +89,7 @@ extension WalletBirthday { time: 1578766903, tree: "01470a1a4d29374e074f07a646b95dd89892d9b84d235a89ecc9d5a52beadce901001001311898ce56df0ddb10dc573a54ea06d11415e72602daa80c01f888fbd4a9a734018610afa4925cdb8bd4dd75a53ab69a74080322cae53c630ac02ce00b09d3171601bdfbbde5011bd6c0620ed2db3e01d5daa2ff8bb5f3b58687d265dd33a5681d530197e268c82e56dfc62aeb54586a2000766da8078f09a2d15fb558ad05664b4c5301aa204407034ba59fce0eee6518688585e96b0f10befd595b8e68a8ae15328a51017389398c5634242b03ef811f6abf224df9e6fc6d4393139e526dca4cf44dcc2c0000017de4c2c210c617dc61a43e124cab93e4f6143e1e9e46c2e55a541a9781cde43c0129cbee0c11a827718f126d9e037155a9e173ee2d2ecf57dc68f7b66437d44f7301a113bcf163405e4286bc080ac55aa68555d2c9e63334e7b9a5eb756872f14c470001e3ec5d790cc9acc2586fc6e9ce5aae5f5aba32d33e386165c248c4a03ec8ed670000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 780000 ..< 798181: return WalletBirthday( height: 780000, @@ -87,6 +97,7 @@ extension WalletBirthday { time: 1580205978, tree: "011ed883b7eddb4783eee5b73ceee4c78413e1f6f9db3d88d1007f5fa62292955c001001861feaeab59bc31cd97ffc89467877abf8b9fa157bc875907eb90d6e8c723325000000000001ccc21a1d581eb6d3f35729f202f0014a59b4f9d41d92d44316b381f57dc8356b01ec0f418f21af87c0e0846b318be838bd181f25b708ee2b2fa030468399fb7932017de4c2c210c617dc61a43e124cab93e4f6143e1e9e46c2e55a541a9781cde43c0129cbee0c11a827718f126d9e037155a9e173ee2d2ecf57dc68f7b66437d44f7301a113bcf163405e4286bc080ac55aa68555d2c9e63334e7b9a5eb756872f14c470001e3ec5d790cc9acc2586fc6e9ce5aae5f5aba32d33e386165c248c4a03ec8ed670000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 798181 ..< 800000: return WalletBirthday( height: 798181, @@ -94,6 +105,7 @@ extension WalletBirthday { time: 1581521064, tree: "01901ef0f4221f8a02d5896fda6f78cb5578fb8e9a5361d5689bfb3b6ab92072320010000101c5d791d8748f0ab0ecdb48764de29c470cc74f5d95b5a1f8cf0830bb059b66015af654e998c75460e9c1f5ba185589c53c383167e66951cfe7684321b7a77e5c013faf6b3f21f03982ada477bfddc95b18e63683c497b2f4630ab453623c28974c01aff3253410a6601ab4b5b3626f2121cb77399c634b1774a4c63f415598d16b0c01a6158d0a1a1bec9dadc601b140a9fdfc7bdab7e232739a3cc0e0e46bbe3ef44301ccc21a1d581eb6d3f35729f202f0014a59b4f9d41d92d44316b381f57dc8356b01ec0f418f21af87c0e0846b318be838bd181f25b708ee2b2fa030468399fb7932017de4c2c210c617dc61a43e124cab93e4f6143e1e9e46c2e55a541a9781cde43c0129cbee0c11a827718f126d9e037155a9e173ee2d2ecf57dc68f7b66437d44f7301a113bcf163405e4286bc080ac55aa68555d2c9e63334e7b9a5eb756872f14c470001e3ec5d790cc9acc2586fc6e9ce5aae5f5aba32d33e386165c248c4a03ec8ed670000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 800000 ..< 850000: return WalletBirthday( height: 800000, @@ -101,6 +113,7 @@ extension WalletBirthday { time: 1581643886, tree: "011ba0f16f59489a9bf9cc46c3ed1108c1dc0ff6e40f3a38def472c3229a96925e01b0eb758757bde323a6417d98365ce8f6299b0fa3de615d6cda68689e6a81573d1001438b40ff7357432d987d6ef4826fba35d38b2db531ea842ccedd4916a6aff9580000017cd705c293895c8b4613a3de3ad3b8d43ae05fff808882db4c5e19917e2f346d00000000000000016f6df9b95ef63866bdf0e8b4b97701cd09232ec3e4e240808c0546d01bc7bb0501e3ec5d790cc9acc2586fc6e9ce5aae5f5aba32d33e386165c248c4a03ec8ed670000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 850000 ..< 900000: return WalletBirthday( height: 850000, @@ -108,6 +121,7 @@ extension WalletBirthday { time: 1585012771, tree: "01e3bd906376b563d184bfbf6616e220f895001b7ef9d26bf38c6cb5c71e57a42b001001d848adf8c38d113140bb30d306b0761da6987e25ffc0d82faa63c2764aab120301de3e6a35d09192cde3430860c70a534d7b63e95a726fab052de2a9befa3cc3320189b958fa030131bb83385a3e3a8b187a166dc1b3a02050f2d2fc20788536c30e0001cb8770ef198e7de60093a339afbc561c16c16749f9f96751c2fc58a22d0ff36f01f86ff70dd512f7075d02c5ee6e28a8824832d08025a4cfaf4c1854f1fba5da10019bcac1b44a27de2c4528fa6f4b3432913511b219cb3b29d137cac0236a3d244800000000016f6df9b95ef63866bdf0e8b4b97701cd09232ec3e4e240808c0546d01bc7bb0501e3ec5d790cc9acc2586fc6e9ce5aae5f5aba32d33e386165c248c4a03ec8ed670000011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 950000 ..< 1013250: return WalletBirthday( height: 950000, @@ -115,6 +129,7 @@ extension WalletBirthday { time: 1591609525, tree: "01f0637235c4a699d49ba996457a6c4eb7c67edd8270948065683deb19ef218363019f65a9692cefc7b90b42c1538ac1f38f7a7598549089c4561315b482f378523010000000000000018d30d0039277b05ab9e0c3990d53037c45892bf17af2d04fef40ed48c164ad2201ff5d86bbbe360e31378e783b740f8b05db2cf4246b95aa3851d22ed45554750300010cefb25743d5dd6062ef3afba438731cd5b35befc1038ecca3076fd205829e550001c19052386d8bbe3c07a1faf302281d67946cc9547e7e1890ff56b3a3ec69c0310001be53a6cd33da0442c7c6362c0172241f42e13c6dc893436a661a1cbf49775c1f00011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1013250 ..< 1028400: return WalletBirthday( height: 1013250, @@ -122,6 +137,7 @@ extension WalletBirthday { time: 1595516064, tree: "01d45e95007f8f97fe3c6a297a9d4bca917772e545fbcbb61b4f42d8a743eae31b0010013d7b7da2e6792dbfc6360f0c13a1ba879aa51a498c6dbab87aa57cef558cc35a00000001f945c15602617327026e3e0f231daf91570b32f7bb766f65e7e82131a911cc3c0000013173e9983fbd7a396e192e520d163be06cdd28abcfeba46c59dc62a400f589080001e7d5b00f0758cd3b7407c6d13e23d1a59e3f510c3dd3a4a8fc367a5305673b3f000001c787f900940720a3692e5694b085d5409dfa966017a6a48441c7e4b423b3144701be53a6cd33da0442c7c6362c0172241f42e13c6dc893436a661a1cbf49775c1f00011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1028400 ..< 1130000: return WalletBirthday( height: 1028400, @@ -129,6 +145,7 @@ extension WalletBirthday { time: 1596480151, tree: "01ac95378779cf56f0726655d248f95d63e07316ab67651ce357b346f9a7adba300107d7544edbe7d0522fe523df2ff804fc9f33f4844dd29e86a23fc7aa1818e237100001f8779a159482fd3a28c640e6d48ddfb37a44a26a102aae3822f32d2de22a1c70011f97534315f1800961bc78fcd1495e3b8047bb227e2776080fb31be6cae14e73000000000001fe15295e017fc2b8ba4ea1b7e53dd15f19860d10e7952905b7598373e143413e00019289038516ce3d6038cebe852ab5e32f7a1966fc79a1e41c7cb6e67e5a71c33d0001c787f900940720a3692e5694b085d5409dfa966017a6a48441c7e4b423b3144701be53a6cd33da0442c7c6362c0172241f42e13c6dc893436a661a1cbf49775c1f00011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1130000 ..< 1370446: return WalletBirthday( height: 1130000, @@ -136,6 +153,7 @@ extension WalletBirthday { time: 1603070117, tree: "01b00c3e6d98e706fdb2d40f082096505aaa70fb87c067baf1a8a6d25cccff7258015a5334276509c93b855db0c2a1252e2ca725821c9274add1c2e92631bbbfa12b100151ba8342564941385670cd7346dc753bb5cc61164f000f65044cc09baa175917019ed834b8b9c8ca58969b3f239d74c2dd4a7d0a462afb1e856cf76209b866eb660135de9af32480f38eeca478a33a95f495abe7470e93d5aa4813fab7ea4fd12c4c0000017ce3fc7ebc2f8cfc2e1ee9f8e92b6e45065679ee3b48b5b2f0ce053305f5a95c011f1e8fe8f4a1cb5a700614218b8bebf2113c8a660abd255f67448b684b82d76e00000000016d559de7a1a382349cf97fe01a2fba41a49bb5e3b306d9ff8c2bcc301c731c00000001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1370446 ..< 1414969: return WalletBirthday( height: 1370446, @@ -143,6 +161,7 @@ extension WalletBirthday { time: 1618587354, tree: "01d0d36f8845f9ffad4f0a8812fbc5c4c69b45733199d7183307cb1a7d00353c0900100000017a8a6f641c487a313bb949623cca3b22b925adfef8216866aa090546bcf520000001bf48febcd2a10e51d420782990e17b746d5ce0f3292007e60a2eeb830bc46d0201ab6e0123bf72f70255ec4cacd33935b19ff834d481d67e06801073d0b8f0ea2a0121f42f607885a0158022413591af8eca7eae38b10c46e3ac81a9bfe70046e51d018229160dbe1f1d9e02d738e9d5060497e786e7434c80c32db7b8c96878e9904601034e6b1c73f09aa81f16a13cdb2188a53d8761483470f0bea01bfb84eb2cea1100018469338dcbdf2f7e54bca5bc3e1c5fad4a656f206040436d3d0433a901218b5e016d559de7a1a382349cf97fe01a2fba41a49bb5e3b306d9ff8c2bcc301c731c00000001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1414969 ..< 1420000: return WalletBirthday( height: 1414969, @@ -150,6 +169,7 @@ extension WalletBirthday { time: 1621459669, tree: "01a9497fdb3add3bc2d0676f3163d94cda7c8cf8112d9dd8d2e7611b187c600a410010000143905c99f7bb45b164c636bb2443d9621db8147dba6a84a279fa8ed8f012083d00016847084e044e84059ea4b88b8af2de3f65c72adcee21522d5ee9d370d70f525b0000014d03c61befc68d02710784399567067db98f24eda340a1fd4a3ecc549d0fd0660001b4c1c846cae1423eaf52f1a8b1bfdde9ed9d43ced4d80dba9e72d862a0e03e4001ba0d7aa9e68417291c63b835fa64114f5899208238de59ee360f594c8b6c1b72018469338dcbdf2f7e54bca5bc3e1c5fad4a656f206040436d3d0433a901218b5e016d559de7a1a382349cf97fe01a2fba41a49bb5e3b306d9ff8c2bcc301c731c00000001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1420000 ..< 1430000: return WalletBirthday( height: 1420000, @@ -157,6 +177,7 @@ extension WalletBirthday { time: 1621783347, tree: "0107478e9125e3050506cbeea850266d94108997ec3ef101d9693d136611b4076c00100001dfcde451d111cd50bac54c4ed4e238ca3dd8dcfcb8b50eabccb11a12dbcad71b0001cffd776a8fd6e5df911d000876525aa1d792a4f764e252dac9af69dd8ef3046d0106d4ec443aa1194ea579a1aa179bd5a29eeb4a5a01ccbfcf7af9cadc58225a6900014d03c61befc68d02710784399567067db98f24eda340a1fd4a3ecc549d0fd0660001b4c1c846cae1423eaf52f1a8b1bfdde9ed9d43ced4d80dba9e72d862a0e03e4001ba0d7aa9e68417291c63b835fa64114f5899208238de59ee360f594c8b6c1b72018469338dcbdf2f7e54bca5bc3e1c5fad4a656f206040436d3d0433a901218b5e016d559de7a1a382349cf97fe01a2fba41a49bb5e3b306d9ff8c2bcc301c731c00000001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1430000 ..< 1440000: return WalletBirthday( height: 1430000, @@ -164,6 +185,7 @@ extension WalletBirthday { time: 1622484411, tree: "010ea3d173a66acda751cb72a86bcc1eed2708b997ca8c7292febbd4c19b41665e001001f908af1ee7296100c06672f69834e5be2dc8b5325945270d562669bba91b825d01c4b42187eb99ab242226f6f2a48a00d4e5b3b4201c931afe9bccc86f3fbdd46501f39c0c0c1f725fa6b3ab8b58e60b280207a41199e2e218405f31ae18f0759f16000154daf736c7f68b0f22072be3e6b59434618b514c0c32d044c187048e2600c60b01f98b75b62bf721db663a442cbfa411242ec07ccb70aee42ea3618ca7b157270a014d03c61befc68d02710784399567067db98f24eda340a1fd4a3ecc549d0fd0660001b4c1c846cae1423eaf52f1a8b1bfdde9ed9d43ced4d80dba9e72d862a0e03e4001ba0d7aa9e68417291c63b835fa64114f5899208238de59ee360f594c8b6c1b72018469338dcbdf2f7e54bca5bc3e1c5fad4a656f206040436d3d0433a901218b5e016d559de7a1a382349cf97fe01a2fba41a49bb5e3b306d9ff8c2bcc301c731c00000001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1440000 ..< 1450000: return WalletBirthday( height: 1440000, @@ -171,6 +193,7 @@ extension WalletBirthday { time: 1623136353, tree: "018d8cc853fd33af2a13ea00f379fe882fc56ecea3e0b1ecb75ac3b9783b443d3b01922d8ec71070cbe88eef0576738169965839e841d2fbc09c85f1d64f3528d4341001ee3dbc8987d7be81ccd8a5b502e9385c447f3f8c9c34085a1d11f7b41ceb625b010c1d1b1687fd081e55598e9bdcc5c565781ec867a12dd056384890f36fef434c00011674571f7aca05cc96139d2e59b08fe7a5b7b779da40a9903755b61e73421e64000001ccb87d20316142450d34c59bc515935f9adfd053a178ae8d799ea1f9bf02664901cc23dbfe7d27d7ad768868d7a96b6b31260ca34e4fbf164f652eb8e651f2fd3801b4c1c846cae1423eaf52f1a8b1bfdde9ed9d43ced4d80dba9e72d862a0e03e4001ba0d7aa9e68417291c63b835fa64114f5899208238de59ee360f594c8b6c1b72018469338dcbdf2f7e54bca5bc3e1c5fad4a656f206040436d3d0433a901218b5e016d559de7a1a382349cf97fe01a2fba41a49bb5e3b306d9ff8c2bcc301c731c00000001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1450000 ..< 1460000: return WalletBirthday( height: 1450000, @@ -178,6 +201,7 @@ extension WalletBirthday { time: 1623815069, tree: "0175626cf9d8448de98f68fcc585dd7a276c946c11bbc3b192ee08db99c542b86b01acf5a110dc7ab911b534984c46bf56592f0c4cc8cf70dbd6a9cc4a5b47d2c81c1001c91f518ccb74093a217a640c537b69b095de058e0430046c8783f231caa1fa4201f7c982ce76b2c9343fb771e077357322f9a7dabfd7ab93b7adee32806c930d6600000170910ab6355ec614412fae56dad5fdc1747ce1b306a4b8ae03b77513b612b00800000000000000013d2fd009bf8a22d68f720eac19c411c99014ed9c5f85d5942e15d1fc039e28680001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1460000 ..< 1470000: return WalletBirthday( height: 1460000, @@ -185,6 +209,7 @@ extension WalletBirthday { time: 1624454126, tree: "01f971b9781e857ab4acd5506174daf7ced473ad5a4a98134816d0c48de197d4400010000001ce49c67660eff9e404a3e4569ffa3ba98cc4514c05fa408beecd5c63420ef30e0192152273e4cbeafd426fa7df421310d2ccefad5e78f8d3e26dc283064b4d0d480188b70932b9ad821d4c9ecd57ed729a724723d22bdee4e5d4f08c9a924e68cf1501b2533ff180b8fb171fc0450fb7d1f91b7528bc19d88fdb2385c207b149d55e53017b499fdb9fe0db4bc418689d8f45f38b127b67d0445c421bfa6892c870610e260000000000013d2fd009bf8a22d68f720eac19c411c99014ed9c5f85d5942e15d1fc039e28680001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1470000 ..< 1480000: return WalletBirthday( height: 1470000, @@ -192,6 +217,7 @@ extension WalletBirthday { time: 1625121412, tree: "012442af751714abfbb1f6b815b187eecbb60849e29dca1e3acccfbfd73f6bb8150010000109777ddd46c0a0e7eb91f31735f6078c54334f9a6d22d6421898bd44fd83ce140000013337975cc4704be21cbecce1c877936ce395128f6264fcb91ba8c028e7f25230015d7589dc1009350a87831e2fa9c4d9d3ca61754644f1a1d5d09499567fdcb11e0136e55cb009dd4f8bb8a3469b27ec325f06552a66bef2d898b6a72063107d03350001a7b951c79a184af5bda58c8be77db9b1e3813df0de344f26b27e3ad02c325b3b000000013d2fd009bf8a22d68f720eac19c411c99014ed9c5f85d5942e15d1fc039e28680001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1480000 ..< 1490000: return WalletBirthday( height: 1480000, @@ -199,6 +225,7 @@ extension WalletBirthday { time: 1625795173, tree: "01a61918852f89d4d68aa82e1d93a7ddc4285ab2cf6a2ce92e79c4b9b498662014016d8109b64819882e5d35ee6730f54dda3a4ddc8232edc22226a367542c977a23100000016891e1f6b99afb29292bd3157f89eb2b8c1f74eed9cef56f4a802939d7392a1a0001f6f393a6ab5b0bc04a6d751bdbcd64a2740ff93aef7e1527dcd5de0511c4fb3001b938c3d7a93793fa04d51cce0369e789316a72f227436e02fc0c45fdd88def3700000001260f6e9fac0922f98d58afbcc3f391ac19d5d944081466929a33b99df19c0e6a0000013d2fd009bf8a22d68f720eac19c411c99014ed9c5f85d5942e15d1fc039e28680001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1490000 ..< 1500000: return WalletBirthday( height: 1490000, @@ -206,6 +233,7 @@ extension WalletBirthday { time: 1626460494, tree: "01448b047d9d4611f923ceb0c01a2fc743c7b4a54f7a00e92d666cbd0f39980f3100100000000001d917913fed08004cf1c74eeb918829cb80e576187e2f8e0c0e12a7e9849a9b400130282bcf71d57c40235baa4a3e045d89803c1fe069803da86ccebf25435dd270014aad72f0f5c3cd459d6d89a68657fbd299c84be0228c1a8a50d63ff2f2f74e0a000001260f6e9fac0922f98d58afbcc3f391ac19d5d944081466929a33b99df19c0e6a0000013d2fd009bf8a22d68f720eac19c411c99014ed9c5f85d5942e15d1fc039e28680001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1500000 ..< 1507328: return WalletBirthday( height: 1500000, @@ -213,6 +241,7 @@ extension WalletBirthday { time: 1627076501, tree: "01172b95f271c6af8f68388f08c8ef970db8ec8d8d61204ecb7b2bb2c38262b92d0010016284585a6c85dadfef27ff33f1403926b4bb391de92e8be797e4280cc4ca2971000001a1ff388639379c0120782b3929bd8871af797be4b651f694aa961bad65a9c12400000001d806c98bda9653d5ae22757eed750871e16e0fb657f52c3d771a4411668e84330001260f6e9fac0922f98d58afbcc3f391ac19d5d944081466929a33b99df19c0e6a0000013d2fd009bf8a22d68f720eac19c411c99014ed9c5f85d5942e15d1fc039e28680001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1510000 ..< 1520000: return WalletBirthday( height: 1510000, @@ -220,6 +249,7 @@ extension WalletBirthday { time: 1627732497, tree: "01d48068b1d5df60d503b3096df8324a496cb0d38cc0dae7d5384dc0d2c054a53c01f78eb50b151d718bfdca22fbf0009cf3c52cbabb4dc079458ce81c590615fb6e10014322a3d05341d97f21671686dd9f31264106c911d295d0ac9a3489d4257d15220001807210e338ac665a917b9dcb4b0dfec1661a51f8974dd601a13bece399c6fb6e0134e53353af751c1932b5be1fe16c7816ee765d0845ea29c64cf307bb481483630001526321fe3e5eb822fc10101b36b4601030b279a7f64b675d4c8438a6361c5e710001d806c98bda9653d5ae22757eed750871e16e0fb657f52c3d771a4411668e84330001260f6e9fac0922f98d58afbcc3f391ac19d5d944081466929a33b99df19c0e6a0000013d2fd009bf8a22d68f720eac19c411c99014ed9c5f85d5942e15d1fc039e28680001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39" ) + case 1520000 ..< 1530000: return WalletBirthday( height: 1520000, diff --git a/ZcashLightClientKit/Constants/ZcashSDK.swift b/Sources/ZcashLightClientKit/Constants/ZcashSDK.swift similarity index 100% rename from ZcashLightClientKit/Constants/ZcashSDK.swift rename to Sources/ZcashLightClientKit/Constants/ZcashSDK.swift diff --git a/ZcashLightClientKit/DAO/BlockDao.swift b/Sources/ZcashLightClientKit/DAO/BlockDao.swift similarity index 100% rename from ZcashLightClientKit/DAO/BlockDao.swift rename to Sources/ZcashLightClientKit/DAO/BlockDao.swift diff --git a/ZcashLightClientKit/DAO/CompactBlockDAO.swift b/Sources/ZcashLightClientKit/DAO/CompactBlockDAO.swift similarity index 100% rename from ZcashLightClientKit/DAO/CompactBlockDAO.swift rename to Sources/ZcashLightClientKit/DAO/CompactBlockDAO.swift diff --git a/ZcashLightClientKit/DAO/NotesDao.swift b/Sources/ZcashLightClientKit/DAO/NotesDao.swift similarity index 100% rename from ZcashLightClientKit/DAO/NotesDao.swift rename to Sources/ZcashLightClientKit/DAO/NotesDao.swift diff --git a/ZcashLightClientKit/DAO/PagedTransactionDao.swift b/Sources/ZcashLightClientKit/DAO/PagedTransactionDao.swift similarity index 100% rename from ZcashLightClientKit/DAO/PagedTransactionDao.swift rename to Sources/ZcashLightClientKit/DAO/PagedTransactionDao.swift diff --git a/ZcashLightClientKit/DAO/PendingTransactionDao.swift b/Sources/ZcashLightClientKit/DAO/PendingTransactionDao.swift similarity index 100% rename from ZcashLightClientKit/DAO/PendingTransactionDao.swift rename to Sources/ZcashLightClientKit/DAO/PendingTransactionDao.swift diff --git a/ZcashLightClientKit/DAO/TransactionBuilder.swift b/Sources/ZcashLightClientKit/DAO/TransactionBuilder.swift similarity index 100% rename from ZcashLightClientKit/DAO/TransactionBuilder.swift rename to Sources/ZcashLightClientKit/DAO/TransactionBuilder.swift diff --git a/ZcashLightClientKit/DAO/TransactionDao.swift b/Sources/ZcashLightClientKit/DAO/TransactionDao.swift similarity index 100% rename from ZcashLightClientKit/DAO/TransactionDao.swift rename to Sources/ZcashLightClientKit/DAO/TransactionDao.swift diff --git a/ZcashLightClientKit/DAO/UnspentTransactionOutputDao.swift b/Sources/ZcashLightClientKit/DAO/UnspentTransactionOutputDao.swift similarity index 100% rename from ZcashLightClientKit/DAO/UnspentTransactionOutputDao.swift rename to Sources/ZcashLightClientKit/DAO/UnspentTransactionOutputDao.swift diff --git a/ZcashLightClientKit/Entity/AccountEntity.swift b/Sources/ZcashLightClientKit/Entity/AccountEntity.swift similarity index 100% rename from ZcashLightClientKit/Entity/AccountEntity.swift rename to Sources/ZcashLightClientKit/Entity/AccountEntity.swift diff --git a/ZcashLightClientKit/Entity/CompactBlockEntity.swift b/Sources/ZcashLightClientKit/Entity/CompactBlockEntity.swift similarity index 100% rename from ZcashLightClientKit/Entity/CompactBlockEntity.swift rename to Sources/ZcashLightClientKit/Entity/CompactBlockEntity.swift diff --git a/ZcashLightClientKit/Entity/EncodedTransactionEntity.swift b/Sources/ZcashLightClientKit/Entity/EncodedTransactionEntity.swift similarity index 100% rename from ZcashLightClientKit/Entity/EncodedTransactionEntity.swift rename to Sources/ZcashLightClientKit/Entity/EncodedTransactionEntity.swift diff --git a/ZcashLightClientKit/Entity/PendingTransactionEntity.swift b/Sources/ZcashLightClientKit/Entity/PendingTransactionEntity.swift similarity index 100% rename from ZcashLightClientKit/Entity/PendingTransactionEntity.swift rename to Sources/ZcashLightClientKit/Entity/PendingTransactionEntity.swift diff --git a/ZcashLightClientKit/Entity/ReceivedNoteEntity.swift b/Sources/ZcashLightClientKit/Entity/ReceivedNoteEntity.swift similarity index 100% rename from ZcashLightClientKit/Entity/ReceivedNoteEntity.swift rename to Sources/ZcashLightClientKit/Entity/ReceivedNoteEntity.swift diff --git a/ZcashLightClientKit/Entity/SentNoteEntity.swift b/Sources/ZcashLightClientKit/Entity/SentNoteEntity.swift similarity index 100% rename from ZcashLightClientKit/Entity/SentNoteEntity.swift rename to Sources/ZcashLightClientKit/Entity/SentNoteEntity.swift diff --git a/ZcashLightClientKit/Entity/TransactionEntity.swift b/Sources/ZcashLightClientKit/Entity/TransactionEntity.swift similarity index 100% rename from ZcashLightClientKit/Entity/TransactionEntity.swift rename to Sources/ZcashLightClientKit/Entity/TransactionEntity.swift diff --git a/ZcashLightClientKit/Entity/UnspentTransactionOutputEntity.swift b/Sources/ZcashLightClientKit/Entity/UnspentTransactionOutputEntity.swift similarity index 100% rename from ZcashLightClientKit/Entity/UnspentTransactionOutputEntity.swift rename to Sources/ZcashLightClientKit/Entity/UnspentTransactionOutputEntity.swift diff --git a/ZcashLightClientKit/Extensions/Data+Zcash.swift b/Sources/ZcashLightClientKit/Extensions/Data+Zcash.swift similarity index 100% rename from ZcashLightClientKit/Extensions/Data+Zcash.swift rename to Sources/ZcashLightClientKit/Extensions/Data+Zcash.swift diff --git a/ZcashLightClientKit/Extensions/Data+internal.swift b/Sources/ZcashLightClientKit/Extensions/Data+internal.swift similarity index 100% rename from ZcashLightClientKit/Extensions/Data+internal.swift rename to Sources/ZcashLightClientKit/Extensions/Data+internal.swift diff --git a/ZcashLightClientKit/Extensions/HexEncode.swift b/Sources/ZcashLightClientKit/Extensions/HexEncode.swift similarity index 100% rename from ZcashLightClientKit/Extensions/HexEncode.swift rename to Sources/ZcashLightClientKit/Extensions/HexEncode.swift diff --git a/ZcashLightClientKit/Extensions/ZcashRust+Utils.swift b/Sources/ZcashLightClientKit/Extensions/ZcashRust+Utils.swift similarity index 100% rename from ZcashLightClientKit/Extensions/ZcashRust+Utils.swift rename to Sources/ZcashLightClientKit/Extensions/ZcashRust+Utils.swift diff --git a/ZcashLightClientKit/Extensions/ZcashSDK+extensions.swift b/Sources/ZcashLightClientKit/Extensions/ZcashSDK+extensions.swift similarity index 100% rename from ZcashLightClientKit/Extensions/ZcashSDK+extensions.swift rename to Sources/ZcashLightClientKit/Extensions/ZcashSDK+extensions.swift diff --git a/ZcashLightClientKit/Initializer.swift b/Sources/ZcashLightClientKit/Initializer.swift similarity index 100% rename from ZcashLightClientKit/Initializer.swift rename to Sources/ZcashLightClientKit/Initializer.swift diff --git a/ZcashLightClientKit/Model/WalletTypes.swift b/Sources/ZcashLightClientKit/Model/WalletTypes.swift similarity index 100% rename from ZcashLightClientKit/Model/WalletTypes.swift rename to Sources/ZcashLightClientKit/Model/WalletTypes.swift diff --git a/ZcashLightClientKit/Providers/ResourceProvider.swift b/Sources/ZcashLightClientKit/Providers/ResourceProvider.swift similarity index 100% rename from ZcashLightClientKit/Providers/ResourceProvider.swift rename to Sources/ZcashLightClientKit/Providers/ResourceProvider.swift diff --git a/ZcashLightClientKit/Repository/BlockRepository.swift b/Sources/ZcashLightClientKit/Repository/BlockRepository.swift similarity index 100% rename from ZcashLightClientKit/Repository/BlockRepository.swift rename to Sources/ZcashLightClientKit/Repository/BlockRepository.swift diff --git a/ZcashLightClientKit/Repository/CompactBlockRepository.swift b/Sources/ZcashLightClientKit/Repository/CompactBlockRepository.swift similarity index 100% rename from ZcashLightClientKit/Repository/CompactBlockRepository.swift rename to Sources/ZcashLightClientKit/Repository/CompactBlockRepository.swift diff --git a/ZcashLightClientKit/Repository/NotesRepository.swift b/Sources/ZcashLightClientKit/Repository/NotesRepository.swift similarity index 100% rename from ZcashLightClientKit/Repository/NotesRepository.swift rename to Sources/ZcashLightClientKit/Repository/NotesRepository.swift diff --git a/ZcashLightClientKit/Repository/PaginatedTransactionRepository.swift b/Sources/ZcashLightClientKit/Repository/PaginatedTransactionRepository.swift similarity index 100% rename from ZcashLightClientKit/Repository/PaginatedTransactionRepository.swift rename to Sources/ZcashLightClientKit/Repository/PaginatedTransactionRepository.swift diff --git a/ZcashLightClientKit/Repository/PendingTransactionRepository.swift b/Sources/ZcashLightClientKit/Repository/PendingTransactionRepository.swift similarity index 100% rename from ZcashLightClientKit/Repository/PendingTransactionRepository.swift rename to Sources/ZcashLightClientKit/Repository/PendingTransactionRepository.swift diff --git a/ZcashLightClientKit/Repository/TransactionRepository.swift b/Sources/ZcashLightClientKit/Repository/TransactionRepository.swift similarity index 100% rename from ZcashLightClientKit/Repository/TransactionRepository.swift rename to Sources/ZcashLightClientKit/Repository/TransactionRepository.swift diff --git a/ZcashLightClientKit/Repository/TransactionRepositoryBuilder.swift b/Sources/ZcashLightClientKit/Repository/TransactionRepositoryBuilder.swift similarity index 100% rename from ZcashLightClientKit/Repository/TransactionRepositoryBuilder.swift rename to Sources/ZcashLightClientKit/Repository/TransactionRepositoryBuilder.swift diff --git a/ZcashLightClientKit/Repository/UnspentTransactionOutputRepository.swift b/Sources/ZcashLightClientKit/Repository/UnspentTransactionOutputRepository.swift similarity index 100% rename from ZcashLightClientKit/Repository/UnspentTransactionOutputRepository.swift rename to Sources/ZcashLightClientKit/Repository/UnspentTransactionOutputRepository.swift diff --git a/ZcashLightClientKit/Rust/ZcashRustBackend.swift b/Sources/ZcashLightClientKit/Rust/ZcashRustBackend.swift similarity index 99% rename from ZcashLightClientKit/Rust/ZcashRustBackend.swift rename to Sources/ZcashLightClientKit/Rust/ZcashRustBackend.swift index 87e09343..4a3c8570 100644 --- a/ZcashLightClientKit/Rust/ZcashRustBackend.swift +++ b/Sources/ZcashLightClientKit/Rust/ZcashRustBackend.swift @@ -7,6 +7,7 @@ // // swiftlint:disable type_body_length import Foundation +import libzcashlc class ZcashRustBackend: ZcashRustBackendWelding { static func lastError() -> RustWeldingError? { diff --git a/ZcashLightClientKit/Rust/ZcashRustBackendWelding.swift b/Sources/ZcashLightClientKit/Rust/ZcashRustBackendWelding.swift similarity index 100% rename from ZcashLightClientKit/Rust/ZcashRustBackendWelding.swift rename to Sources/ZcashLightClientKit/Rust/ZcashRustBackendWelding.swift diff --git a/ZcashLightClientKit/Service/LightWalletGRPCService.swift b/Sources/ZcashLightClientKit/Service/LightWalletGRPCService.swift similarity index 100% rename from ZcashLightClientKit/Service/LightWalletGRPCService.swift rename to Sources/ZcashLightClientKit/Service/LightWalletGRPCService.swift diff --git a/ZcashLightClientKit/Service/LightWalletService.swift b/Sources/ZcashLightClientKit/Service/LightWalletService.swift similarity index 100% rename from ZcashLightClientKit/Service/LightWalletService.swift rename to Sources/ZcashLightClientKit/Service/LightWalletService.swift diff --git a/ZcashLightClientKit/Service/Model/ZcashCompactBlock.swift b/Sources/ZcashLightClientKit/Service/Model/ZcashCompactBlock.swift similarity index 100% rename from ZcashLightClientKit/Service/Model/ZcashCompactBlock.swift rename to Sources/ZcashLightClientKit/Service/Model/ZcashCompactBlock.swift diff --git a/ZcashLightClientKit/Service/ProtoBuf/Extensions/Protocolbuffer+Extensions.swift b/Sources/ZcashLightClientKit/Service/ProtoBuf/Extensions/Protocolbuffer+Extensions.swift similarity index 100% rename from ZcashLightClientKit/Service/ProtoBuf/Extensions/Protocolbuffer+Extensions.swift rename to Sources/ZcashLightClientKit/Service/ProtoBuf/Extensions/Protocolbuffer+Extensions.swift diff --git a/ZcashLightClientKit/Service/ProtoBuf/compact_formats.pb.swift b/Sources/ZcashLightClientKit/Service/ProtoBuf/compact_formats.pb.swift similarity index 100% rename from ZcashLightClientKit/Service/ProtoBuf/compact_formats.pb.swift rename to Sources/ZcashLightClientKit/Service/ProtoBuf/compact_formats.pb.swift diff --git a/ZcashLightClientKit/Service/ProtoBuf/proto/compact_formats.proto b/Sources/ZcashLightClientKit/Service/ProtoBuf/proto/compact_formats.proto similarity index 100% rename from ZcashLightClientKit/Service/ProtoBuf/proto/compact_formats.proto rename to Sources/ZcashLightClientKit/Service/ProtoBuf/proto/compact_formats.proto diff --git a/ZcashLightClientKit/Service/ProtoBuf/proto/service.proto b/Sources/ZcashLightClientKit/Service/ProtoBuf/proto/service.proto similarity index 100% rename from ZcashLightClientKit/Service/ProtoBuf/proto/service.proto rename to Sources/ZcashLightClientKit/Service/ProtoBuf/proto/service.proto diff --git a/ZcashLightClientKit/Service/ProtoBuf/service.grpc.swift b/Sources/ZcashLightClientKit/Service/ProtoBuf/service.grpc.swift similarity index 100% rename from ZcashLightClientKit/Service/ProtoBuf/service.grpc.swift rename to Sources/ZcashLightClientKit/Service/ProtoBuf/service.grpc.swift diff --git a/ZcashLightClientKit/Service/ProtoBuf/service.pb.swift b/Sources/ZcashLightClientKit/Service/ProtoBuf/service.pb.swift similarity index 100% rename from ZcashLightClientKit/Service/ProtoBuf/service.pb.swift rename to Sources/ZcashLightClientKit/Service/ProtoBuf/service.pb.swift diff --git a/ZcashLightClientKit/Stencil/WalletBirthday+saplingtree.stencil b/Sources/ZcashLightClientKit/Stencil/WalletBirthday+saplingtree.stencil similarity index 100% rename from ZcashLightClientKit/Stencil/WalletBirthday+saplingtree.stencil rename to Sources/ZcashLightClientKit/Stencil/WalletBirthday+saplingtree.stencil diff --git a/ZcashLightClientKit/Stencil/ZcashSDK.stencil b/Sources/ZcashLightClientKit/Stencil/ZcashSDK.stencil similarity index 100% rename from ZcashLightClientKit/Stencil/ZcashSDK.stencil rename to Sources/ZcashLightClientKit/Stencil/ZcashSDK.stencil diff --git a/ZcashLightClientKit/Synchronizer.swift b/Sources/ZcashLightClientKit/Synchronizer.swift similarity index 100% rename from ZcashLightClientKit/Synchronizer.swift rename to Sources/ZcashLightClientKit/Synchronizer.swift diff --git a/ZcashLightClientKit/UIKit/Synchronizer/SDKSynchronizer.swift b/Sources/ZcashLightClientKit/Synchronizer/SDKSynchronizer.swift similarity index 99% rename from ZcashLightClientKit/UIKit/Synchronizer/SDKSynchronizer.swift rename to Sources/ZcashLightClientKit/Synchronizer/SDKSynchronizer.swift index 956a515f..d3d61a91 100644 --- a/ZcashLightClientKit/UIKit/Synchronizer/SDKSynchronizer.swift +++ b/Sources/ZcashLightClientKit/Synchronizer/SDKSynchronizer.swift @@ -7,7 +7,6 @@ // import Foundation -import UIKit public extension Notification.Name { /** diff --git a/ZcashLightClientKit/Tool/DerivationTool.swift b/Sources/ZcashLightClientKit/Tool/DerivationTool.swift similarity index 100% rename from ZcashLightClientKit/Tool/DerivationTool.swift rename to Sources/ZcashLightClientKit/Tool/DerivationTool.swift diff --git a/ZcashLightClientKit/Transaction/PersistentTransactionManager.swift b/Sources/ZcashLightClientKit/Transaction/PersistentTransactionManager.swift similarity index 100% rename from ZcashLightClientKit/Transaction/PersistentTransactionManager.swift rename to Sources/ZcashLightClientKit/Transaction/PersistentTransactionManager.swift diff --git a/ZcashLightClientKit/Transaction/TransactionEncoder.swift b/Sources/ZcashLightClientKit/Transaction/TransactionEncoder.swift similarity index 100% rename from ZcashLightClientKit/Transaction/TransactionEncoder.swift rename to Sources/ZcashLightClientKit/Transaction/TransactionEncoder.swift diff --git a/ZcashLightClientKit/Transaction/TransactionManager.swift b/Sources/ZcashLightClientKit/Transaction/TransactionManager.swift similarity index 100% rename from ZcashLightClientKit/Transaction/TransactionManager.swift rename to Sources/ZcashLightClientKit/Transaction/TransactionManager.swift diff --git a/ZcashLightClientKit/Transaction/WalletTransactionEncoder.swift b/Sources/ZcashLightClientKit/Transaction/WalletTransactionEncoder.swift similarity index 100% rename from ZcashLightClientKit/Transaction/WalletTransactionEncoder.swift rename to Sources/ZcashLightClientKit/Transaction/WalletTransactionEncoder.swift diff --git a/ZcashLightClientKit/Utils/LoggingProxy.swift b/Sources/ZcashLightClientKit/Utils/LoggingProxy.swift similarity index 100% rename from ZcashLightClientKit/Utils/LoggingProxy.swift rename to Sources/ZcashLightClientKit/Utils/LoggingProxy.swift diff --git a/ZcashLightClientKit/Utils/SaplingParameterDownloader.swift b/Sources/ZcashLightClientKit/Utils/SaplingParameterDownloader.swift similarity index 100% rename from ZcashLightClientKit/Utils/SaplingParameterDownloader.swift rename to Sources/ZcashLightClientKit/Utils/SaplingParameterDownloader.swift diff --git a/ZcashLightClientKitTests/AdvancedReOrgTests.swift b/Tests/DarksideTests/AdvancedReOrgTests.swift similarity index 99% rename from ZcashLightClientKitTests/AdvancedReOrgTests.swift rename to Tests/DarksideTests/AdvancedReOrgTests.swift index d9c97f07..dff98a44 100644 --- a/ZcashLightClientKitTests/AdvancedReOrgTests.swift +++ b/Tests/DarksideTests/AdvancedReOrgTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional force_unwrapping type_body_length diff --git a/ZcashLightClientKitTests/BalanceTests.swift b/Tests/DarksideTests/BalanceTests.swift similarity index 99% rename from ZcashLightClientKitTests/BalanceTests.swift rename to Tests/DarksideTests/BalanceTests.swift index c965cb2e..14e12584 100644 --- a/ZcashLightClientKitTests/BalanceTests.swift +++ b/Tests/DarksideTests/BalanceTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable type_body_length implicitly_unwrapped_optional force_unwrapping file_length diff --git a/ZcashLightClientKitTests/BlockDownloaderTests.swift b/Tests/DarksideTests/BlockDownloaderTests.swift similarity index 99% rename from ZcashLightClientKitTests/BlockDownloaderTests.swift rename to Tests/DarksideTests/BlockDownloaderTests.swift index e8c4d812..c80136bf 100644 --- a/ZcashLightClientKitTests/BlockDownloaderTests.swift +++ b/Tests/DarksideTests/BlockDownloaderTests.swift @@ -7,6 +7,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional force_cast force_try diff --git a/ZcashLightClientKitTests/DarksideSanityCheckTests.swift b/Tests/DarksideTests/DarksideSanityCheckTests.swift similarity index 99% rename from ZcashLightClientKitTests/DarksideSanityCheckTests.swift rename to Tests/DarksideTests/DarksideSanityCheckTests.swift index b926602b..0df6bf6b 100644 --- a/ZcashLightClientKitTests/DarksideSanityCheckTests.swift +++ b/Tests/DarksideTests/DarksideSanityCheckTests.swift @@ -6,6 +6,7 @@ // import Foundation +@testable import TestUtils import XCTest @testable import ZcashLightClientKit diff --git a/ZcashLightClientKitTests/NetworkUpgradeTests.swift b/Tests/DarksideTests/NetworkUpgradeTests.swift similarity index 99% rename from ZcashLightClientKitTests/NetworkUpgradeTests.swift rename to Tests/DarksideTests/NetworkUpgradeTests.swift index 04be4ded..205d7063 100644 --- a/ZcashLightClientKitTests/NetworkUpgradeTests.swift +++ b/Tests/DarksideTests/NetworkUpgradeTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional type_body_length force_unwrapping diff --git a/ZcashLightClientKitTests/PendingTransactionUpdatesTest.swift b/Tests/DarksideTests/PendingTransactionUpdatesTest.swift similarity index 99% rename from ZcashLightClientKitTests/PendingTransactionUpdatesTest.swift rename to Tests/DarksideTests/PendingTransactionUpdatesTest.swift index 9c0cf570..5e6b9050 100644 --- a/ZcashLightClientKitTests/PendingTransactionUpdatesTest.swift +++ b/Tests/DarksideTests/PendingTransactionUpdatesTest.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional diff --git a/ZcashLightClientKitTests/ReOrgTests.swift b/Tests/DarksideTests/ReOrgTests.swift similarity index 99% rename from ZcashLightClientKitTests/ReOrgTests.swift rename to Tests/DarksideTests/ReOrgTests.swift index 58b5ea15..45a8a053 100644 --- a/ZcashLightClientKitTests/ReOrgTests.swift +++ b/Tests/DarksideTests/ReOrgTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit /** diff --git a/ZcashLightClientKitTests/RewindRescanTests.swift b/Tests/DarksideTests/RewindRescanTests.swift similarity index 99% rename from ZcashLightClientKitTests/RewindRescanTests.swift rename to Tests/DarksideTests/RewindRescanTests.swift index dd8b7151..13cedd68 100644 --- a/ZcashLightClientKitTests/RewindRescanTests.swift +++ b/Tests/DarksideTests/RewindRescanTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable type_body_length implicitly_unwrapped_optional diff --git a/ZcashLightClientKitTests/SychronizerDarksideTests.swift b/Tests/DarksideTests/SychronizerDarksideTests.swift similarity index 99% rename from ZcashLightClientKitTests/SychronizerDarksideTests.swift rename to Tests/DarksideTests/SychronizerDarksideTests.swift index febf7e63..53645c2c 100644 --- a/ZcashLightClientKitTests/SychronizerDarksideTests.swift +++ b/Tests/DarksideTests/SychronizerDarksideTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional diff --git a/ZcashLightClientKitTests/TransactionEnhancementTests.swift b/Tests/DarksideTests/TransactionEnhancementTests.swift similarity index 99% rename from ZcashLightClientKitTests/TransactionEnhancementTests.swift rename to Tests/DarksideTests/TransactionEnhancementTests.swift index ef79b36d..194c42b0 100644 --- a/ZcashLightClientKitTests/TransactionEnhancementTests.swift +++ b/Tests/DarksideTests/TransactionEnhancementTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional force_try diff --git a/ZcashLightClientKitTests/Z2TReceiveTests.swift b/Tests/DarksideTests/Z2TReceiveTests.swift similarity index 99% rename from ZcashLightClientKitTests/Z2TReceiveTests.swift rename to Tests/DarksideTests/Z2TReceiveTests.swift index 6a8fbdf7..0404b45f 100644 --- a/ZcashLightClientKitTests/Z2TReceiveTests.swift +++ b/Tests/DarksideTests/Z2TReceiveTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable force_unwrapping implicitly_unwrapped_optional diff --git a/ZcashLightClientKitTests/ZcashLightClientKitTests.swift b/Tests/DarksideTests/ZcashLightClientKitTests.swift similarity index 95% rename from ZcashLightClientKitTests/ZcashLightClientKitTests.swift rename to Tests/DarksideTests/ZcashLightClientKitTests.swift index eee91014..d3161fba 100644 --- a/ZcashLightClientKitTests/ZcashLightClientKitTests.swift +++ b/Tests/DarksideTests/ZcashLightClientKitTests.swift @@ -8,6 +8,7 @@ import XCTest import GRPC +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional force_try force_unwrapping @@ -58,7 +59,3 @@ class ZcashLightClientKitTests: XCTestCase { XCTAssertEqual(expectedCount + 1, count) } } - -enum Environment { - static let lightwalletdKey = "LIGHTWALLETD_ADDRESS" -} diff --git a/ZcashLightClientKitTests/BlockScanOperationTests.swift b/Tests/NetworkTests/BlockScanOperationTests.swift similarity index 99% rename from ZcashLightClientKitTests/BlockScanOperationTests.swift rename to Tests/NetworkTests/BlockScanOperationTests.swift index 266d0a2a..a186d381 100644 --- a/ZcashLightClientKitTests/BlockScanOperationTests.swift +++ b/Tests/NetworkTests/BlockScanOperationTests.swift @@ -8,6 +8,7 @@ import XCTest import SQLite +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional force_try force_unwrapping print_function_usage diff --git a/ZcashLightClientKitTests/BlockStreamingTest.swift b/Tests/NetworkTests/BlockStreamingTest.swift similarity index 99% rename from ZcashLightClientKitTests/BlockStreamingTest.swift rename to Tests/NetworkTests/BlockStreamingTest.swift index adc8f3f4..bbf216a9 100644 --- a/ZcashLightClientKitTests/BlockStreamingTest.swift +++ b/Tests/NetworkTests/BlockStreamingTest.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable print_function_usage diff --git a/ZcashLightClientKitTests/CompactBlockProcessorTests.swift b/Tests/NetworkTests/CompactBlockProcessorTests.swift similarity index 99% rename from ZcashLightClientKitTests/CompactBlockProcessorTests.swift rename to Tests/NetworkTests/CompactBlockProcessorTests.swift index d6c425aa..3a85bc97 100644 --- a/ZcashLightClientKitTests/CompactBlockProcessorTests.swift +++ b/Tests/NetworkTests/CompactBlockProcessorTests.swift @@ -7,6 +7,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable force_try implicitly_unwrapped_optional diff --git a/ZcashLightClientKitTests/CompactBlockReorgTests.swift b/Tests/NetworkTests/CompactBlockReorgTests.swift similarity index 99% rename from ZcashLightClientKitTests/CompactBlockReorgTests.swift rename to Tests/NetworkTests/CompactBlockReorgTests.swift index 51b3bb77..e8a3fbd8 100644 --- a/ZcashLightClientKitTests/CompactBlockReorgTests.swift +++ b/Tests/NetworkTests/CompactBlockReorgTests.swift @@ -7,6 +7,7 @@ // Copyright © 2019 Electric Coin Company. All rights reserved. import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional force_try diff --git a/ZcashLightClientKitTests/DownloadOperationTests.swift b/Tests/NetworkTests/DownloadOperationTests.swift similarity index 98% rename from ZcashLightClientKitTests/DownloadOperationTests.swift rename to Tests/NetworkTests/DownloadOperationTests.swift index 41b0ee99..34f47012 100644 --- a/ZcashLightClientKitTests/DownloadOperationTests.swift +++ b/Tests/NetworkTests/DownloadOperationTests.swift @@ -8,6 +8,7 @@ import XCTest import SQLite +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable force_try diff --git a/ZcashLightClientKitTests/LightWalletServiceTests.swift b/Tests/NetworkTests/LightWalletServiceTests.swift similarity index 99% rename from ZcashLightClientKitTests/LightWalletServiceTests.swift rename to Tests/NetworkTests/LightWalletServiceTests.swift index 36e0fe00..d8f8dacc 100644 --- a/ZcashLightClientKitTests/LightWalletServiceTests.swift +++ b/Tests/NetworkTests/LightWalletServiceTests.swift @@ -7,6 +7,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit import GRPC diff --git a/ZcashLightClientKitTests/ZcashRustBackendTests.swift b/Tests/NetworkTests/ZcashRustBackendTests.swift similarity index 98% rename from ZcashLightClientKitTests/ZcashRustBackendTests.swift rename to Tests/NetworkTests/ZcashRustBackendTests.swift index 4000f3e8..bec80f27 100644 --- a/ZcashLightClientKitTests/ZcashRustBackendTests.swift +++ b/Tests/NetworkTests/ZcashRustBackendTests.swift @@ -7,6 +7,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable force_unwrapping implicitly_unwrapped_optional force_try @@ -93,7 +94,7 @@ class ZcashRustBackendTests: XCTestCase { } func testInitAndScanBlocks() { - guard let cacheDb = Bundle(for: Self.self).url(forResource: "cache", withExtension: "db") else { + guard let cacheDb = Bundle.module.url(forResource: "cache", withExtension: "db") else { XCTFail("pre populated Db not present") return } diff --git a/ZcashLightClientKitTests/BlockBatchValidationTests.swift b/Tests/OfflineTests/BlockBatchValidationTests.swift similarity index 99% rename from ZcashLightClientKitTests/BlockBatchValidationTests.swift rename to Tests/OfflineTests/BlockBatchValidationTests.swift index b811f367..faea5486 100644 --- a/ZcashLightClientKitTests/BlockBatchValidationTests.swift +++ b/Tests/OfflineTests/BlockBatchValidationTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable force_try type_body_length diff --git a/ZcashLightClientKitTests/CompactBlockStorageTests.swift b/Tests/OfflineTests/CompactBlockStorageTests.swift similarity index 99% rename from ZcashLightClientKitTests/CompactBlockStorageTests.swift rename to Tests/OfflineTests/CompactBlockStorageTests.swift index 81a8ccdc..6479a0ec 100644 --- a/ZcashLightClientKitTests/CompactBlockStorageTests.swift +++ b/Tests/OfflineTests/CompactBlockStorageTests.swift @@ -7,6 +7,7 @@ // import Foundation +@testable import TestUtils import XCTest // swiftlint:disable force_try diff --git a/DerivationToolTests/DerivatioToolTestnetTests.swift b/Tests/OfflineTests/DerivationToolTests/DerivatioToolTestnetTests.swift similarity index 100% rename from DerivationToolTests/DerivatioToolTestnetTests.swift rename to Tests/OfflineTests/DerivationToolTests/DerivatioToolTestnetTests.swift diff --git a/DerivationToolTests/DerivationToolMainnetTests.swift b/Tests/OfflineTests/DerivationToolTests/DerivationToolMainnetTests.swift similarity index 100% rename from DerivationToolTests/DerivationToolMainnetTests.swift rename to Tests/OfflineTests/DerivationToolTests/DerivationToolMainnetTests.swift diff --git a/ZcashLightClientKitTests/MemoTests.swift b/Tests/OfflineTests/MemoTests.swift similarity index 100% rename from ZcashLightClientKitTests/MemoTests.swift rename to Tests/OfflineTests/MemoTests.swift diff --git a/ZcashLightClientKitTests/NotesRepositoryTests.swift b/Tests/OfflineTests/NotesRepositoryTests.swift similarity index 97% rename from ZcashLightClientKitTests/NotesRepositoryTests.swift rename to Tests/OfflineTests/NotesRepositoryTests.swift index 0351a1b0..98408b9d 100644 --- a/ZcashLightClientKitTests/NotesRepositoryTests.swift +++ b/Tests/OfflineTests/NotesRepositoryTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional diff --git a/ZcashLightClientKitTests/NullBytesTests.swift b/Tests/OfflineTests/NullBytesTests.swift similarity index 99% rename from ZcashLightClientKitTests/NullBytesTests.swift rename to Tests/OfflineTests/NullBytesTests.swift index a5e809bc..5a4e8e41 100644 --- a/ZcashLightClientKitTests/NullBytesTests.swift +++ b/Tests/OfflineTests/NullBytesTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit class NullBytesTests: XCTestCase { diff --git a/ZcashLightClientKitTests/PagedTransactionRepositoryTests.swift b/Tests/OfflineTests/PagedTransactionRepositoryTests.swift similarity index 98% rename from ZcashLightClientKitTests/PagedTransactionRepositoryTests.swift rename to Tests/OfflineTests/PagedTransactionRepositoryTests.swift index 971ceddb..f3f98400 100644 --- a/ZcashLightClientKitTests/PagedTransactionRepositoryTests.swift +++ b/Tests/OfflineTests/PagedTransactionRepositoryTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional diff --git a/ZcashLightClientKitTests/PendingTransactionRepositoryTests.swift b/Tests/OfflineTests/PendingTransactionRepositoryTests.swift similarity index 99% rename from ZcashLightClientKitTests/PendingTransactionRepositoryTests.swift rename to Tests/OfflineTests/PendingTransactionRepositoryTests.swift index afee3ed2..fa4ef2cb 100644 --- a/ZcashLightClientKitTests/PendingTransactionRepositoryTests.swift +++ b/Tests/OfflineTests/PendingTransactionRepositoryTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable force_try force_unwrapping implicitly_unwrapped_optional diff --git a/ZcashLightClientKitTests/RawTransactionTests.swift b/Tests/OfflineTests/RawTransactionTests.swift similarity index 100% rename from ZcashLightClientKitTests/RawTransactionTests.swift rename to Tests/OfflineTests/RawTransactionTests.swift diff --git a/ZcashLightClientKitTests/TransactionRepositoryTests.swift b/Tests/OfflineTests/TransactionRepositoryTests.swift similarity index 99% rename from ZcashLightClientKitTests/TransactionRepositoryTests.swift rename to Tests/OfflineTests/TransactionRepositoryTests.swift index e8897cb2..9374d7c8 100644 --- a/ZcashLightClientKitTests/TransactionRepositoryTests.swift +++ b/Tests/OfflineTests/TransactionRepositoryTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional force_unwrapping diff --git a/ZcashLightClientKitTests/TxIdTests.swift b/Tests/OfflineTests/TxIdTests.swift similarity index 95% rename from ZcashLightClientKitTests/TxIdTests.swift rename to Tests/OfflineTests/TxIdTests.swift index f28f50a8..b3cb6c0b 100644 --- a/ZcashLightClientKitTests/TxIdTests.swift +++ b/Tests/OfflineTests/TxIdTests.swift @@ -6,6 +6,7 @@ // import XCTest +@testable import TestUtils // swiftlint:disable force_unwrapping class TxIdTests: XCTestCase { diff --git a/ZcashLightClientKitTests/WalletTests.swift b/Tests/OfflineTests/WalletTests.swift similarity index 98% rename from ZcashLightClientKitTests/WalletTests.swift rename to Tests/OfflineTests/WalletTests.swift index 6676ded7..b12001a7 100644 --- a/ZcashLightClientKitTests/WalletTests.swift +++ b/Tests/OfflineTests/WalletTests.swift @@ -8,6 +8,7 @@ import Foundation import XCTest +@testable import TestUtils @testable import ZcashLightClientKit // swiftlint:disable implicitly_unwrapped_optional force_try force_unwrapping diff --git a/ZcashLightClientKitTests/utils/DarkSideWalletService.swift b/Tests/TestUtils/DarkSideWalletService.swift similarity index 100% rename from ZcashLightClientKitTests/utils/DarkSideWalletService.swift rename to Tests/TestUtils/DarkSideWalletService.swift diff --git a/ZcashLightClientKitTests/utils/FakeChainBuilder.swift b/Tests/TestUtils/FakeChainBuilder.swift similarity index 100% rename from ZcashLightClientKitTests/utils/FakeChainBuilder.swift rename to Tests/TestUtils/FakeChainBuilder.swift diff --git a/ZcashLightClientKitTests/utils/FakeService.swift b/Tests/TestUtils/FakeService.swift similarity index 100% rename from ZcashLightClientKitTests/utils/FakeService.swift rename to Tests/TestUtils/FakeService.swift diff --git a/ZcashLightClientKitTests/utils/FakeStorage.swift b/Tests/TestUtils/FakeStorage.swift similarity index 100% rename from ZcashLightClientKitTests/utils/FakeStorage.swift rename to Tests/TestUtils/FakeStorage.swift diff --git a/ZcashLightClientKitTests/utils/MockTransactionRepository.swift b/Tests/TestUtils/MockTransactionRepository.swift similarity index 100% rename from ZcashLightClientKitTests/utils/MockTransactionRepository.swift rename to Tests/TestUtils/MockTransactionRepository.swift diff --git a/ZcashLightClientKitTests/utils/SampleLogger.swift b/Tests/TestUtils/SampleLogger.swift similarity index 100% rename from ZcashLightClientKitTests/utils/SampleLogger.swift rename to Tests/TestUtils/SampleLogger.swift diff --git a/ZcashLightClientKitTests/utils/Stubs.swift b/Tests/TestUtils/Stubs.swift similarity index 100% rename from ZcashLightClientKitTests/utils/Stubs.swift rename to Tests/TestUtils/Stubs.swift diff --git a/ZcashLightClientKitTests/TestCoordinator.swift b/Tests/TestUtils/TestCoordinator.swift similarity index 100% rename from ZcashLightClientKitTests/TestCoordinator.swift rename to Tests/TestUtils/TestCoordinator.swift diff --git a/ZcashLightClientKitTests/utils/TestDbBuilder.swift b/Tests/TestUtils/TestDbBuilder.swift similarity index 93% rename from ZcashLightClientKitTests/utils/TestDbBuilder.swift rename to Tests/TestUtils/TestDbBuilder.swift index 1855d5cb..2317b469 100644 --- a/ZcashLightClientKitTests/utils/TestDbBuilder.swift +++ b/Tests/TestUtils/TestDbBuilder.swift @@ -62,16 +62,15 @@ class TestDbBuilder { } static func prePopulatedCacheDbURL() -> URL? { - Bundle(for: TestDbBuilder.self).url(forResource: "cache", withExtension: "db") + Bundle.module.url(forResource: "cache", withExtension: "db") } static func prePopulatedDataDbURL() -> URL? { - Bundle(for: TestDbBuilder.self).url(forResource: "test_data", withExtension: "db") + Bundle.module.url(forResource: "test_data", withExtension: "db") } static func prepopulatedDataDbProvider() -> ConnectionProvider? { - let bundle = Bundle(for: TestDbBuilder.self) - guard let url = bundle.url(forResource: "ZcashSdk_Data", withExtension: "db") else { return nil } + guard let url = Bundle.module.url(forResource: "ZcashSdk_Data", withExtension: "db") else { return nil } let provider = SimpleConnectionProvider(path: url.absoluteString, readonly: true) return provider diff --git a/ZcashLightClientKitTests/utils/Tests+Utils.swift b/Tests/TestUtils/Tests+Utils.swift similarity index 95% rename from ZcashLightClientKitTests/utils/Tests+Utils.swift rename to Tests/TestUtils/Tests+Utils.swift index c43f64de..e42d9ba6 100644 --- a/ZcashLightClientKitTests/utils/Tests+Utils.swift +++ b/Tests/TestUtils/Tests+Utils.swift @@ -12,6 +12,14 @@ import ZcashLightClientKit import XCTest import NIO +enum Environment { + static let lightwalletdKey = "LIGHTWALLETD_ADDRESS" +} + +public struct Constants { + static let address: String = ProcessInfo.processInfo.environment[Environment.lightwalletdKey] ?? "localhost" +} + // swiftlint:disable identifier_name enum LightWalletEndpointBuilder { static var `default`: LightWalletEndpoint { @@ -120,14 +128,6 @@ func parametersReady() -> Bool { return true } -class StubTest: XCTestCase {} - -extension Bundle { - static var testBundle: Bundle { - Bundle(for: StubTest.self) - } -} - // swiftlint:disable force_unwrapping class TestSeed { /** diff --git a/ZcashLightClientKitTests/ZcashSdk_Data.db b/Tests/TestUtils/ZcashSdk_Data.db similarity index 100% rename from ZcashLightClientKitTests/ZcashSdk_Data.db rename to Tests/TestUtils/ZcashSdk_Data.db diff --git a/ZcashLightClientKitTests/cache.db b/Tests/TestUtils/cache.db similarity index 100% rename from ZcashLightClientKitTests/cache.db rename to Tests/TestUtils/cache.db diff --git a/ZcashLightClientKitTests/proto/darkside.grpc.swift b/Tests/TestUtils/proto/darkside.grpc.swift similarity index 100% rename from ZcashLightClientKitTests/proto/darkside.grpc.swift rename to Tests/TestUtils/proto/darkside.grpc.swift diff --git a/ZcashLightClientKitTests/proto/darkside.pb.swift b/Tests/TestUtils/proto/darkside.pb.swift similarity index 100% rename from ZcashLightClientKitTests/proto/darkside.pb.swift rename to Tests/TestUtils/proto/darkside.pb.swift diff --git a/ZcashLightClientKitTests/proto/darkside.proto b/Tests/TestUtils/proto/darkside.proto similarity index 100% rename from ZcashLightClientKitTests/proto/darkside.proto rename to Tests/TestUtils/proto/darkside.proto diff --git a/ZcashLightClientKitTests/test_data.db b/Tests/TestUtils/test_data.db similarity index 100% rename from ZcashLightClientKitTests/test_data.db rename to Tests/TestUtils/test_data.db diff --git a/Tests/lightwalletd/lightwalletd b/Tests/lightwalletd/lightwalletd new file mode 100755 index 00000000..61e4d05b Binary files /dev/null and b/Tests/lightwalletd/lightwalletd differ diff --git a/ZcashLightClientKit.modulemap b/ZcashLightClientKit.modulemap deleted file mode 100644 index e7738468..00000000 --- a/ZcashLightClientKit.modulemap +++ /dev/null @@ -1,12 +0,0 @@ -framework module ZcashLightClientKit { - umbrella header "ZcashLightClientKit.h" - - export * - module * { export * } - - module Zcashlc [system][extern_c] { - header "zcashlc.h" - export * - } - -} diff --git a/ZcashLightClientKit.podspec b/ZcashLightClientKit.podspec index d44e7081..801fc6b1 100644 --- a/ZcashLightClientKit.podspec +++ b/ZcashLightClientKit.podspec @@ -15,44 +15,12 @@ Pod::Spec.new do |s| } s.source = { :git => 'https://github.com/zcash/ZcashLightClientKit.git', :tag => s.version.to_s } - s.source_files = 'ZcashLightClientKit/**/*.{swift,h}' + s.source_files = 'Sources/ZcashLightClientKit/**/*.{swift,h}' s.swift_version = '5.4' s.ios.deployment_target = '12.0' s.dependency 'gRPC-Swift', '= 1.0.0' s.dependency 'SQLite.swift', '~> 0.12.2' - s.ios.vendored_libraries = 'lib/libzcashlc.a' - s.preserve_paths = ['Scripts', 'rust','docs','Cargo.*','ZcashLightClientKit/Stencil'] - s.prepare_command = <<-CMD - sh Scripts/prepare_zcash_sdk.sh - CMD + s.dependency 'libzcashlc', '0.0.1' + s.static_framework = true - s.script_phase = { - :name => 'Build generate constants and build librustzcash', - :script => 'sh ${PODS_TARGET_SRCROOT}/Scripts/build_librustzcash_xcode.sh', - :execution_position => :before_compile, - - } - - s.test_spec 'Tests' do | test_spec | - test_spec.source_files = 'ZcashLightClientKitTests/**/*.{swift}' - test_spec.ios.resources = 'ZcashLightClientKitTests/**/*.{db,params}' - test_spec.script_phase = { - :name => 'Build generate constants and build librustzcash', - :script => 'sh ${PODS_TARGET_SRCROOT}/Scripts/generate_test_constants.sh && ${PODS_TARGET_SRCROOT}/Scripts/build_librustzcash_xcode.sh', - :execution_position => :before_compile - } - test_spec.dependency 'gRPC-Swift', '= 1.0.0' - test_spec.dependency 'SQLite.swift', '~> 0.12.2' - end - - s.test_spec 'DerivationToolTests' do | test_spec | - test_spec.source_files = 'DerivationToolTests/**/*.{swift}' - test_spec.script_phase = { - :name => 'Build generate constants and build librustzcash', - :script => 'sh ${PODS_TARGET_SRCROOT}/Scripts/generate_test_constants.sh && ${PODS_TARGET_SRCROOT}/Scripts/build_librustzcash_xcode.sh', - :execution_position => :before_compile - } - test_spec.dependency 'gRPC-Swift', '= 1.0.0' - test_spec.dependency 'SQLite.swift', '~> 0.12.2' - end end diff --git a/ZcashLightClientKit.xcodeproj/project.pbxproj b/ZcashLightClientKit.xcodeproj/project.pbxproj deleted file mode 100644 index 3a886328..00000000 --- a/ZcashLightClientKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,928 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 0B45933D22C612CB002A66BA /* ZcashRustBackendTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B45933C22C612CB002A66BA /* ZcashRustBackendTests.swift */; }; - 0D4A552B2369FD1C00B26C23 /* CompactBlockValidationInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D4A552A2369FD1C00B26C23 /* CompactBlockValidationInformation.swift */; }; - 0D54A83B2371D49400759FDF /* Synchronizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D54A83A2371D49400759FDF /* Synchronizer.swift */; }; - 0D6487912365E1FE00129E57 /* ZcashOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D6487902365E1FE00129E57 /* ZcashOperation.swift */; }; - 0D75A5CF2360C5F5009B2406 /* FakeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D75A5CE2360C5F5009B2406 /* FakeService.swift */; }; - 0D866A522334208100960888 /* ResourceProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D866A512334208000960888 /* ResourceProvider.swift */; }; - 0D8AF10F235A733D0034D14A /* CompactBlockDownloaderBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D8AF10E235A733D0034D14A /* CompactBlockDownloaderBuilder.swift */; }; - 0D9F5F1623537AD000D263C6 /* Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D9F5F1523537AD000D263C6 /* Storage.swift */; }; - 0D9F5F192353821400D263C6 /* StorageManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D9F5F182353821400D263C6 /* StorageManager.swift */; }; - 0D9F5F1B235388CA00D263C6 /* CompactBlockStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D9F5F1A235388CA00D263C6 /* CompactBlockStorage.swift */; }; - 0D9F5F1D2353922500D263C6 /* CompactBlockStorageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D9F5F1C2353922500D263C6 /* CompactBlockStorageTests.swift */; }; - 0D9F5F202353C27F00D263C6 /* SQLite.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D9F5F1E2353C27000D263C6 /* SQLite.framework */; }; - 0D9F8FCB23733947002202A2 /* SDKSynchronizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D9F8FCA23733947002202A2 /* SDKSynchronizer.swift */; }; - 0DA33493232C0BC200CAC082 /* Initializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DA33492232C0BC200CAC082 /* Initializer.swift */; }; - 0DA33496232C11DF00CAC082 /* SeedProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DA33495232C11DF00CAC082 /* SeedProvider.swift */; }; - 0DA33498232C1A8200CAC082 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DA33497232C1A8200CAC082 /* Constants.swift */; }; - 0DA3349A232C1B6F00CAC082 /* WalletTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DA33499232C1B6F00CAC082 /* WalletTests.swift */; }; - 0DA3DFAD2354BFC3008F8ECC /* TestDbBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DA3DFAC2354BFC3008F8ECC /* TestDbBuilder.swift */; }; - 0DA47A1623561FD700249DAF /* FakeStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB45704232AA06200057720 /* FakeStorage.swift */; }; - 0DA47A182356439400249DAF /* CompactBlockProcessingOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DA47A172356439400249DAF /* CompactBlockProcessingOperation.swift */; }; - 0DB456F4232A860200057720 /* ZcashCompactBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB456F3232A860200057720 /* ZcashCompactBlock.swift */; }; - 0DB456FD232A867800057720 /* service.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB456F8232A867800057720 /* service.pb.swift */; }; - 0DB456FE232A867800057720 /* service.grpc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB456F9232A867800057720 /* service.grpc.swift */; }; - 0DB456FF232A867800057720 /* compact_formats.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB456FA232A867800057720 /* compact_formats.pb.swift */; }; - 0DB45702232A86EF00057720 /* LightWalletGRPCService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB45701232A86EF00057720 /* LightWalletGRPCService.swift */; }; - 0DB45709232AA81200057720 /* Protocolbuffer+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB45708232AA81200057720 /* Protocolbuffer+Extensions.swift */; }; - 0DB4570D232ACD3100057720 /* ZcashRustBackendWelding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB4570C232ACD3100057720 /* ZcashRustBackendWelding.swift */; }; - 0DB45711232ADD4B00057720 /* CompactBlockStoring.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB45710232ADD4B00057720 /* CompactBlockStoring.swift */; }; - 0DB45713232AEAF200057720 /* LightWalletService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB45712232AEAF200057720 /* LightWalletService.swift */; }; - 0DB45714232B0AA800057720 /* BoringSSL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DC64E6823284A2C0053EFAC /* BoringSSL.framework */; }; - 0DB45715232B0AA800057720 /* CgRPC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DC64E6623284A2C0053EFAC /* CgRPC.framework */; }; - 0DB45716232B0AA800057720 /* SwiftGRPC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DC64E6723284A2C0053EFAC /* SwiftGRPC.framework */; }; - 0DB45717232B0AA800057720 /* SwiftProtobuf.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DC64E6923284A2C0053EFAC /* SwiftProtobuf.framework */; }; - 0DBF2CE7233291530074C1BE /* LightWalletServiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DBF2CE6233291530074C1BE /* LightWalletServiceTests.swift */; }; - 0DBF2CEA233291D10074C1BE /* Tests+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DBF2CE9233291D10074C1BE /* Tests+Utils.swift */; }; - 0DBF2CEC2332ACBD0074C1BE /* BlockDownloaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DBF2CEB2332ACBD0074C1BE /* BlockDownloaderTests.swift */; }; - 0DBF2CEE2332B3090074C1BE /* CompactBlockProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DBF2CED2332B3090074C1BE /* CompactBlockProcessor.swift */; }; - 0DBF2CF02332B8B70074C1BE /* Stubs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DBF2CEF2332B8B70074C1BE /* Stubs.swift */; }; - 0DDC86232358C39000C50148 /* BlockScanOperationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DDC86222358C39000C50148 /* BlockScanOperationTests.swift */; }; - 0DDC862A2358E50000C50148 /* sapling-output.params in Resources */ = {isa = PBXBuildFile; fileRef = 0DDC86282358E4FE00C50148 /* sapling-output.params */; }; - 0DDC862B2358E50000C50148 /* sapling-spend.params in Resources */ = {isa = PBXBuildFile; fileRef = 0DDC86292358E4FF00C50148 /* sapling-spend.params */; }; - 0DDC862D235905F600C50148 /* cache.db in Resources */ = {isa = PBXBuildFile; fileRef = 0DDC862C235905F600C50148 /* cache.db */; }; - 0DDF6378232FD02F000F9F01 /* Constants.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DDF6377232FD02F000F9F01 /* Constants.generated.swift */; }; - 0DE3CD4523317A6F00FD1EFA /* BlockDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DE3CD4423317A6F00FD1EFA /* BlockDownloader.swift */; }; - 0DF3154A2357A1CC0052E778 /* BlockRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DF315492357A1CC0052E778 /* BlockRepository.swift */; }; - 0DF3154D2357A2790052E778 /* BlockDao.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DF3154C2357A2790052E778 /* BlockDao.swift */; }; - 0DF3154F2357A81B0052E778 /* CompactBlockDAO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DF3154E2357A81B0052E778 /* CompactBlockDAO.swift */; }; - 0DF315512357B2750052E778 /* CompactBlockDownloadOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DF315502357B2750052E778 /* CompactBlockDownloadOperation.swift */; }; - 0DF315532357BF060052E778 /* DownloadOperationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DF315522357BF060052E778 /* DownloadOperationTests.swift */; }; - 0DF490DE23357A95005A4929 /* CompactBlockProcessorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DF490DD23357A95005A4929 /* CompactBlockProcessorTests.swift */; }; - 103AFE8F228312A30074BC98 /* ZcashLightClientKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 103AFE85228312A30074BC98 /* ZcashLightClientKit.framework */; }; - 103AFE94228312A30074BC98 /* ZcashLightClientKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 103AFE93228312A30074BC98 /* ZcashLightClientKitTests.swift */; }; - 103AFE96228312A30074BC98 /* ZcashLightClientKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 103AFE88228312A30074BC98 /* ZcashLightClientKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 103AFEA22283166B0074BC98 /* libzcashlc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 103AFEA12283166B0074BC98 /* libzcashlc.a */; }; - 103AFEA422831BB00074BC98 /* ZcashRustBackend.swift in Sources */ = {isa = PBXBuildFile; fileRef = 103AFEA322831BB00074BC98 /* ZcashRustBackend.swift */; }; - 103AFEAA228320F00074BC98 /* zcashlc.h in Headers */ = {isa = PBXBuildFile; fileRef = 103AFEA9228320F00074BC98 /* zcashlc.h */; settings = {ATTRIBUTES = (Public, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 103AFE90228312A30074BC98 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 103AFE7C228312A30074BC98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 103AFE84228312A30074BC98; - remoteInfo = ZcashLightClientKit; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 0B45933C22C612CB002A66BA /* ZcashRustBackendTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZcashRustBackendTests.swift; sourceTree = ""; }; - 0D4A552A2369FD1C00B26C23 /* CompactBlockValidationInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactBlockValidationInformation.swift; sourceTree = ""; }; - 0D54A83A2371D49400759FDF /* Synchronizer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Synchronizer.swift; sourceTree = ""; }; - 0D6487902365E1FE00129E57 /* ZcashOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZcashOperation.swift; sourceTree = ""; }; - 0D75A5CE2360C5F5009B2406 /* FakeService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeService.swift; sourceTree = ""; }; - 0D866A512334208000960888 /* ResourceProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResourceProvider.swift; sourceTree = ""; }; - 0D8AF10E235A733D0034D14A /* CompactBlockDownloaderBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactBlockDownloaderBuilder.swift; sourceTree = ""; }; - 0D9F5F1523537AD000D263C6 /* Storage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Storage.swift; sourceTree = ""; }; - 0D9F5F182353821400D263C6 /* StorageManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageManager.swift; sourceTree = ""; }; - 0D9F5F1A235388CA00D263C6 /* CompactBlockStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactBlockStorage.swift; sourceTree = ""; }; - 0D9F5F1C2353922500D263C6 /* CompactBlockStorageTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactBlockStorageTests.swift; sourceTree = ""; }; - 0D9F5F1E2353C27000D263C6 /* SQLite.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SQLite.framework; path = Carthage/Build/iOS/SQLite.framework; sourceTree = ""; }; - 0D9F8FCA23733947002202A2 /* SDKSynchronizer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDKSynchronizer.swift; sourceTree = ""; }; - 0DA33492232C0BC200CAC082 /* Initializer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Initializer.swift; sourceTree = ""; }; - 0DA33495232C11DF00CAC082 /* SeedProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SeedProvider.swift; sourceTree = ""; }; - 0DA33497232C1A8200CAC082 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; - 0DA33499232C1B6F00CAC082 /* WalletTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalletTests.swift; sourceTree = ""; }; - 0DA3DFAC2354BFC3008F8ECC /* TestDbBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestDbBuilder.swift; sourceTree = ""; }; - 0DA47A172356439400249DAF /* CompactBlockProcessingOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactBlockProcessingOperation.swift; sourceTree = ""; }; - 0DB456F3232A860200057720 /* ZcashCompactBlock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZcashCompactBlock.swift; sourceTree = ""; }; - 0DB456F7232A867800057720 /* service.proto */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.protobuf; path = service.proto; sourceTree = ""; }; - 0DB456F8232A867800057720 /* service.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = service.pb.swift; sourceTree = ""; }; - 0DB456F9232A867800057720 /* service.grpc.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = service.grpc.swift; sourceTree = ""; }; - 0DB456FA232A867800057720 /* compact_formats.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = compact_formats.pb.swift; sourceTree = ""; }; - 0DB456FB232A867800057720 /* compact_formats.proto */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.protobuf; path = compact_formats.proto; sourceTree = ""; }; - 0DB45701232A86EF00057720 /* LightWalletGRPCService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LightWalletGRPCService.swift; sourceTree = ""; }; - 0DB45704232AA06200057720 /* FakeStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeStorage.swift; sourceTree = ""; }; - 0DB45706232AA6AF00057720 /* ZcashLightClientKit.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = ZcashLightClientKit.modulemap; sourceTree = ""; }; - 0DB45708232AA81200057720 /* Protocolbuffer+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Protocolbuffer+Extensions.swift"; sourceTree = ""; }; - 0DB4570C232ACD3100057720 /* ZcashRustBackendWelding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZcashRustBackendWelding.swift; sourceTree = ""; }; - 0DB45710232ADD4B00057720 /* CompactBlockStoring.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactBlockStoring.swift; sourceTree = ""; }; - 0DB45712232AEAF200057720 /* LightWalletService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LightWalletService.swift; sourceTree = ""; }; - 0DBF2CE6233291530074C1BE /* LightWalletServiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LightWalletServiceTests.swift; sourceTree = ""; }; - 0DBF2CE9233291D10074C1BE /* Tests+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Tests+Utils.swift"; sourceTree = ""; }; - 0DBF2CEB2332ACBD0074C1BE /* BlockDownloaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockDownloaderTests.swift; sourceTree = ""; }; - 0DBF2CED2332B3090074C1BE /* CompactBlockProcessor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactBlockProcessor.swift; sourceTree = ""; }; - 0DBF2CEF2332B8B70074C1BE /* Stubs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Stubs.swift; sourceTree = ""; }; - 0DC64E6623284A2C0053EFAC /* CgRPC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CgRPC.framework; path = Carthage/Build/iOS/CgRPC.framework; sourceTree = ""; }; - 0DC64E6723284A2C0053EFAC /* SwiftGRPC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftGRPC.framework; path = Carthage/Build/iOS/SwiftGRPC.framework; sourceTree = ""; }; - 0DC64E6823284A2C0053EFAC /* BoringSSL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BoringSSL.framework; path = Carthage/Build/iOS/BoringSSL.framework; sourceTree = ""; }; - 0DC64E6923284A2C0053EFAC /* SwiftProtobuf.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftProtobuf.framework; path = Carthage/Build/iOS/SwiftProtobuf.framework; sourceTree = ""; }; - 0DDC86222358C39000C50148 /* BlockScanOperationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockScanOperationTests.swift; sourceTree = ""; }; - 0DDC86282358E4FE00C50148 /* sapling-output.params */ = {isa = PBXFileReference; lastKnownFileType = file; path = "sapling-output.params"; sourceTree = ""; }; - 0DDC86292358E4FF00C50148 /* sapling-spend.params */ = {isa = PBXFileReference; lastKnownFileType = file; path = "sapling-spend.params"; sourceTree = ""; }; - 0DDC862C235905F600C50148 /* cache.db */ = {isa = PBXFileReference; lastKnownFileType = file; path = cache.db; sourceTree = ""; }; - 0DDF6377232FD02F000F9F01 /* Constants.generated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.generated.swift; sourceTree = ""; }; - 0DE3CD4423317A6F00FD1EFA /* BlockDownloader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockDownloader.swift; sourceTree = ""; }; - 0DF315492357A1CC0052E778 /* BlockRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockRepository.swift; sourceTree = ""; }; - 0DF3154C2357A2790052E778 /* BlockDao.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockDao.swift; sourceTree = ""; }; - 0DF3154E2357A81B0052E778 /* CompactBlockDAO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactBlockDAO.swift; sourceTree = ""; }; - 0DF315502357B2750052E778 /* CompactBlockDownloadOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactBlockDownloadOperation.swift; sourceTree = ""; }; - 0DF315522357BF060052E778 /* DownloadOperationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadOperationTests.swift; sourceTree = ""; }; - 0DF490DD23357A95005A4929 /* CompactBlockProcessorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactBlockProcessorTests.swift; sourceTree = ""; }; - 103AFE85228312A30074BC98 /* ZcashLightClientKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ZcashLightClientKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 103AFE88228312A30074BC98 /* ZcashLightClientKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZcashLightClientKit.h; sourceTree = ""; }; - 103AFE89228312A30074BC98 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 103AFE8E228312A30074BC98 /* ZcashLightClientKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZcashLightClientKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 103AFE93228312A30074BC98 /* ZcashLightClientKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZcashLightClientKitTests.swift; sourceTree = ""; }; - 103AFE95228312A30074BC98 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 103AFEA12283166B0074BC98 /* libzcashlc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzcashlc.a; path = target/universal/debug/libzcashlc.a; sourceTree = ""; }; - 103AFEA322831BB00074BC98 /* ZcashRustBackend.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZcashRustBackend.swift; sourceTree = ""; }; - 103AFEA9228320F00074BC98 /* zcashlc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zcashlc.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 103AFE82228312A30074BC98 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 103AFEA22283166B0074BC98 /* libzcashlc.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 103AFE8B228312A30074BC98 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 103AFE8F228312A30074BC98 /* ZcashLightClientKit.framework in Frameworks */, - 0DB45714232B0AA800057720 /* BoringSSL.framework in Frameworks */, - 0DB45715232B0AA800057720 /* CgRPC.framework in Frameworks */, - 0D9F5F202353C27F00D263C6 /* SQLite.framework in Frameworks */, - 0DB45716232B0AA800057720 /* SwiftGRPC.framework in Frameworks */, - 0DB45717232B0AA800057720 /* SwiftProtobuf.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 0D54A83C2371D6EF00759FDF /* Synchronizer */ = { - isa = PBXGroup; - children = ( - 0D9F8FCA23733947002202A2 /* SDKSynchronizer.swift */, - ); - path = Synchronizer; - sourceTree = ""; - }; - 0D866A532334233500960888 /* Processor */ = { - isa = PBXGroup; - children = ( - 0DBF2CED2332B3090074C1BE /* CompactBlockProcessor.swift */, - 0DA47A172356439400249DAF /* CompactBlockProcessingOperation.swift */, - 0DF315502357B2750052E778 /* CompactBlockDownloadOperation.swift */, - 0D6487902365E1FE00129E57 /* ZcashOperation.swift */, - 0D4A552A2369FD1C00B26C23 /* CompactBlockValidationInformation.swift */, - ); - path = Processor; - sourceTree = ""; - }; - 0D9F5F17235381D100D263C6 /* DatabaseStorage */ = { - isa = PBXGroup; - children = ( - 0D9F5F182353821400D263C6 /* StorageManager.swift */, - 0D9F5F1A235388CA00D263C6 /* CompactBlockStorage.swift */, - ); - path = DatabaseStorage; - sourceTree = ""; - }; - 0DA33494232C11C600CAC082 /* Providers */ = { - isa = PBXGroup; - children = ( - 0DA33495232C11DF00CAC082 /* SeedProvider.swift */, - 0D866A512334208000960888 /* ResourceProvider.swift */, - ); - path = Providers; - sourceTree = ""; - }; - 0DB456F2232A85D900057720 /* Model */ = { - isa = PBXGroup; - children = ( - 0DB456F3232A860200057720 /* ZcashCompactBlock.swift */, - ); - path = Model; - sourceTree = ""; - }; - 0DB456F5232A863700057720 /* Service */ = { - isa = PBXGroup; - children = ( - 0DB45701232A86EF00057720 /* LightWalletGRPCService.swift */, - 0DB456F2232A85D900057720 /* Model */, - 0DB456F6232A864B00057720 /* ProtoBuf */, - 0DB45712232AEAF200057720 /* LightWalletService.swift */, - ); - path = Service; - sourceTree = ""; - }; - 0DB456F6232A864B00057720 /* ProtoBuf */ = { - isa = PBXGroup; - children = ( - 0DB45707232AA70900057720 /* Extensions */, - 0DB456FA232A867800057720 /* compact_formats.pb.swift */, - 0DB4570A232AA84000057720 /* proto */, - 0DB456F9232A867800057720 /* service.grpc.swift */, - 0DB456F8232A867800057720 /* service.pb.swift */, - ); - path = ProtoBuf; - sourceTree = ""; - }; - 0DB45703232AA03C00057720 /* Storage */ = { - isa = PBXGroup; - children = ( - 0DF3154B2357A2680052E778 /* DAO */, - 0DB45710232ADD4B00057720 /* CompactBlockStoring.swift */, - 0D9F5F1523537AD000D263C6 /* Storage.swift */, - 0DF315492357A1CC0052E778 /* BlockRepository.swift */, - ); - path = Storage; - sourceTree = ""; - }; - 0DB45707232AA70900057720 /* Extensions */ = { - isa = PBXGroup; - children = ( - 0DB45708232AA81200057720 /* Protocolbuffer+Extensions.swift */, - ); - path = Extensions; - sourceTree = ""; - }; - 0DB4570A232AA84000057720 /* proto */ = { - isa = PBXGroup; - children = ( - 0DB456FB232A867800057720 /* compact_formats.proto */, - 0DB456F7232A867800057720 /* service.proto */, - ); - path = proto; - sourceTree = ""; - }; - 0DB4570B232ACD1700057720 /* Rust */ = { - isa = PBXGroup; - children = ( - 103AFEA322831BB00074BC98 /* ZcashRustBackend.swift */, - 0DB4570C232ACD3100057720 /* ZcashRustBackendWelding.swift */, - ); - path = Rust; - sourceTree = ""; - }; - 0DBF2CE8233291C10074C1BE /* utils */ = { - isa = PBXGroup; - children = ( - 0DB45704232AA06200057720 /* FakeStorage.swift */, - 0DBF2CEF2332B8B70074C1BE /* Stubs.swift */, - 0DBF2CE9233291D10074C1BE /* Tests+Utils.swift */, - 0DA3DFAC2354BFC3008F8ECC /* TestDbBuilder.swift */, - 0D75A5CE2360C5F5009B2406 /* FakeService.swift */, - ); - path = utils; - sourceTree = ""; - }; - 0DE3CD4223317A1200FD1EFA /* Block */ = { - isa = PBXGroup; - children = ( - 0D9F5F17235381D100D263C6 /* DatabaseStorage */, - 0DE3CD4323317A3500FD1EFA /* Downloader */, - 0DB45703232AA03C00057720 /* Storage */, - 0D866A532334233500960888 /* Processor */, - ); - path = Block; - sourceTree = ""; - }; - 0DE3CD4323317A3500FD1EFA /* Downloader */ = { - isa = PBXGroup; - children = ( - 0DE3CD4423317A6F00FD1EFA /* BlockDownloader.swift */, - 0D8AF10E235A733D0034D14A /* CompactBlockDownloaderBuilder.swift */, - ); - path = Downloader; - sourceTree = ""; - }; - 0DF3154B2357A2680052E778 /* DAO */ = { - isa = PBXGroup; - children = ( - 0DF3154C2357A2790052E778 /* BlockDao.swift */, - 0DF3154E2357A81B0052E778 /* CompactBlockDAO.swift */, - ); - path = DAO; - sourceTree = ""; - }; - 103AFE7B228312A30074BC98 = { - isa = PBXGroup; - children = ( - 0DB45706232AA6AF00057720 /* ZcashLightClientKit.modulemap */, - 103AFE87228312A30074BC98 /* ZcashLightClientKit */, - 103AFE92228312A30074BC98 /* ZcashLightClientKitTests */, - 103AFE86228312A30074BC98 /* Products */, - 103AFEA02283166B0074BC98 /* Frameworks */, - ); - sourceTree = ""; - }; - 103AFE86228312A30074BC98 /* Products */ = { - isa = PBXGroup; - children = ( - 103AFE85228312A30074BC98 /* ZcashLightClientKit.framework */, - 103AFE8E228312A30074BC98 /* ZcashLightClientKitTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 103AFE87228312A30074BC98 /* ZcashLightClientKit */ = { - isa = PBXGroup; - children = ( - 0D54A83C2371D6EF00759FDF /* Synchronizer */, - 0DE3CD4223317A1200FD1EFA /* Block */, - 0DA33494232C11C600CAC082 /* Providers */, - 0DB456F5232A863700057720 /* Service */, - 103AFEA7228320F00074BC98 /* zcashlc */, - 103AFE88228312A30074BC98 /* ZcashLightClientKit.h */, - 0DB4570B232ACD1700057720 /* Rust */, - 103AFE89228312A30074BC98 /* Info.plist */, - 0DA33492232C0BC200CAC082 /* Initializer.swift */, - 0DA33497232C1A8200CAC082 /* Constants.swift */, - 0D54A83A2371D49400759FDF /* Synchronizer.swift */, - ); - path = ZcashLightClientKit; - sourceTree = ""; - }; - 103AFE92228312A30074BC98 /* ZcashLightClientKitTests */ = { - isa = PBXGroup; - children = ( - 0DDC862C235905F600C50148 /* cache.db */, - 0DDC86282358E4FE00C50148 /* sapling-output.params */, - 0DDC86292358E4FF00C50148 /* sapling-spend.params */, - 0DBF2CE8233291C10074C1BE /* utils */, - 0DDF6377232FD02F000F9F01 /* Constants.generated.swift */, - 103AFE93228312A30074BC98 /* ZcashLightClientKitTests.swift */, - 0B45933C22C612CB002A66BA /* ZcashRustBackendTests.swift */, - 0DA33499232C1B6F00CAC082 /* WalletTests.swift */, - 103AFE95228312A30074BC98 /* Info.plist */, - 0DBF2CE6233291530074C1BE /* LightWalletServiceTests.swift */, - 0DBF2CEB2332ACBD0074C1BE /* BlockDownloaderTests.swift */, - 0DF490DD23357A95005A4929 /* CompactBlockProcessorTests.swift */, - 0D9F5F1C2353922500D263C6 /* CompactBlockStorageTests.swift */, - 0DF315522357BF060052E778 /* DownloadOperationTests.swift */, - 0DDC86222358C39000C50148 /* BlockScanOperationTests.swift */, - ); - path = ZcashLightClientKitTests; - sourceTree = ""; - }; - 103AFEA02283166B0074BC98 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 0D9F5F1E2353C27000D263C6 /* SQLite.framework */, - 0DC64E6823284A2C0053EFAC /* BoringSSL.framework */, - 0DC64E6623284A2C0053EFAC /* CgRPC.framework */, - 0DC64E6723284A2C0053EFAC /* SwiftGRPC.framework */, - 0DC64E6923284A2C0053EFAC /* SwiftProtobuf.framework */, - 103AFEA12283166B0074BC98 /* libzcashlc.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 103AFEA7228320F00074BC98 /* zcashlc */ = { - isa = PBXGroup; - children = ( - 103AFEA9228320F00074BC98 /* zcashlc.h */, - ); - path = zcashlc; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 103AFE80228312A30074BC98 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 103AFE96228312A30074BC98 /* ZcashLightClientKit.h in Headers */, - 103AFEAA228320F00074BC98 /* zcashlc.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 103AFE84228312A30074BC98 /* ZcashLightClientKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 103AFE99228312A30074BC98 /* Build configuration list for PBXNativeTarget "ZcashLightClientKit" */; - buildPhases = ( - 103AFE80228312A30074BC98 /* Headers */, - 103AFE9F2283152F0074BC98 /* ShellScript */, - 0D3BA6B1235A420B00E0E0F4 /* ShellScript */, - 103AFE81228312A30074BC98 /* Sources */, - 103AFE82228312A30074BC98 /* Frameworks */, - 103AFE83228312A30074BC98 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ZcashLightClientKit; - productName = ZcashLightClientKit; - productReference = 103AFE85228312A30074BC98 /* ZcashLightClientKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 103AFE8D228312A30074BC98 /* ZcashLightClientKitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 103AFE9C228312A30074BC98 /* Build configuration list for PBXNativeTarget "ZcashLightClientKitTests" */; - buildPhases = ( - 0DDF6379232FD0B4000F9F01 /* ShellScript */, - 103AFE8A228312A30074BC98 /* Sources */, - 103AFE8B228312A30074BC98 /* Frameworks */, - 103AFE8C228312A30074BC98 /* Resources */, - 0D35E05E2330007B00D5901F /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 103AFE91228312A30074BC98 /* PBXTargetDependency */, - ); - name = ZcashLightClientKitTests; - productName = ZcashLightClientKitTests; - productReference = 103AFE8E228312A30074BC98 /* ZcashLightClientKitTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 103AFE7C228312A30074BC98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1020; - LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "Electric Coin Company"; - TargetAttributes = { - 103AFE84228312A30074BC98 = { - CreatedOnToolsVersion = 10.2.1; - LastSwiftMigration = 1020; - }; - 103AFE8D228312A30074BC98 = { - CreatedOnToolsVersion = 10.2.1; - }; - }; - }; - buildConfigurationList = 103AFE7F228312A30074BC98 /* Build configuration list for PBXProject "ZcashLightClientKit" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 103AFE7B228312A30074BC98; - productRefGroup = 103AFE86228312A30074BC98 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 103AFE84228312A30074BC98 /* ZcashLightClientKit */, - 103AFE8D228312A30074BC98 /* ZcashLightClientKitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 103AFE83228312A30074BC98 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 103AFE8C228312A30074BC98 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0DDC862A2358E50000C50148 /* sapling-output.params in Resources */, - 0DDC862D235905F600C50148 /* cache.db in Resources */, - 0DDC862B2358E50000C50148 /* sapling-spend.params in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0D35E05E2330007B00D5901F /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "$(SRCROOT)/filelists/input.xcfilelist", - ); - inputPaths = ( - ); - outputFileListPaths = ( - "$(SRCROOT)/filelists/output.xcfilelist", - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/usr/local/bin/carthage copy-frameworks\n"; - }; - 0D3BA6B1235A420B00E0E0F4 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint lint --config .swiftlint.yml\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; - }; - 0DDF6379232FD0B4000F9F01 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - "$(SRCROOT)/Constants.generated.swift", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "#check if env-vars.sh exists\nif [ -f ${SRCROOT}/env-vars.sh ];then\nsource ${SRCROOT}/env-vars.sh\nfi\n\nexport ZCASH_TEST_SRC_PATH=\"${SRCROOT}/ZcashLightClientKitTests\"\nif ![ ${LIGHTWALLETD_ADDRESS} ]; then\n echo \"LIGHTWALLETD_ADDRESS VARIABLE NOT DEFINED\"\n exit 1\nfi\necho \"export ZCASH_TEST_SRC_PATH=$ZCASH_TEST_SRC_PATH\"\n#no `else` case needed if the CI works as expecteds\nsourcery --templates ${ZCASH_TEST_SRC_PATH} --sources ${ZCASH_TEST_SRC_PATH} --output ${ZCASH_TEST_SRC_PATH} --args addr=$LIGHTWALLETD_ADDRESS\n"; - }; - 103AFE9F2283152F0074BC98 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(SRCROOT)/Cargo.toml", - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export PATH=\"$HOME/.cargo/bin:$PATH\"\nif [ \"$ACTION\" = \"clean\" ]; then\n cargo clean\nelse\n cargo lipo --xcode-integ --manifest-path ./Cargo.toml\nfi\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 103AFE81228312A30074BC98 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0DA33493232C0BC200CAC082 /* Initializer.swift in Sources */, - 0DB45713232AEAF200057720 /* LightWalletService.swift in Sources */, - 0DB456FD232A867800057720 /* service.pb.swift in Sources */, - 0DB45702232A86EF00057720 /* LightWalletGRPCService.swift in Sources */, - 0D4A552B2369FD1C00B26C23 /* CompactBlockValidationInformation.swift in Sources */, - 0DE3CD4523317A6F00FD1EFA /* BlockDownloader.swift in Sources */, - 0D9F5F1623537AD000D263C6 /* Storage.swift in Sources */, - 0DA33496232C11DF00CAC082 /* SeedProvider.swift in Sources */, - 0D8AF10F235A733D0034D14A /* CompactBlockDownloaderBuilder.swift in Sources */, - 0DB456FE232A867800057720 /* service.grpc.swift in Sources */, - 0D9F8FCB23733947002202A2 /* SDKSynchronizer.swift in Sources */, - 0DA47A182356439400249DAF /* CompactBlockProcessingOperation.swift in Sources */, - 0D54A83B2371D49400759FDF /* Synchronizer.swift in Sources */, - 103AFEA422831BB00074BC98 /* ZcashRustBackend.swift in Sources */, - 0DBF2CEE2332B3090074C1BE /* CompactBlockProcessor.swift in Sources */, - 0DB45709232AA81200057720 /* Protocolbuffer+Extensions.swift in Sources */, - 0D9F5F192353821400D263C6 /* StorageManager.swift in Sources */, - 0DB4570D232ACD3100057720 /* ZcashRustBackendWelding.swift in Sources */, - 0D6487912365E1FE00129E57 /* ZcashOperation.swift in Sources */, - 0DF3154F2357A81B0052E778 /* CompactBlockDAO.swift in Sources */, - 0DB45711232ADD4B00057720 /* CompactBlockStoring.swift in Sources */, - 0D866A522334208100960888 /* ResourceProvider.swift in Sources */, - 0D9F5F1B235388CA00D263C6 /* CompactBlockStorage.swift in Sources */, - 0DF315512357B2750052E778 /* CompactBlockDownloadOperation.swift in Sources */, - 0DA33498232C1A8200CAC082 /* Constants.swift in Sources */, - 0DF3154D2357A2790052E778 /* BlockDao.swift in Sources */, - 0DB456FF232A867800057720 /* compact_formats.pb.swift in Sources */, - 0DB456F4232A860200057720 /* ZcashCompactBlock.swift in Sources */, - 0DF3154A2357A1CC0052E778 /* BlockRepository.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 103AFE8A228312A30074BC98 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0D75A5CF2360C5F5009B2406 /* FakeService.swift in Sources */, - 0DA3DFAD2354BFC3008F8ECC /* TestDbBuilder.swift in Sources */, - 0B45933D22C612CB002A66BA /* ZcashRustBackendTests.swift in Sources */, - 0D9F5F1D2353922500D263C6 /* CompactBlockStorageTests.swift in Sources */, - 0DF490DE23357A95005A4929 /* CompactBlockProcessorTests.swift in Sources */, - 0DA47A1623561FD700249DAF /* FakeStorage.swift in Sources */, - 0DBF2CEA233291D10074C1BE /* Tests+Utils.swift in Sources */, - 0DDC86232358C39000C50148 /* BlockScanOperationTests.swift in Sources */, - 0DBF2CEC2332ACBD0074C1BE /* BlockDownloaderTests.swift in Sources */, - 0DBF2CE7233291530074C1BE /* LightWalletServiceTests.swift in Sources */, - 0DA3349A232C1B6F00CAC082 /* WalletTests.swift in Sources */, - 0DDF6378232FD02F000F9F01 /* Constants.generated.swift in Sources */, - 103AFE94228312A30074BC98 /* ZcashLightClientKitTests.swift in Sources */, - 0DBF2CF02332B8B70074C1BE /* Stubs.swift in Sources */, - 0DF315532357BF060052E778 /* DownloadOperationTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 103AFE91228312A30074BC98 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 103AFE84228312A30074BC98 /* ZcashLightClientKit */; - targetProxy = 103AFE90228312A30074BC98 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 103AFE97228312A30074BC98 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.2; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 103AFE98228312A30074BC98 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.2; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 103AFE9A228312A30074BC98 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/iOS"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = ZcashLightClientKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/target/universal/debug", - ); - MODULEMAP_FILE = "$(SRCROOT)/ZcashLightClientKit.modulemap"; - PRODUCT_BUNDLE_IDENTIFIER = co.electriccoin.ZcashLightClientKit; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_INCLUDE_PATHS = "${SRCROOT}/ZcashLightClientKit/zcashlc"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - }; - name = Debug; - }; - 103AFE9B228312A30074BC98 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/iOS"; - GCC_PREPROCESSOR_DEFINITIONS = ""; - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = ZcashLightClientKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/target/universal/release", - ); - MODULEMAP_FILE = "$(SRCROOT)/ZcashLightClientKit.modulemap"; - PRODUCT_BUNDLE_IDENTIFIER = co.electriccoin.ZcashLightClientKit; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_INCLUDE_PATHS = "${SRCROOT}/ZcashLightClientKit/zcashlc"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - }; - name = Release; - }; - 103AFE9D228312A30074BC98 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = ZcashLightClientKitTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = co.electriccoin.ZcashLightClientKitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 103AFE9E228312A30074BC98 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - ); - INFOPLIST_FILE = ZcashLightClientKitTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = co.electriccoin.ZcashLightClientKitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 103AFE7F228312A30074BC98 /* Build configuration list for PBXProject "ZcashLightClientKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 103AFE97228312A30074BC98 /* Debug */, - 103AFE98228312A30074BC98 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 103AFE99228312A30074BC98 /* Build configuration list for PBXNativeTarget "ZcashLightClientKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 103AFE9A228312A30074BC98 /* Debug */, - 103AFE9B228312A30074BC98 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 103AFE9C228312A30074BC98 /* Build configuration list for PBXNativeTarget "ZcashLightClientKitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 103AFE9D228312A30074BC98 /* Debug */, - 103AFE9E228312A30074BC98 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 103AFE7C228312A30074BC98 /* Project object */; -} diff --git a/ZcashLightClientKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ZcashLightClientKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 6fdd3e60..00000000 --- a/ZcashLightClientKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/ZcashLightClientKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ZcashLightClientKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/ZcashLightClientKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/ZcashLightClientKit/Info.plist b/ZcashLightClientKit/Info.plist deleted file mode 100644 index 0a87e206..00000000 --- a/ZcashLightClientKit/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.1 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - - diff --git a/ZcashLightClientKit/ZcashLightClientKit.h b/ZcashLightClientKit/ZcashLightClientKit.h deleted file mode 100644 index 5babf7b8..00000000 --- a/ZcashLightClientKit/ZcashLightClientKit.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// ZcashLightClientKit.h -// ZcashLightClientKit -// -// Created by Jack Grigg on 5/8/19. -// Copyright © 2019 Electric Coin Company. All rights reserved. -// - -#import - -//! Project version number for ZcashLightClientKit. -FOUNDATION_EXPORT double ZcashLightClientKitVersionNumber; - -//! Project version string for ZcashLightClientKit. -FOUNDATION_EXPORT const unsigned char ZcashLightClientKitVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/ZcashLightClientKit/zcashlc/zcashlc.h b/ZcashLightClientKit/zcashlc/zcashlc.h deleted file mode 100644 index 84eab76d..00000000 --- a/ZcashLightClientKit/zcashlc/zcashlc.h +++ /dev/null @@ -1,382 +0,0 @@ -#include -#include -#include -#include - -typedef struct { - const char *extfvk; - const char *extpub; -} FFIUnifiedViewingKey; - -typedef struct { - FFIUnifiedViewingKey *ptr; - uintptr_t len; -} FFIUVKBoxedSlice; - -int32_t zcashlc_branch_id_for_height(int32_t height, uint32_t network_id); - -/** - * Clears the record of the last error message. - */ -void zcashlc_clear_last_error(void); - -int32_t zcashlc_clear_utxos(const uint8_t *db_data, - uintptr_t db_data_len, - const char *taddress, - int32_t above_height, - uint32_t network_id); - -/** - * Creates a transaction paying the specified address from the given account. - * - * Returns the row index of the newly-created transaction in the `transactions` table - * within the data database. The caller can read the raw transaction bytes from the `raw` - * column in order to broadcast the transaction to the network. - * - * Do not call this multiple times in parallel, or you will generate transactions that - * double-spend the same notes. - */ -int64_t zcashlc_create_to_address(const uint8_t *db_data, - uintptr_t db_data_len, - int32_t account, - const char *extsk, - const char *to, - int64_t value, - const char *memo, - const uint8_t *spend_params, - uintptr_t spend_params_len, - const uint8_t *output_params, - uintptr_t output_params_len, - uint32_t network_id); - -int32_t zcashlc_decrypt_and_store_transaction(const uint8_t *db_data, - uintptr_t db_data_len, - const uint8_t *tx, - uintptr_t tx_len, - uint32_t _mined_height, - uint32_t network_id); - -/** - * derives a shielded address from the given extended full viewing key. - * call zcashlc_string_free with the returned pointer when done using it - */ -char *zcashlc_derive_extended_full_viewing_key(const char *extsk, uint32_t network_id); - -/** - * Derives Extended Full Viewing Keys from the given seed into 'accounts' number of accounts. - * Returns the Extended Full Viewing Keys for the accounts. The caller should store these - * securely - * - * Call `zcashlc_vec_string_free` on the returned pointer when you are finished with it. - */ -char **zcashlc_derive_extended_full_viewing_keys(const uint8_t *seed, - uintptr_t seed_len, - int32_t accounts, - uintptr_t *capacity_ret, - uint32_t network_id); - -/** - * Derives Extended Spending Keys from the given seed into 'accounts' number of accounts. - * Returns the ExtendedSpendingKeys for the accounts. The caller should store these - * securely for use while spending. - * - * Call `zcashlc_vec_string_free` on the returned pointer when you are finished with it. - */ -char **zcashlc_derive_extended_spending_keys(const uint8_t *seed, - uintptr_t seed_len, - int32_t accounts, - uintptr_t *capacity_ret, - uint32_t network_id); - -/** - * derives a shielded address from the given seed. - * call zcashlc_string_free with the returned pointer when done using it - */ -char *zcashlc_derive_shielded_address_from_seed(const uint8_t *seed, - uintptr_t seed_len, - int32_t account_index, - uint32_t network_id); - -/** - * derives a shielded address from the given viewing key. - * call zcashlc_string_free with the returned pointer when done using it - */ -char *zcashlc_derive_shielded_address_from_viewing_key(const char *extfvk, uint32_t network_id); - -/** - * derives a shielded address from the given viewing key. - * call zcashlc_string_free with the returned pointer when done using it - */ -char *zcashlc_derive_transparent_address_from_public_key(const char *pubkey, uint32_t network_id); - -/** - * Derives a transparent address from the given secret key enconded as a WIF string - */ -char *zcashlc_derive_transparent_address_from_secret_key(const char *tsk, uint32_t network_id); - -/** - * Derives a transparent address from the given seed - */ -char *zcashlc_derive_transparent_address_from_seed(const uint8_t *seed, - uintptr_t seed_len, - int32_t account, - int32_t index, - uint32_t network_id); - -/** - * Derives a transparent private key from seed - */ -char *zcashlc_derive_transparent_private_key_from_seed(const uint8_t *seed, - uintptr_t seed_len, - int32_t account, - int32_t index, - uint32_t network_id); - -FFIUVKBoxedSlice *zcashlc_derive_unified_viewing_keys_from_seed(const uint8_t *seed, - uintptr_t seed_len, - int32_t accounts, - uint32_t network_id); - -/** - * Copies the last error message into the provided allocated buffer. - */ -int32_t zcashlc_error_message_utf8(char *buf, int32_t length); - -void zcashlc_free_uvk_array(FFIUVKBoxedSlice *uvks); - -/** - * Returns the address for the account. - * - * Call `zcashlc_string_free` on the returned pointer when you are finished with it. - */ -char *zcashlc_get_address(const uint8_t *db_data, - uintptr_t db_data_len, - int32_t account, - uint32_t network_id); - -/** - * Returns the balance for the account, including all unspent notes that we know about. - */ -int64_t zcashlc_get_balance(const uint8_t *db_data, - uintptr_t db_data_len, - int32_t account, - uint32_t network_id); - -int32_t zcashlc_get_nearest_rewind_height(const uint8_t *db_data, - uintptr_t db_data_len, - int32_t height, - uint32_t network_id); - -/** - * Returns the memo for a received note, if it is known and a valid UTF-8 string. - * - * The note is identified by its row index in the `received_notes` table within the data - * database. - * - * Call `zcashlc_string_free` on the returned pointer when you are finished with it. - */ -char *zcashlc_get_received_memo_as_utf8(const uint8_t *db_data, - uintptr_t db_data_len, - int64_t id_note, - uint32_t network_id); - -/** - * Returns the memo for a sent note, if it is known and a valid UTF-8 string. - * - * The note is identified by its row index in the `sent_notes` table within the data - * database. - * - * Call `zcashlc_string_free` on the returned pointer when you are finished with it. - */ -char *zcashlc_get_sent_memo_as_utf8(const uint8_t *db_data, - uintptr_t db_data_len, - int64_t id_note, - uint32_t network_id); - -/** - * Returns the verified transparent balance for the address, which ignores utxos that have been - * received too recently and are not yet deemed spendable. - */ -int64_t zcashlc_get_total_transparent_balance(const uint8_t *db_data, - uintptr_t db_data_len, - const char *address, - uint32_t network_id); - -/** - * Returns the verified balance for the account, which ignores notes that have been - * received too recently and are not yet deemed spendable. - */ -int64_t zcashlc_get_verified_balance(const uint8_t *db_data, - uintptr_t db_data_len, - int32_t account, - uint32_t network_id); - -/** - * Returns the verified transparent balance for the address, which ignores utxos that have been - * received too recently and are not yet deemed spendable. - */ -int64_t zcashlc_get_verified_transparent_balance(const uint8_t *db_data, - uintptr_t db_data_len, - const char *address, - uint32_t network_id); - -/** - * Initialises the data database with the given number of accounts using the given seed. - * - * Returns the ExtendedSpendingKeys for the accounts. The caller should store these - * securely for use while spending. - * - * Call `zcashlc_vec_string_free` on the returned pointer when you are finished with it. - */ -char **zcashlc_init_accounts_table(const uint8_t *db_data, - uintptr_t db_data_len, - const uint8_t *seed, - uintptr_t seed_len, - int32_t accounts, - uintptr_t *capacity_ret, - uint32_t network_id); - -/** - * Initialises the data database with the given extended full viewing keys - * Call `zcashlc_vec_string_free` on the returned pointer when you are finished with it. - */ -bool zcashlc_init_accounts_table_with_keys(const uint8_t *db_data, - uintptr_t db_data_len, - FFIUVKBoxedSlice *uvks, - uint32_t network_id); - -/** - * Initialises the data database with the given block. - * - * This enables a newly-created database to be immediately-usable, without needing to - * synchronise historic blocks. - */ -int32_t zcashlc_init_blocks_table(const uint8_t *db_data, - uintptr_t db_data_len, - int32_t height, - const char *hash_hex, - uint32_t time, - const char *sapling_tree_hex, - uint32_t network_id); - -/** - * Sets up the internal structure of the data database. - */ -int32_t zcashlc_init_data_database(const uint8_t *db_data, - uintptr_t db_data_len, - uint32_t network_id); - -/** - * Returns true when the address is valid and shielded. - * Returns false in any other case - * Errors when the provided address belongs to another network - */ -bool zcashlc_is_valid_shielded_address(const char *address, uint32_t network_id); - -/** - * Returns true when the address is valid and transparent. - * Returns false in any other case - */ -bool zcashlc_is_valid_transparent_address(const char *address, uint32_t network_id); - -/** - * returns whether the given viewing key is valid or not - */ -bool zcashlc_is_valid_viewing_key(const char *key, uint32_t network_id); - -/** - * Returns the length of the last error message to be logged. - */ -int32_t zcashlc_last_error_length(void); - -bool zcashlc_put_utxo(const uint8_t *db_data, - uintptr_t db_data_len, - const char *address_str, - const uint8_t *txid_bytes, - uintptr_t txid_bytes_len, - int32_t index, - const uint8_t *script_bytes, - uintptr_t script_bytes_len, - int64_t value, - int32_t height, - uint32_t network_id); - -/** - * Rewinds the data database to the given height. - * - * If the requested height is greater than or equal to the height of the last scanned - * block, this function does nothing. - */ -bool zcashlc_rewind_to_height(const uint8_t *db_data, - uintptr_t db_data_len, - int32_t height, - uint32_t network_id); - -/** - * Scans new blocks added to the cache for any transactions received by the tracked - * accounts. - * - * This function pays attention only to cached blocks with heights greater than the - * highest scanned block in `db_data`. Cached blocks with lower heights are not verified - * against previously-scanned blocks. In particular, this function **assumes** that the - * caller is handling rollbacks. - * - * For brand-new light client databases, this function starts scanning from the Sapling - * activation height. This height can be fast-forwarded to a more recent block by calling - * [`zcashlc_init_blocks_table`] before this function. - * - * Scanned blocks are required to be height-sequential. If a block is missing from the - * cache, an error will be signalled. - */ -int32_t zcashlc_scan_blocks(const uint8_t *db_cache, - uintptr_t db_cache_len, - const uint8_t *db_data, - uintptr_t db_data_len, - uint32_t scan_limit, - uint32_t network_id); - -int64_t zcashlc_shield_funds(const uint8_t *db_data, - uintptr_t db_data_len, - int32_t account, - const char *tsk, - const char *extsk, - const char *memo, - const uint8_t *spend_params, - uintptr_t spend_params_len, - const uint8_t *output_params, - uintptr_t output_params_len, - uint32_t network_id); - -/** - * Frees strings returned by other zcashlc functions. - */ -void zcashlc_string_free(char *s); - -/** - * Checks that the scanned blocks in the data database, when combined with the recent - * `CompactBlock`s in the cache database, form a valid chain. - * - * This function is built on the core assumption that the information provided in the - * cache database is more likely to be accurate than the previously-scanned information. - * This follows from the design (and trust) assumption that the `lightwalletd` server - * provides accurate block information as of the time it was requested. - * - * Returns: - * - `-1` if the combined chain is valid. - * - `upper_bound` if the combined chain is invalid. - * `upper_bound` is the height of the highest invalid block (on the assumption that the - * highest block in the cache database is correct). - * - `0` if there was an error during validation unrelated to chain validity. - * - * This function does not mutate either of the databases. - */ -int32_t zcashlc_validate_combined_chain(const uint8_t *db_cache, - uintptr_t db_cache_len, - const uint8_t *db_data, - uintptr_t db_data_len, - uint32_t network_id); - -/** - * Frees vectors of strings returned by other zcashlc functions. - */ -void zcashlc_vec_string_free(char **v, uintptr_t len, uintptr_t capacity); diff --git a/ZcashLightClientKitTests/Info.plist b/ZcashLightClientKitTests/Info.plist deleted file mode 100644 index 6c40a6cd..00000000 --- a/ZcashLightClientKitTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/ZcashLightClientKitTests/Stencil/Constants.stencil b/ZcashLightClientKitTests/Stencil/Constants.stencil deleted file mode 100644 index 1020fbcf..00000000 --- a/ZcashLightClientKitTests/Stencil/Constants.stencil +++ /dev/null @@ -1,4 +0,0 @@ -public struct Constants { - static let address: String = "{{ argument.addr }}" -} - diff --git a/rust/build.rs b/rust/build.rs deleted file mode 100644 index 7e155e65..00000000 --- a/rust/build.rs +++ /dev/null @@ -1,15 +0,0 @@ -extern crate cbindgen; - -use std::env; - -fn main() { - let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); - - if let Ok(b) = cbindgen::Builder::new() - .with_crate(crate_dir) - .with_language(cbindgen::Language::C) - .generate() { - b.write_to_file("ZcashLightClientKit/zcashlc/zcashlc.h"); - } - -} diff --git a/rust/src/lib.rs b/rust/src/lib.rs deleted file mode 100644 index c17ae2bf..00000000 --- a/rust/src/lib.rs +++ /dev/null @@ -1,1414 +0,0 @@ -use failure::format_err; -use ffi_helpers::panic::catch_panic; -use std::ffi::{CStr, CString, OsStr}; -use std::os::raw::c_char; -use std::os::unix::ffi::OsStrExt; -use std::path::Path; -use std::slice; -use std::str::FromStr; -use zcash_client_backend::{ - address::RecipientAddress, - data_api::{ - chain::{scan_cached_blocks, validate_chain}, - error::Error, - wallet::{create_spend_to_address, decrypt_and_store_transaction, shield_funds}, - WalletRead, - }, - encoding::{ - AddressCodec, - decode_extended_full_viewing_key, - decode_extended_spending_key, - encode_extended_full_viewing_key, - encode_extended_spending_key, - encode_payment_address, - }, - keys::{ - derive_secret_key_from_seed, - derive_public_key_from_seed, - derive_transparent_address_from_public_key, - derive_transparent_address_from_secret_key, - spending_key, Wif, - }, - wallet::{AccountId, OvkPolicy, WalletTransparentOutput}, -}; -use zcash_client_sqlite::{ - error::SqliteClientError, - wallet::{ - rewind_to_height, - get_rewind_height, - put_received_transparent_utxo, delete_utxos_above, - init::{init_accounts_table, init_blocks_table, init_wallet_db,} - }, - BlockDb, NoteId, WalletDb, -}; -use zcash_primitives::{ - block::BlockHash, - consensus::{BlockHeight, BranchId, Network, Parameters}, - memo::{Memo, MemoBytes}, - transaction::{components::Amount, components::OutPoint, Transaction}, - zip32::ExtendedFullViewingKey, - legacy::TransparentAddress, -}; -use zcash_primitives::consensus::Network::{MainNetwork, TestNetwork}; - -use zcash_proofs::prover::LocalTxProver; -use std::convert::{TryFrom, TryInto}; -use secp256k1::key::{SecretKey, PublicKey}; - -const ANCHOR_OFFSET: u32 = 10; - -fn unwrap_exc_or(exc: Result, def: T) -> T { - match exc { - Ok(value) => value, - Err(_) => def, - } -} - -fn unwrap_exc_or_null(exc: Result) -> T -where - T: ffi_helpers::Nullable, -{ - match exc { - Ok(value) => value, - Err(_) => ffi_helpers::Nullable::NULL, - } -} - - -fn wallet_db( - db_data: *const u8, - db_data_len: usize, - network: Network, -) -> Result, failure::Error> { - let db_data = Path::new(OsStr::from_bytes(unsafe { - slice::from_raw_parts(db_data, db_data_len) - })); - WalletDb::for_path(db_data, network) - .map_err(|e| format_err!("Error opening wallet database connection: {}", e)) -} - -fn block_db(cache_db: *const u8, - cache_db_len: usize) -> Result { - let cache_db = Path::new(OsStr::from_bytes(unsafe { - slice::from_raw_parts(cache_db, cache_db_len) - })); - BlockDb::for_path(cache_db) - .map_err(|e| format_err!("Error opening block source database connection: {}", e)) -} - -/// Returns the length of the last error message to be logged. -#[no_mangle] -pub extern "C" fn zcashlc_last_error_length() -> i32 { - ffi_helpers::error_handling::last_error_length() -} - -/// Copies the last error message into the provided allocated buffer. -#[no_mangle] -pub unsafe extern "C" fn zcashlc_error_message_utf8(buf: *mut c_char, length: i32) -> i32 { - ffi_helpers::error_handling::error_message_utf8(buf, length) -} - -/// Clears the record of the last error message. -#[no_mangle] -pub extern "C" fn zcashlc_clear_last_error() { - ffi_helpers::error_handling::clear_last_error() -} - -/// Sets up the internal structure of the data database. -#[no_mangle] -pub extern "C" fn zcashlc_init_data_database( - db_data: *const u8, - db_data_len: usize, - network_id: u32, -) -> i32 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = Path::new(OsStr::from_bytes(unsafe { - slice::from_raw_parts(db_data, db_data_len) - })); - - WalletDb::for_path(db_data, network) - .map(|db| init_wallet_db(&db)) - .map(|_| 1) - .map_err(|e| format_err!("Error while initializing data DB: {}", e)) - }); - unwrap_exc_or_null(res) -} - -/// Initialises the data database with the given number of accounts using the given seed. -/// -/// Returns the ExtendedSpendingKeys for the accounts. The caller should store these -/// securely for use while spending. -/// -/// Call `zcashlc_vec_string_free` on the returned pointer when you are finished with it. -#[no_mangle] -pub extern "C" fn zcashlc_init_accounts_table( - db_data: *const u8, - db_data_len: usize, - seed: *const u8, - seed_len: usize, - accounts: i32, - capacity_ret: *mut usize, - network_id: u32, -) -> *mut *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - let seed = unsafe { slice::from_raw_parts(seed, seed_len) }; - let accounts = if accounts >= 0 { - accounts as u32 - } else { - return Err(format_err!("accounts argument must be positive")); - }; - - let extsks: Vec<_> = (0..accounts) - .map(|account| spending_key(&seed, network.coin_type(), AccountId(account))) - .collect(); - let extfvks: Vec<_> = extsks.iter().map(ExtendedFullViewingKey::from).collect(); - - let t_addreses: Vec<_> = (0..accounts) - .map(|account| { - let tsk = derive_secret_key_from_seed(&network, &seed, AccountId(account), 0).unwrap(); - derive_transparent_address_from_secret_key(&tsk) - }).collect(); - - init_accounts_table(&db_data, &extfvks, &t_addreses) - .map(|_| { - // Return the ExtendedSpendingKeys for the created accounts. - let mut v: Vec<_> = extsks - .iter() - .map(|extsk| { - let encoded = encode_extended_spending_key( - network.hrp_sapling_extended_spending_key(), - extsk, - ); - CString::new(encoded).unwrap().into_raw() - }) - .collect(); - assert!(v.len() == accounts as usize); - unsafe { *capacity_ret.as_mut().unwrap() = v.capacity() }; - let p = v.as_mut_ptr(); - std::mem::forget(v); - return p; - }) - .map_err(|e| format_err!("Error while initializing accounts: {}", e)) - }); - unwrap_exc_or_null(res) -} - -/// Initialises the data database with the given extended full viewing keys -/// Call `zcashlc_vec_string_free` on the returned pointer when you are finished with it. -#[no_mangle] -pub extern "C" fn zcashlc_init_accounts_table_with_keys( - db_data: *const u8, - db_data_len: usize, - uvks: *mut FFIUVKBoxedSlice, - network_id: u32, -) -> bool { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - - let s: Box = unsafe { Box::from_raw(uvks) }; - - let slice: &mut [FFIUnifiedViewingKey] = unsafe { slice::from_raw_parts_mut(s.ptr, s.len) }; - - let mut extfvks: Vec = Vec::new(); - let mut t_addreses: Vec = Vec::new(); - - for u in slice.into_iter() { - let vkstr = unsafe { CStr::from_ptr(u.extfvk).to_str().unwrap() }; - let extfvk = decode_extended_full_viewing_key( - network.hrp_sapling_extended_full_viewing_key(), - &vkstr, - ) - .unwrap() - .unwrap(); - extfvks.push(extfvk); - - let extpub_str = unsafe { CStr::from_ptr(u.extpub).to_str().unwrap() }; - let pubkey = PublicKey::from_str(&extpub_str).unwrap(); - let t_addr = derive_transparent_address_from_public_key(&pubkey); - - t_addreses.push(t_addr); - } - - match init_accounts_table(&db_data, &extfvks, &t_addreses) { - Ok(()) => Ok(true), - Err(e) => Err(format_err!("Error while initializing accounts: {}", e)), - } - }); - unwrap_exc_or(res, false) -} - -/// Derives Extended Spending Keys from the given seed into 'accounts' number of accounts. -/// Returns the ExtendedSpendingKeys for the accounts. The caller should store these -/// securely for use while spending. -/// -/// Call `zcashlc_vec_string_free` on the returned pointer when you are finished with it. -#[no_mangle] -pub unsafe extern "C" fn zcashlc_derive_extended_spending_keys( - seed: *const u8, - seed_len: usize, - accounts: i32, - capacity_ret: *mut usize, - network_id: u32, -) -> *mut *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let seed = slice::from_raw_parts(seed, seed_len); - let accounts = if accounts > 0 { - accounts as u32 - } else { - return Err(format_err!("accounts argument must be greater than zero")); - }; - - let extsks: Vec<_> = (0..accounts) - .map(|account| spending_key(&seed, network.coin_type(), AccountId(account))) - .collect(); - - // Return the ExtendedSpendingKeys for the created accounts. - let mut v: Vec<_> = extsks - .iter() - .map(|extsk| { - let encoded = encode_extended_spending_key( - network.hrp_sapling_extended_spending_key(), - extsk, - ); - CString::new(encoded).unwrap().into_raw() - }) - .collect(); - assert!(v.len() == accounts as usize); - *capacity_ret.as_mut().unwrap() = v.capacity(); - let p = v.as_mut_ptr(); - std::mem::forget(v); - Ok(p) - }); - unwrap_exc_or_null(res) -} - -#[repr(C)] -pub struct FFIUnifiedViewingKey { - extfvk: *const c_char, - extpub: *const c_char, -} - -#[repr(C)] -pub struct FFIUVKBoxedSlice { - ptr: *mut FFIUnifiedViewingKey, - len: usize, // number of elems -} - - -fn unified_viewing_key_new( - extfvk: &ExtendedFullViewingKey, - extpub: &PublicKey, - network: Network) -> FFIUnifiedViewingKey { - - let encoded_extfvk = encode_extended_full_viewing_key( - network.hrp_sapling_extended_full_viewing_key(), - extfvk, - ); - let encoded_pubkey = hex::encode(&extpub.serialize()); - - FFIUnifiedViewingKey { - extfvk: CString::new(encoded_extfvk).unwrap().into_raw(), - extpub: CString::new(encoded_pubkey).unwrap().into_raw() - } -} - -fn uvk_vec_to_ffi (v: Vec) - -> *mut FFIUVKBoxedSlice -{ - // Going from Vec<_> to Box<[_]> just drops the (extra) `capacity` - let boxed_slice: Box<[FFIUnifiedViewingKey]> = v.into_boxed_slice(); - let len = boxed_slice.len(); - let fat_ptr: *mut [FFIUnifiedViewingKey] = - Box::into_raw(boxed_slice) - ; - let slim_ptr: *mut FFIUnifiedViewingKey = fat_ptr as _; - Box::into_raw( - Box::new(FFIUVKBoxedSlice { ptr: slim_ptr, len }) - ) -} - -#[no_mangle] -pub unsafe extern "C" fn zcashlc_free_uvk_array(uvks: *mut FFIUVKBoxedSlice) -{ - if uvks.is_null() { - return; - } - let s: Box = Box::from_raw(uvks); - - let slice: &mut [FFIUnifiedViewingKey] = slice::from_raw_parts_mut(s.ptr, s.len); - drop(Box::from_raw(slice)); - drop(s); -} - - -#[no_mangle] -pub unsafe extern "C" fn zcashlc_derive_unified_viewing_keys_from_seed( - seed: *const u8, - seed_len: usize, - accounts: i32, - network_id: u32, -) -> *mut FFIUVKBoxedSlice { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let seed = slice::from_raw_parts(seed, seed_len); - let accounts = if accounts > 0 { - accounts as u32 - } else { - return Err(format_err!("accounts argument must be greater than zero")); - }; - - let uvks: Vec<_> = (0..accounts) - .map(|account| { - let extfvk = ExtendedFullViewingKey::from(&spending_key(&seed, network.coin_type(), AccountId(account))); - let extpub = derive_public_key_from_seed(&network, &seed, AccountId(account), 0).unwrap(); - unified_viewing_key_new(&extfvk, &extpub, network) - }) - .collect(); - Ok(uvk_vec_to_ffi(uvks)) - }); - unwrap_exc_or_null(res) -} - - -/// Derives Extended Full Viewing Keys from the given seed into 'accounts' number of accounts. -/// Returns the Extended Full Viewing Keys for the accounts. The caller should store these -/// securely -/// -/// Call `zcashlc_vec_string_free` on the returned pointer when you are finished with it. -#[no_mangle] -pub unsafe extern "C" fn zcashlc_derive_extended_full_viewing_keys( - seed: *const u8, - seed_len: usize, - accounts: i32, - capacity_ret: *mut usize, - network_id: u32, -) -> *mut *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let seed = slice::from_raw_parts(seed, seed_len); - let accounts = if accounts > 0 { - accounts as u32 - } else { - return Err(format_err!("accounts argument must be greater than zero")); - }; - - let extsks: Vec<_> = (0..accounts) - .map(|account| { - ExtendedFullViewingKey::from(&spending_key(&seed, network.coin_type(), AccountId(account))) - }) - .collect(); - - // Return the ExtendedSpendingKeys for the created accounts. - let mut v: Vec<_> = extsks - .iter() - .map(|extsk| { - let encoded = encode_extended_full_viewing_key( - network.hrp_sapling_extended_full_viewing_key(), - extsk, - ); - CString::new(encoded).unwrap().into_raw() - }) - .collect(); - assert!(v.len() == accounts as usize); - *capacity_ret.as_mut().unwrap() = v.capacity(); - let p = v.as_mut_ptr(); - std::mem::forget(v); - Ok(p) - }); - unwrap_exc_or_null(res) -} -/// derives a shielded address from the given seed. -/// call zcashlc_string_free with the returned pointer when done using it -#[no_mangle] -pub unsafe extern "C" fn zcashlc_derive_shielded_address_from_seed( - seed: *const u8, - seed_len: usize, - account_index: i32, - network_id: u32, -) -> *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let seed = slice::from_raw_parts(seed, seed_len); - let account_index = if account_index >= 0 { - account_index as u32 - } else { - return Err(format_err!("accounts argument must be greater than zero")); - }; - let address = spending_key(&seed, network.coin_type(), AccountId(account_index)) - .default_address() - .unwrap() - .1; - let address_str = encode_payment_address(network.hrp_sapling_payment_address(), &address); - Ok(CString::new(address_str).unwrap().into_raw()) - }); - unwrap_exc_or_null(res) -} - -/// derives a shielded address from the given viewing key. -/// call zcashlc_string_free with the returned pointer when done using it -#[no_mangle] -pub unsafe extern "C" fn zcashlc_derive_transparent_address_from_public_key( - pubkey: *const c_char, - network_id: u32, -) -> *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let public_key_str = CStr::from_ptr(pubkey).to_str()?; - let pk = PublicKey::from_str(&public_key_str)?; - let taddr = - derive_transparent_address_from_public_key(&pk) - .encode(&network); - - Ok(CString::new(taddr).unwrap().into_raw()) - }); - unwrap_exc_or_null(res) -} - -/// derives a shielded address from the given viewing key. -/// call zcashlc_string_free with the returned pointer when done using it -#[no_mangle] -pub unsafe extern "C" fn zcashlc_derive_shielded_address_from_viewing_key( - extfvk: *const c_char, - network_id: u32, -) -> *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let extfvk_string = CStr::from_ptr(extfvk).to_str()?; - let extfvk = match decode_extended_full_viewing_key( - network.hrp_sapling_extended_full_viewing_key(), - &extfvk_string, - ) { - Ok(Some(extfvk)) => extfvk, - Ok(None) => { - return Err(format_err!("Failed to parse viewing key string in order to derive the address. Deriving a viewing key from the string returned no results. Encoding was valid but type was incorrect.")); - } - Err(e) => { - return Err(format_err!( - "Error while deriving viewing key from string input: {}", - e - )); - } - }; - let address = extfvk.default_address().unwrap().1; - let address_str = encode_payment_address(network.hrp_sapling_payment_address(), &address); - Ok(CString::new(address_str).unwrap().into_raw()) - }); - unwrap_exc_or_null(res) -} - -/// derives a shielded address from the given extended full viewing key. -/// call zcashlc_string_free with the returned pointer when done using it -#[no_mangle] -pub unsafe extern "C" fn zcashlc_derive_extended_full_viewing_key( - extsk: *const c_char, - network_id: u32, -) -> *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let extsk = CStr::from_ptr(extsk).to_str()?; - let extfvk = match decode_extended_spending_key( - network.hrp_sapling_extended_spending_key(), - &extsk, - ) { - Ok(Some(extsk)) => ExtendedFullViewingKey::from(&extsk), - Ok(None) => { - return Err(format_err!("Deriving viewing key from spending key returned no results. Encoding was valid but type was incorrect.")); - } - Err(e) => { - return Err(format_err!( - "Error while deriving viewing key from spending key: {}", - e - )); - } - }; - - let encoded = encode_extended_full_viewing_key( - network.hrp_sapling_extended_full_viewing_key(), - &extfvk, - ); - - Ok(CString::new(encoded).unwrap().into_raw()) - }); - unwrap_exc_or_null(res) -} - -/// Initialises the data database with the given block. -/// -/// This enables a newly-created database to be immediately-usable, without needing to -/// synchronise historic blocks. -#[no_mangle] -pub extern "C" fn zcashlc_init_blocks_table( - db_data: *const u8, - db_data_len: usize, - height: i32, - hash_hex: *const c_char, - time: u32, - sapling_tree_hex: *const c_char, - network_id: u32, -) -> i32 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len,network)?; - let hash = { - let mut hash = hex::decode(unsafe { CStr::from_ptr(hash_hex) }.to_str()?).unwrap(); - hash.reverse(); - BlockHash::from_slice(&hash) - }; - let sapling_tree = - hex::decode(unsafe { CStr::from_ptr(sapling_tree_hex) }.to_str()?).unwrap(); - - match init_blocks_table( - &db_data, - BlockHeight::from_u32(height as u32), - hash, - time, - &sapling_tree, - ) { - Ok(()) => Ok(1), - Err(e) => Err(format_err!("Error while initializing blocks table: {}", e)), - } - }); - unwrap_exc_or_null(res) -} - -/// Returns the address for the account. -/// -/// Call `zcashlc_string_free` on the returned pointer when you are finished with it. -#[no_mangle] -pub extern "C" fn zcashlc_get_address( - db_data: *const u8, - db_data_len: usize, - account: i32, - network_id: u32, -) -> *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - let account = if account >= 0 { - account as u32 - } else { - return Err(format_err!("accounts argument must be positive")); - }; - - let account = AccountId(account); - - match (&db_data).get_address(account) { - Ok(Some(addr)) => { - let addr_str = encode_payment_address(network.hrp_sapling_payment_address(), &addr); - let c_str_addr = CString::new(addr_str).unwrap(); - Ok(c_str_addr.into_raw()) - } - Ok(None) => Err(format_err!( - "No payment address was available for account {:?}", - account - )), - Err(e) => Err(format_err!("Error while fetching address: {}", e)), - } - }); - unwrap_exc_or_null(res) -} - -/// Returns true when the address is valid and shielded. -/// Returns false in any other case -/// Errors when the provided address belongs to another network -#[no_mangle] -pub unsafe extern "C" fn zcashlc_is_valid_shielded_address(address: *const c_char, - network_id: u32) -> bool { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let addr = CStr::from_ptr(address).to_str()?; - Ok(is_valid_shielded_address(&addr, &network)) - }); - unwrap_exc_or(res, false) -} - -fn is_valid_shielded_address(address: &str, - network: &Network) -> bool { - match RecipientAddress::decode(network, &address) { - Some(addr) => match addr { - RecipientAddress::Shielded(_) => true, - RecipientAddress::Transparent(_) => false, - }, - None => false, - } -} - -/// Returns true when the address is valid and transparent. -/// Returns false in any other case -#[no_mangle] -pub unsafe extern "C" fn zcashlc_is_valid_transparent_address(address: *const c_char, - network_id: u32) -> bool { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let addr = CStr::from_ptr(address).to_str()?; - Ok(is_valid_transparent_address(&addr, &network)) - }); - unwrap_exc_or(res, false) -} -/// returns whether the given viewing key is valid or not -#[no_mangle] -pub unsafe extern "C" fn zcashlc_is_valid_viewing_key(key: *const c_char, - network_id: u32) -> bool { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let vkstr = CStr::from_ptr(key).to_str()?; - - match decode_extended_full_viewing_key(&network.hrp_sapling_extended_full_viewing_key(), &vkstr) { - Ok(s) => match s { - None => Ok(false), - _ => Ok(true), - }, - Err(_) => Ok(false), - } - }); - unwrap_exc_or(res, false) -} - -fn is_valid_transparent_address(address: &str, - network: &Network) -> bool { - match RecipientAddress::decode(network, &address) { - Some(addr) => match addr { - RecipientAddress::Shielded(_) => false, - RecipientAddress::Transparent(_) => true, - }, - None => false, - } -} - -/// Returns the balance for the account, including all unspent notes that we know about. -#[no_mangle] -pub extern "C" fn zcashlc_get_balance( - db_data: *const u8, - db_data_len: usize, - account: i32, - network_id: u32, -) -> i64 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - - if account >= 0 { - let (_, max_height) = (&db_data) - .block_height_extrema() - .map_err(|e| format_err!("Error while fetching max block height: {}", e)) - .and_then(|opt| { - opt.ok_or(format_err!( - "No blockchain information available; scan required." - )) - })?; - - (&db_data) - .get_balance_at(AccountId(account as u32), max_height) - .map(|b| b.into()) - .map_err(|e| format_err!("Error while fetching balance: {}", e)) - } else { - Err(format_err!("account argument must be positive")) - } - }); - unwrap_exc_or(res, -1) -} - -/// Returns the verified balance for the account, which ignores notes that have been -/// received too recently and are not yet deemed spendable. -#[no_mangle] -pub extern "C" fn zcashlc_get_verified_balance( - db_data: *const u8, - db_data_len: usize, - account: i32, - network_id: u32, -) -> i64 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - if account >= 0 { - (&db_data) - .get_target_and_anchor_heights() - .map_err(|e| format_err!("Error while fetching anchor height: {}", e)) - .and_then(|opt_anchor| { - opt_anchor - .map(|(_, a)| a) - .ok_or(format_err!("Anchor height not available; scan required.")) - }) - .and_then(|anchor| { - (&db_data) - .get_balance_at(AccountId(account as u32), anchor) - .map_err(|e| format_err!("Error while fetching verified balance: {}", e)) - }) - .map(|amount| amount.into()) - } else { - Err(format_err!("account argument must be positive")) - } - }); - unwrap_exc_or(res, -1) -} - -/// Returns the verified transparent balance for the address, which ignores utxos that have been -/// received too recently and are not yet deemed spendable. -#[no_mangle] -pub extern "C" fn zcashlc_get_verified_transparent_balance( - db_data: *const u8, - db_data_len: usize, - address: *const c_char, - network_id: u32, -) -> i64 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - let addr = unsafe { CStr::from_ptr(address).to_str()? }; - let taddr = TransparentAddress::decode(&network, &addr).unwrap(); - let amount = (&db_data) - .get_target_and_anchor_heights() - .map_err(|e| format_err!("Error while fetching anchor height: {}", e)) - .and_then(|opt_anchor| { - opt_anchor - .map(|(h, _)| h) - .ok_or(format_err!("height not available; scan required.")) - }) - .and_then(|anchor| { - (&db_data) - .get_unspent_transparent_utxos(&taddr, anchor) - .map_err(|e| format_err!("Error while fetching verified transparent balance: {}", e)) - })? - .iter() - .map(|utxo| utxo.value) - .sum::(); - - Ok(amount.into()) - }); - unwrap_exc_or(res, -1) -} - -/// Returns the verified transparent balance for the address, which ignores utxos that have been -/// received too recently and are not yet deemed spendable. -#[no_mangle] -pub extern "C" fn zcashlc_get_total_transparent_balance( - db_data: *const u8, - db_data_len: usize, - address: *const c_char, - network_id: u32, -) -> i64 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - let addr = unsafe { CStr::from_ptr(address).to_str()? }; - let taddr = TransparentAddress::decode(&network, &addr).unwrap(); - let amount = (&db_data) - .get_target_and_anchor_heights() - .map_err(|e| format_err!("Error while fetching anchor height: {}", e)) - .and_then(|opt_anchor| { - opt_anchor - .map(|(h, _)| h) - .ok_or(format_err!("height not available; scan required.")) - }) - .and_then(|anchor| { - (&db_data) - .get_unspent_transparent_utxos(&taddr, anchor) - .map_err(|e| format_err!("Error while fetching total transparent balance: {}", e)) - })? - .iter() - .map(|utxo| utxo.value) - .sum::(); - - Ok(amount.into()) - }); - unwrap_exc_or(res, -1) -} - - -/// Returns the memo for a received note, if it is known and a valid UTF-8 string. -/// -/// The note is identified by its row index in the `received_notes` table within the data -/// database. -/// -/// Call `zcashlc_string_free` on the returned pointer when you are finished with it. -#[no_mangle] -pub extern "C" fn zcashlc_get_received_memo_as_utf8( - db_data: *const u8, - db_data_len: usize, - id_note: i64, - network_id: u32, -) -> *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - - let memo = (&db_data).get_memo(NoteId::ReceivedNoteId(id_note)) - .map_err(|e| format_err!("An error occurred retrieving the memo, {}", e)) - .and_then(|memo| { - match memo { - Memo::Empty => Ok("".to_string()), - Memo::Text(memo) => Ok(memo.into()), - _ => Err(format_err!("This memo does not contain UTF-8 text")), - } - })?; - - Ok(CString::new(memo).unwrap().into_raw()) - }); - unwrap_exc_or_null(res) -} - -/// Returns the memo for a sent note, if it is known and a valid UTF-8 string. -/// -/// The note is identified by its row index in the `sent_notes` table within the data -/// database. -/// -/// Call `zcashlc_string_free` on the returned pointer when you are finished with it. -#[no_mangle] -pub extern "C" fn zcashlc_get_sent_memo_as_utf8( - db_data: *const u8, - db_data_len: usize, - id_note: i64, - network_id: u32, -) -> *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - - let memo = (&db_data).get_memo(NoteId::SentNoteId(id_note)) - .map_err(|e| format_err!("An error occurred retrieving the memo, {}", e)) - .and_then(|memo| { - match memo { - Memo::Empty => Ok("".to_string()), - Memo::Text(memo) => Ok(memo.into()), - _ => Err(format_err!("This memo does not contain UTF-8 text")), - } - })?; - - Ok(CString::new(memo).unwrap().into_raw()) - }); - unwrap_exc_or_null(res) -} - -/// Checks that the scanned blocks in the data database, when combined with the recent -/// `CompactBlock`s in the cache database, form a valid chain. -/// -/// This function is built on the core assumption that the information provided in the -/// cache database is more likely to be accurate than the previously-scanned information. -/// This follows from the design (and trust) assumption that the `lightwalletd` server -/// provides accurate block information as of the time it was requested. -/// -/// Returns: -/// - `-1` if the combined chain is valid. -/// - `upper_bound` if the combined chain is invalid. -/// `upper_bound` is the height of the highest invalid block (on the assumption that the -/// highest block in the cache database is correct). -/// - `0` if there was an error during validation unrelated to chain validity. -/// -/// This function does not mutate either of the databases. -#[no_mangle] -pub extern "C" fn zcashlc_validate_combined_chain( - db_cache: *const u8, - db_cache_len: usize, - db_data: *const u8, - db_data_len: usize, - network_id: u32, -) -> i32 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let block_db = block_db(db_cache, db_cache_len)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - - let validate_from = (&db_data) - .get_max_height_hash() - .map_err(|e| format_err!("Error while validating chain: {}", e))?; - - let val_res = validate_chain(&network, &block_db, validate_from); - - if let Err(e) = val_res { - match e { - SqliteClientError::BackendError(Error::InvalidChain(upper_bound, _)) => { - let upper_bound_u32 = u32::from(upper_bound); - Ok(upper_bound_u32 as i32) - } - _ => Err(format_err!("Error while validating chain: {}", e)), - } - } else { - // All blocks are valid, so "highest invalid block height" is below genesis. - Ok(-1) - } - }); - unwrap_exc_or_null(res) -} -#[no_mangle] -pub extern "C" fn zcashlc_get_nearest_rewind_height( - db_data: *const u8, - db_data_len: usize, - height: i32, - network_id: u32, -) -> i32 { - let res = catch_panic(|| { - if height < 100 { - Ok(height) - } else { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - let height = BlockHeight::try_from(height)?; - match get_rewind_height(&db_data) { - Ok(Some(best_height)) => { - let first_unspent_note_height = u32::from(best_height); - let rewind_height = u32::from(height); - Ok(std::cmp::min(first_unspent_note_height as i32, rewind_height as i32)) - }, - Ok(None) => { - let rewind_height = u32::from(height); - Ok(rewind_height as i32) - }, - Err(e) => Err(format_err!("Error while getting nearest rewind height for {}: {}", height, e)), - } - } - }); - unwrap_exc_or(res, -1) -} -/// Rewinds the data database to the given height. -/// -/// If the requested height is greater than or equal to the height of the last scanned -/// block, this function does nothing. -#[no_mangle] -pub extern "C" fn zcashlc_rewind_to_height( - db_data: *const u8, - db_data_len: usize, - height: i32, - network_id: u32, -) -> bool { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - - let height = BlockHeight::try_from(height)?; - rewind_to_height(&db_data, height) - .map(|_| true) - .map_err(|e| format_err!("Error while rewinding data DB to height {}: {}", height, e)) - }); - unwrap_exc_or(res, false) -} - -/// Scans new blocks added to the cache for any transactions received by the tracked -/// accounts. -/// -/// This function pays attention only to cached blocks with heights greater than the -/// highest scanned block in `db_data`. Cached blocks with lower heights are not verified -/// against previously-scanned blocks. In particular, this function **assumes** that the -/// caller is handling rollbacks. -/// -/// For brand-new light client databases, this function starts scanning from the Sapling -/// activation height. This height can be fast-forwarded to a more recent block by calling -/// [`zcashlc_init_blocks_table`] before this function. -/// -/// Scanned blocks are required to be height-sequential. If a block is missing from the -/// cache, an error will be signalled. -#[no_mangle] -pub extern "C" fn zcashlc_scan_blocks( - db_cache: *const u8, - db_cache_len: usize, - db_data: *const u8, - db_data_len: usize, - scan_limit: u32, - network_id: u32, -) -> i32 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let block_db = block_db(db_cache, db_cache_len)?; - let db_read = wallet_db(db_data, db_data_len, network)?; - let mut db_data = db_read.get_update_ops()?; - let limit = if scan_limit <= 0 { - None - } else { - Some(scan_limit) - }; - match scan_cached_blocks(&network, &block_db, &mut db_data, limit) { - Ok(()) => Ok(1), - Err(e) => Err(format_err!("Error while scanning blocks: {}", e)), - } - }); - unwrap_exc_or_null(res) -} - -#[no_mangle] -pub extern "C" fn zcashlc_put_utxo( - db_data: *const u8, - db_data_len: usize, - address_str: *const c_char, - txid_bytes: *const u8, - txid_bytes_len: usize, - index: i32, - script_bytes: *const u8, - script_bytes_len: usize, - value: i64, - height: i32, - network_id: u32, -) -> bool { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - let mut db_data = db_data.get_update_ops()?; - - let addr = unsafe { CStr::from_ptr(address_str).to_str()? }; - let txid_bytes = unsafe { slice::from_raw_parts(txid_bytes, txid_bytes_len) }; - let mut txid = [0u8; 32]; - txid.copy_from_slice(&txid_bytes); - - let script_bytes = unsafe { slice::from_raw_parts(script_bytes, script_bytes_len) }; - let script = script_bytes.to_vec(); - - let address = TransparentAddress::decode(&network, &addr).unwrap(); - - let output = WalletTransparentOutput { - address: address, - outpoint: OutPoint::new(txid, index as u32), - script: script, - value: Amount::from_i64(value).unwrap(), - height: BlockHeight::from(height as u32), - }; - match put_received_transparent_utxo(&mut db_data, &output) { - Ok(_) => Ok(true), - Err(e) => Err(format_err!("Error while inserting UTXO: {}", e)), - } - }); - unwrap_exc_or(res, false) -} - -#[no_mangle] -pub unsafe extern "C" fn zcashlc_clear_utxos( - db_data: *const u8, - db_data_len: usize, - taddress: *const c_char, - above_height: i32, - network_id: u32, -) -> i32 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - let mut db_data = db_data.get_update_ops()?; - let addr = CStr::from_ptr(taddress).to_str()?; - let taddress = TransparentAddress::decode(&network, &addr).unwrap(); - let height = BlockHeight::from(above_height as u32); - match delete_utxos_above(&mut db_data, &taddress, height) { - Ok(rows) => Ok(rows as i32), - Err(e) => Err(format_err!("Error while clearing UTXOs: {}", e)), - } - }); - unwrap_exc_or(res, -1) -} - -#[no_mangle] -pub extern "C" fn zcashlc_decrypt_and_store_transaction( - db_data: *const u8, - db_data_len: usize, - tx: *const u8, - tx_len: usize, - _mined_height: u32, - network_id: u32, -) -> i32 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_read = wallet_db(db_data, db_data_len, network)?; - let mut db_data = db_read.get_update_ops()?; - let tx_bytes = unsafe { slice::from_raw_parts(tx, tx_len) }; - let tx = Transaction::read(&tx_bytes[..])?; - - match decrypt_and_store_transaction(&network, &mut db_data, &tx) { - Ok(()) => Ok(1), - Err(e) => Err(format_err!("Error while decrypting transaction: {}", e)), - } - }); - unwrap_exc_or(res, -1) -} - -/// Creates a transaction paying the specified address from the given account. -/// -/// Returns the row index of the newly-created transaction in the `transactions` table -/// within the data database. The caller can read the raw transaction bytes from the `raw` -/// column in order to broadcast the transaction to the network. -/// -/// Do not call this multiple times in parallel, or you will generate transactions that -/// double-spend the same notes. -#[no_mangle] -pub extern "C" fn zcashlc_create_to_address( - db_data: *const u8, - db_data_len: usize, - account: i32, - extsk: *const c_char, - to: *const c_char, - value: i64, - memo: *const c_char, - spend_params: *const u8, - spend_params_len: usize, - output_params: *const u8, - output_params_len: usize, - network_id: u32, -) -> i64 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_read = wallet_db(db_data, db_data_len, network)?; - let mut db_data = db_read.get_update_ops()?; - let account = if account >= 0 { - account as u32 - } else { - return Err(format_err!("account argument must be positive")); - }; - let extsk = unsafe { CStr::from_ptr(extsk) }.to_str()?; - let to = unsafe { CStr::from_ptr(to) }.to_str()?; - let value = - Amount::from_i64(value).map_err(|()| format_err!("Invalid amount, out of range"))?; - if value.is_negative() { - return Err(format_err!("Amount is negative")); - } - let memo = unsafe { CStr::from_ptr(memo) }.to_str()?; - let spend_params = Path::new(OsStr::from_bytes(unsafe { - slice::from_raw_parts(spend_params, spend_params_len) - })); - let output_params = Path::new(OsStr::from_bytes(unsafe { - slice::from_raw_parts(output_params, output_params_len) - })); - - let extsk = - match decode_extended_spending_key(network.hrp_sapling_extended_spending_key(), &extsk) - { - Ok(Some(extsk)) => extsk, - Ok(None) => { - return Err(format_err!("ExtendedSpendingKey is for the wrong network")); - } - Err(e) => { - return Err(format_err!("Invalid ExtendedSpendingKey: {}", e)); - } - }; - - let to = match RecipientAddress::decode(&network, &to) { - Some(to) => to, - None => { - return Err(format_err!("PaymentAddress is for the wrong network")); - } - }; - - // TODO: consider warning in this case somehow, rather than swallowing this error - let memo = match to { - RecipientAddress::Shielded(_) => { - let memo_value = Memo::from_str(&memo).map_err(|_| format_err!("Invalid memo"))?; - Some(MemoBytes::from(&memo_value)) - }, - RecipientAddress::Transparent(_) => None - }; - - let prover = LocalTxProver::new(spend_params, output_params); - - create_spend_to_address( - &mut db_data, - &network, - prover, - AccountId(account), - &extsk, - &to, - value, - memo, - OvkPolicy::Sender - ) - .map_err(|e| format_err!("Error while sending funds: {}", e)) - }); - unwrap_exc_or(res, -1) -} - -#[no_mangle] -pub extern "C" fn zcashlc_branch_id_for_height( - height: i32, - network_id: u32, -) -> i32 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let branch: BranchId = BranchId::for_height(&network, BlockHeight::from(height as u32)); - let branch_id: u32 = u32::from(branch); - Ok(branch_id as i32) - }); - unwrap_exc_or(res, -1) -} - -/// Frees strings returned by other zcashlc functions. -#[no_mangle] -pub extern "C" fn zcashlc_string_free(s: *mut c_char) { - unsafe { - if s.is_null() { - return; - } - CString::from_raw(s) - }; -} - -/// Frees vectors of strings returned by other zcashlc functions. -#[no_mangle] -pub extern "C" fn zcashlc_vec_string_free(v: *mut *mut c_char, len: usize, capacity: usize) { - unsafe { - if v.is_null() { - return; - } - assert!(len <= capacity); - let v = Vec::from_raw_parts(v, len, capacity); - v.into_iter().map(|s| CString::from_raw(s)).for_each(drop); - }; -} - -/// Derives a transparent private key from seed -#[no_mangle] -pub unsafe extern "C" fn zcashlc_derive_transparent_private_key_from_seed( - seed: *const u8, - seed_len: usize, - account: i32, - index: i32, - network_id: u32, -) -> *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let seed = slice::from_raw_parts(seed, seed_len); - let account = if account >= 0 { - account as u32 - } else { - return Err(format_err!("account argument must be positive")); - }; - - let index = if index >= 0 { - index as u32 - } else { - return Err(format_err!("index argument must be positive")); - }; - let sk = derive_secret_key_from_seed(&network, &seed, AccountId(account), index).unwrap(); - let sk_wif = Wif::from_secret_key(&sk, true); - - Ok(CString::new(sk_wif.0.to_string()).unwrap().into_raw()) - }); - unwrap_exc_or_null(res) -} - -/// Derives a transparent address from the given seed -#[no_mangle] -pub unsafe extern "C" fn zcashlc_derive_transparent_address_from_seed( - seed: *const u8, - seed_len: usize, - account: i32, - index: i32, - network_id: u32, -) -> *mut c_char { - let res = catch_panic(|| { - let seed = slice::from_raw_parts(seed, seed_len); - let network = parse_network(network_id)?; - let account = if account >= 0 { - account as u32 - } else { - return Err(format_err!("account argument must be positive")); - }; - - let index = if index >= 0 { - index as u32 - } else { - return Err(format_err!("index argument must be positive")); - }; - let sk = derive_secret_key_from_seed(&network, &seed, AccountId(account), index); - let taddr = derive_transparent_address_from_secret_key(&sk.unwrap()) - .encode(&network); - - Ok(CString::new(taddr).unwrap().into_raw()) - }); - unwrap_exc_or_null(res) -} - -/// Derives a transparent address from the given secret key enconded as a WIF string -#[no_mangle] -pub unsafe extern "C" fn zcashlc_derive_transparent_address_from_secret_key( - tsk: *const c_char, - network_id: u32, -) -> *mut c_char { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let tsk_wif = CStr::from_ptr(tsk).to_str()?; - - let sk: SecretKey = (&Wif(tsk_wif.to_string())).try_into().expect("invalid private key WIF"); - - // derive the corresponding t-address - let taddr = - derive_transparent_address_from_secret_key(&sk) - .encode(&network); - Ok(CString::new(taddr).unwrap().into_raw()) - }); - unwrap_exc_or_null(res) -} - -#[no_mangle] -pub extern "C" fn zcashlc_shield_funds( - db_data: *const u8, - db_data_len: usize, - account: i32, - tsk: *const c_char, - extsk: *const c_char, - memo: *const c_char, - spend_params: *const u8, - spend_params_len: usize, - output_params: *const u8, - output_params_len: usize, - network_id: u32, -) -> i64 { - let res = catch_panic(|| { - let network = parse_network(network_id)?; - let db_data = wallet_db(db_data, db_data_len, network)?; - let mut update_ops = (&db_data) - .get_update_ops() - .map_err(|e| format_err!("Could not obtain a writable database connection: {}", e))?; - - let account = if account >= 0 { - account as u32 - } else { - return Err(format_err!("account argument must be positive")); - }; - let tsk_wif = unsafe { CStr::from_ptr(tsk) }.to_str()?; - let extsk = unsafe { CStr::from_ptr(extsk) }.to_str()?; - let memo = unsafe { CStr::from_ptr(memo) }.to_str()?; - let spend_params = Path::new(OsStr::from_bytes(unsafe { - slice::from_raw_parts(spend_params, spend_params_len) - })); - let output_params = Path::new(OsStr::from_bytes(unsafe { - slice::from_raw_parts(output_params, output_params_len) - })); - - //grab secret private key for t-funds - let sk:SecretKey = (&Wif(tsk_wif.to_string())).try_into()?; - - let extsk = - match decode_extended_spending_key(network.hrp_sapling_extended_spending_key(), &extsk) - { - Ok(Some(extsk)) => extsk, - Ok(None) => { - return Err(format_err!("ExtendedSpendingKey is for the wrong network")); - }, - Err(e) => { - return Err(format_err!("Invalid ExtendedSpendingKey: {}", e)); - }, - }; - - let memo = Memo::from_str(&memo).map_err(|_| format_err!("Invalid memo"))?; - let memo_bytes = MemoBytes::from(memo); - // shield_funds(&db_cache, &db_data, account, &tsk, &extsk, &memo, &spend_params, &output_params) - shield_funds(&mut update_ops, - &network, - LocalTxProver::new(spend_params, output_params), - AccountId(account), - &sk, - &extsk, - &memo_bytes, - ANCHOR_OFFSET) - .map_err(|e| format_err!("Error while shielding transaction: {}", e)) - }); - unwrap_exc_or(res, -1) -} - -// -// Utility functions -// - -fn parse_network(value: u32) -> Result { - match value { - 0 => Ok(TestNetwork), - 1 => Ok(MainNetwork), - _ => Err(format_err!("Invalid network type: {}. Expected either 0 or 1 for Testnet or Mainnet, respectively.", value)) - } -} \ No newline at end of file