diff --git a/Cargo.lock b/Cargo.lock index 2539eabb..8d2f31b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -491,9 +491,9 @@ dependencies = [ [[package]] name = "bdk_file_store" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446f02da319941ea78454a479fca72707f3355a62db3bb1c2c13b94e7f963ce0" +checksum = "c7b9a98edb58d02b601239832674a9ca9f1465e08e1dd1fac3a0e34004372406" dependencies = [ "bdk_core", "bincode", @@ -502,9 +502,9 @@ dependencies = [ [[package]] name = "bdk_wallet" -version = "2.0.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f278518ee6f2a17711fd4662dc34ce6153792a7a21575f05a9c8e2cb9ba36245" +checksum = "67f3c4f9526d22374fca5b7ff1d6bf8d921ab56db2dac8df66a2c5561b31d4ef" dependencies = [ "bdk_chain", "bdk_file_store", @@ -663,9 +663,9 @@ checksum = "2dee39a0ee5b4095224a0cfc6bf4cc1baf0f9624b96b367e53b66d974e51d953" [[package]] name = "bitcoin-units" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5285c8bcaa25876d07f37e3d30c303f2609179716e11d688f51e8f1fe70063e2" +checksum = "346568ebaab2918487cea76dd55dae13c27bb618cdb737c952e69eb2017c4118" dependencies = [ "bitcoin-internals", "serde", @@ -693,9 +693,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.8.4" +version = "1.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d2d5991425dfd0785aed03aedcf0b321d61975c9b5b3689c774a2610ae0b51e" +checksum = "0aa83c34e62843d924f905e0f5c866eb1dd6545fc4d719e803d9ba6030371fce" dependencies = [ "arrayref", "arrayvec", @@ -767,9 +767,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.60" +version = "1.2.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" +checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" dependencies = [ "find-msvc-tools", "jobserver", @@ -777,12 +777,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - [[package]] name = "cfg-if" version = "1.0.4" @@ -1011,9 +1005,9 @@ dependencies = [ [[package]] name = "crc-catalog" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" [[package]] name = "crc32fast" @@ -1372,7 +1366,7 @@ dependencies = [ "byteorder", "libc", "log", - "rustls 0.23.38", + "rustls 0.23.40", "serde", "serde_json", "webpki-roots 0.25.4", @@ -1389,7 +1383,7 @@ dependencies = [ "byteorder", "libc", "log", - "rustls 0.23.38", + "rustls 0.23.40", "serde", "serde_json", "webpki-roots 0.25.4", @@ -1987,7 +1981,7 @@ dependencies = [ "http", "hyper", "hyper-util", - "rustls 0.23.38", + "rustls 0.23.40", "tokio", "tokio-rustls", "tower-service", @@ -2165,9 +2159,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -2256,27 +2250,32 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jni" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" dependencies = [ - "cesu8", "cfg-if", "combine", - "jni-sys 0.3.1", + "jni-macros", + "jni-sys", "log", - "thiserror 1.0.69", + "simd_cesu8", + "thiserror 2.0.18", "walkdir", - "windows-sys 0.45.0", + "windows-link", ] [[package]] -name = "jni-sys" -version = "0.3.1" +name = "jni-macros" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" dependencies = [ - "jni-sys 0.4.1", + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.117", ] [[package]] @@ -2310,9 +2309,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.95" +version = "0.3.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" +checksum = "a1840c94c045fbcf8ba2812c95db44499f7c64910a912551aaaa541decebcacf" dependencies = [ "cfg-if", "futures-util", @@ -2337,9 +2336,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.185" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libm" @@ -2634,9 +2633,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniscript" -version = "12.3.5" +version = "12.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487906208f38448e186e3deb02f2b8ef046a9078b0de00bdb28bf4fb9b76951c" +checksum = "c14116d8342edd3626b0f8e84df16f4e6a76dc04799ba747493403236a1b8ac5" dependencies = [ "bech32 0.11.1", "bitcoin", @@ -3234,7 +3233,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.38", + "rustls 0.23.40", "socket2", "thiserror 2.0.18", "tokio", @@ -3255,7 +3254,7 @@ dependencies = [ "rand 0.9.4", "ring", "rustc-hash", - "rustls 0.23.38", + "rustls 0.23.40", "rustls-pki-types", "slab", "thiserror 2.0.18", @@ -3495,9 +3494,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" dependencies = [ "base64 0.22.1", "bytes", @@ -3521,7 +3520,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.38", + "rustls 0.23.40", "rustls-pki-types", "rustls-platform-verifier", "serde", @@ -3551,9 +3550,9 @@ dependencies = [ [[package]] name = "rgb-aluvm" -version = "0.11.1-rc.2" +version = "0.11.1-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6b9e41006564b48551e52e001181898982b11732348100216097033b3e536a2" +checksum = "b60686e4f1701ca4f73b77660777a49e651f3c611461ab62ef718db47a5a6caa" dependencies = [ "amplify", "baid64", @@ -3585,9 +3584,9 @@ dependencies = [ [[package]] name = "rgb-consensus" -version = "0.11.1-rc.9" +version = "0.11.1-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6e0da534613ed77953976b9be54c7db66bd5a6c66773bd5866b1bacdbfb41d" +checksum = "535483ee9143782e33ddebd3eda465de0184061fc3c480e24990e42fefc58bb0" dependencies = [ "amplify", "baid64", @@ -3612,9 +3611,9 @@ dependencies = [ [[package]] name = "rgb-invoicing" -version = "0.11.1-rc.9" +version = "0.11.1-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22f7125c70fd8e959d85d29c0bdbeecb173d6aed9a72eae71f1e43bade383f" +checksum = "10400124af86de579b0f13603e014512b6166ad94ea791212b71579ffb91dd8a" dependencies = [ "amplify", "baid64", @@ -3632,7 +3631,7 @@ dependencies = [ [[package]] name = "rgb-lib" version = "0.3.0-beta.5" -source = "git+https://github.com/RGB-Tools/rgb-lib?branch=master#5c62632b5cbc9e5d5852aebf5824659b0b501c78" +source = "git+https://github.com/RGB-Tools/rgb-lib?branch=master#57a88030f522860e8450b6927de2b83005c658a2" dependencies = [ "amplify", "base64 0.22.1", @@ -3644,7 +3643,7 @@ dependencies = [ "generic-array", "hex", "rand 0.10.1", - "reqwest 0.13.2", + "reqwest 0.13.3", "rgb-invoicing", "rgb-lib-migration", "rgb-ops", @@ -3652,7 +3651,7 @@ dependencies = [ "rgb-schemas", "rgb-strict-encoding", "rgb-strict-types", - "rustls 0.23.38", + "rustls 0.23.40", "scrypt", "sea-orm", "sea-query", @@ -3668,13 +3667,13 @@ dependencies = [ "typenum", "url", "walkdir", - "zip 8.5.1", + "zip 8.6.0", ] [[package]] name = "rgb-lib-migration" version = "0.3.0-beta.3" -source = "git+https://github.com/RGB-Tools/rgb-lib?branch=master#5c62632b5cbc9e5d5852aebf5824659b0b501c78" +source = "git+https://github.com/RGB-Tools/rgb-lib?branch=master#57a88030f522860e8450b6927de2b83005c658a2" dependencies = [ "sea-orm-migration", "tokio", @@ -3740,9 +3739,9 @@ dependencies = [ [[package]] name = "rgb-ops" -version = "0.11.1-rc.9" +version = "0.11.1-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb298dfc6cddd4367c850bf621fca6b2b77a16c2ce472bc4e576811fe5b29be" +checksum = "3782a5ff1e5408e23c2d14fc556347684f5c8f72d96c4ca357527a3dbffb7378" dependencies = [ "amplify", "baid64", @@ -3761,14 +3760,15 @@ dependencies = [ "rgb-strict-encoding", "rgb-strict-types", "serde", + "serde_json", "wasm-bindgen", ] [[package]] name = "rgb-psbt-utils" -version = "0.11.1-rc.9" +version = "0.11.1-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9faab66bd883c85ffcb35f8dfa9d676184c5924f5076ffd9c72943bdf5b3df3c" +checksum = "0107634634c424a8b268ec6549df08da676768ec6ddbcda51f12e7882daeeee6" dependencies = [ "amplify", "baid64", @@ -3781,9 +3781,9 @@ dependencies = [ [[package]] name = "rgb-schemas" -version = "0.11.1-rc.9" +version = "0.11.1-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a80e2f45e850293c97d0e4fcd9b1c066a666b52b66617f4476365346c92111" +checksum = "1903961c836cc3f6963b06c69cb47491a815309f265439f20c932e0a3aa16a78" dependencies = [ "amplify", "rgb-aluvm", @@ -3933,16 +3933,16 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.38" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ "aws-lc-rs", "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.103.12", + "rustls-webpki 0.103.13", "subtle", "zeroize", ] @@ -3961,9 +3961,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" dependencies = [ "web-time", "zeroize", @@ -3971,19 +3971,19 @@ dependencies = [ [[package]] name = "rustls-platform-verifier" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" dependencies = [ "core-foundation 0.10.1", "core-foundation-sys", "jni", "log", "once_cell", - "rustls 0.23.38", + "rustls 0.23.40", "rustls-native-certs", "rustls-platform-verifier-android", - "rustls-webpki 0.103.12", + "rustls-webpki 0.103.13", "security-framework", "security-framework-sys", "webpki-root-certs", @@ -4008,9 +4008,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.12" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8279bb85272c9f10811ae6a6c547ff594d6a7f3c6c6b02ee9726d1d0dcfcdd06" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "aws-lc-rs", "ring", @@ -4525,6 +4525,22 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simd_cesu8" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "slab" version = "0.4.12" @@ -4652,7 +4668,7 @@ dependencies = [ "memchr", "once_cell", "percent-encoding", - "rustls 0.23.38", + "rustls 0.23.40", "serde", "serde_json", "sha2 0.10.9", @@ -5111,7 +5127,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.38", + "rustls 0.23.40", "tokio", ] @@ -5506,9 +5522,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.118" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" +checksum = "df52b6d9b87e0c74c9edfa1eb2d9bf85e5d63515474513aa50fa181b3c4f5db1" dependencies = [ "cfg-if", "once_cell", @@ -5520,9 +5536,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.68" +version = "0.4.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" +checksum = "af934872acec734c2d80e6617bbb5ff4f12b052dd8e6332b0817bce889516084" dependencies = [ "js-sys", "wasm-bindgen", @@ -5530,9 +5546,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.118" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" +checksum = "78b1041f495fb322e64aca85f5756b2172e35cd459376e67f2a6c9dffcedb103" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5540,9 +5556,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.118" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" +checksum = "9dcd0ff20416988a18ac686d4d4d0f6aae9ebf08a389ff5d29012b05af2a1b41" dependencies = [ "bumpalo", "proc-macro2", @@ -5553,9 +5569,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.118" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" +checksum = "49757b3c82ebf16c57d69365a142940b384176c24df52a087fb748e2085359ea" dependencies = [ "unicode-ident", ] @@ -5609,9 +5625,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.95" +version = "0.3.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" +checksum = "2eadbac71025cd7b0834f20d1fe8472e8495821b4e9801eb0a60bd1f19827602" dependencies = [ "js-sys", "wasm-bindgen", @@ -5771,15 +5787,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -5816,21 +5823,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -5879,12 +5871,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -5903,12 +5889,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -5927,12 +5907,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -5963,12 +5937,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -5987,12 +5955,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -6011,12 +5973,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -6035,12 +5991,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -6296,9 +6246,9 @@ dependencies = [ [[package]] name = "zip" -version = "8.5.1" +version = "8.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcab981e19633ebcf0b001ddd37dd802996098bc1864f90b7c5d970ce76c1d59" +checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b" dependencies = [ "crc32fast", "indexmap", diff --git a/openapi.yaml b/openapi.yaml index 32e674d7..16f81d0d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -967,6 +967,11 @@ paths: - RGB summary: Sync the RGB wallet description: Sync the RGB wallet + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyncRequest' responses: '200': description: Successful operation @@ -2805,9 +2810,6 @@ components: Fungible: 100 transport_endpoints: - rpc://127.0.0.1:3000/json-rpc - skip_sync: - type: boolean - example: false SendRgbResponse: type: object required: @@ -2887,6 +2889,49 @@ components: - Succeeded - Expired - Failed + SyncKeychain: + oneOf: + - type: string + enum: + - Colored + - type: object + required: + - Vanilla + properties: + Vanilla: + type: object + required: + - lookback + properties: + lookback: + type: integer + example: 20 + example: + Vanilla: + lookback: 20 + SyncOptions: + type: object + required: + - keychain + - strategy + properties: + keychain: + $ref: '#/components/schemas/SyncKeychain' + strategy: + $ref: '#/components/schemas/SyncStrategy' + SyncRequest: + type: object + required: + - options + properties: + options: + $ref: '#/components/schemas/SyncOptions' + SyncStrategy: + type: string + enum: + - FastSync + - FullSync + - FullScan TakerRequest: type: object required: @@ -3086,11 +3131,13 @@ components: - ReceiveWitness - Send - Inflation + - Burn TransferStatus: type: string enum: - Initiated - WaitingCounterparty + - WaitingSafeHeight - WaitingConfirmations - Settled - Failed diff --git a/rust-lightning b/rust-lightning index 4a08199e..ab97604f 160000 --- a/rust-lightning +++ b/rust-lightning @@ -1 +1 @@ -Subproject commit 4a08199e3ad3b2426cd2269f000b0715455655a9 +Subproject commit ab97604f3b76ff3aac2af1d0e11b5ba774759cc9 diff --git a/src/ldk.rs b/src/ldk.rs index 83f719c9..0c2e51e3 100644 --- a/src/ldk.rs +++ b/src/ldk.rs @@ -70,8 +70,8 @@ use rgb_lib::{ utils::{get_account_data, recipient_id_from_script_buf, script_buf_from_recipient_id}, wallet::{ rust_only::{check_indexer_url, AssetColoringInfo, ColoringInfo}, - DatabaseType, Recipient, SinglesigKeys, TransportEndpoint, Wallet as RgbLibWallet, - WalletData, WitnessData, + DatabaseType, OnlineOptions, Recipient, SinglesigKeys, TransportEndpoint, + Wallet as RgbLibWallet, WalletData, WitnessData, }, AssetSchema, Assignment, BitcoinNetwork, ConsignmentExt, ContractId, Error as RgbLibError, Fascia, FileContent, RgbTransfer, RgbTxid, WitnessOrd, @@ -112,6 +112,7 @@ use crate::utils::{ pub(crate) const FEE_RATE: u64 = 7; pub(crate) const UTXO_SIZE_SAT: u32 = 32000; pub(crate) const MIN_CHANNEL_CONFIRMATIONS: u8 = 6; +const VANILLA_SYNC_LOOKBACK: u32 = 20; #[cfg(test)] pub(crate) static IGNORE_INBOUND_CHANNELS_ON_NODE: Mutex> = Mutex::new(None); @@ -1838,7 +1839,7 @@ pub(crate) async fn start_ldk( .into_extended_key() .expect("a valid key should have been provided"); let master_xprv = &xkey - .into_xprv(network) + .into_xprv(network.into()) .expect("should be possible to get an extended private key"); let xprv: Xpriv = master_xprv .derive_priv(&Secp256k1_30::new(), &ChildNumber::Hardened { index: 535 }) @@ -2015,7 +2016,11 @@ pub(crate) async fn start_ldk( }) .await .unwrap(); - let rgb_online = rgb_wallet.go_online(false, indexer_url.to_string())?; + let rgb_online = rgb_wallet.go_online(OnlineOptions { + indexer_url: indexer_url.to_string(), + skip_consistency_check: false, + vanilla_sync_lookback: VANILLA_SYNC_LOOKBACK, + })?; fs::write( static_state.storage_dir_path.join(WALLET_FINGERPRINT_FNAME), account_xpub_colored.fingerprint().to_string(), diff --git a/src/rgb.rs b/src/rgb.rs index cda909ad..86d0b927 100644 --- a/src/rgb.rs +++ b/src/rgb.rs @@ -19,8 +19,9 @@ use rgb_lib::{ rust_only::{check_proxy_url, ColoringInfo}, AssetCFA, AssetIFA, AssetNIA, AssetUDA, Assets, Balance, BtcBalance, Metadata, Online, OperationResult, ReceiveData, Recipient, RefreshResult, RgbWalletOpsOffline, - RgbWalletOpsOnline, SendBeginResult, SinglesigKeys, Transaction as RgbLibTransaction, - Transfer, TransportEndpoint, Unspent, Wallet as RgbLibWallet, + RgbWalletOpsOnline, SendBeginResult, SinglesigKeys, SyncOptions, + Transaction as RgbLibTransaction, Transfer, TransportEndpoint, Unspent, + Wallet as RgbLibWallet, }, AssetSchema, Assignment, BitcoinNetwork, ContractId, Error as RgbLibError, Fascia, RgbTransfer, RgbTransport, RgbTxid, UpdateRes, WitnessOrd, @@ -266,7 +267,6 @@ impl UnlockedAppState { fee_rate: u64, min_confirmations: u8, expiration_timestamp: Option, - skip_sync: bool, ) -> Result { self.rgb_wallet_wrapper.send( recipient_map, @@ -274,7 +274,6 @@ impl UnlockedAppState { fee_rate, min_confirmations, expiration_timestamp, - skip_sync, ) } @@ -331,8 +330,8 @@ impl UnlockedAppState { self.rgb_wallet_wrapper.sign_psbt(unsigned_psbt) } - pub(crate) fn rgb_sync(&self) -> Result<(), RgbLibError> { - self.rgb_wallet_wrapper.sync() + pub(crate) fn rgb_sync(&self, options: SyncOptions) -> Result<(), RgbLibError> { + self.rgb_wallet_wrapper.sync(options) } pub(crate) fn rgb_upsert_witness( @@ -642,7 +641,6 @@ impl RgbLibWalletWrapper { fee_rate: u64, min_confirmations: u8, expiration_timestamp: Option, - skip_sync: bool, ) -> Result { self.get_rgb_wallet().send( self.online, @@ -651,7 +649,6 @@ impl RgbLibWalletWrapper { fee_rate, min_confirmations, expiration_timestamp, - skip_sync, ) } @@ -698,21 +695,19 @@ impl RgbLibWalletWrapper { } pub(crate) fn send_btc_end(&self, signed_psbt: String) -> Result { - self.get_rgb_wallet() - .send_btc_end(self.online, signed_psbt, false) + self.get_rgb_wallet().send_btc_end(self.online, signed_psbt) } pub(crate) fn send_end(&self, signed_psbt: String) -> Result { - self.get_rgb_wallet() - .send_end(self.online, signed_psbt, false) + self.get_rgb_wallet().send_end(self.online, signed_psbt) } pub(crate) fn sign_psbt(&self, unsigned_psbt: String) -> Result { self.get_rgb_wallet().sign_psbt(unsigned_psbt, None) } - pub(crate) fn sync(&self) -> Result<(), RgbLibError> { - self.get_rgb_wallet().sync(self.online) + pub(crate) fn sync(&self, options: SyncOptions) -> Result<(), RgbLibError> { + self.get_rgb_wallet().sync(self.online, options) } pub(crate) fn update_witnesses( diff --git a/src/routes.rs b/src/routes.rs index 8beb586c..ae6c8ed0 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -54,7 +54,9 @@ use rgb_lib::{ AssetUDA as RgbLibAssetUDA, Balance as RgbLibBalance, EmbeddedMedia as RgbLibEmbeddedMedia, Invoice as RgbLibInvoice, Media as RgbLibMedia, ProofOfReserves as RgbLibProofOfReserves, Recipient as RgbLibRecipient, RecipientInfo, RecipientType as RgbLibRecipientType, - Token as RgbLibToken, TokenLight as RgbLibTokenLight, WitnessData as RgbLibWitnessData, + SyncKeychain as RgbLibSyncKeychain, SyncOptions as RgbLibSyncOptions, + SyncStrategy as RgbLibSyncStrategy, Token as RgbLibToken, TokenLight as RgbLibTokenLight, + WitnessData as RgbLibWitnessData, }, AssetSchema as RgbLibAssetSchema, Assignment as RgbLibAssignment, BitcoinNetwork as RgbLibNetwork, ContractId, RgbTransport, @@ -1073,7 +1075,6 @@ pub(crate) struct SendRgbRequest { pub(crate) min_confirmations: u8, pub(crate) expiration_timestamp: Option, pub(crate) recipient_map: HashMap>, - pub(crate) skip_sync: bool, } #[derive(Deserialize, Serialize)] @@ -1122,6 +1123,58 @@ impl_writeable_tlv_based_enum!(SwapStatus, (4, Failed) => {}, ); +#[derive(Deserialize, Serialize)] +pub(crate) enum SyncKeychain { + Colored, + Vanilla { lookback: u32 }, +} + +impl From for RgbLibSyncKeychain { + fn from(value: SyncKeychain) -> Self { + match value { + SyncKeychain::Colored => RgbLibSyncKeychain::Colored, + SyncKeychain::Vanilla { lookback } => RgbLibSyncKeychain::Vanilla { lookback }, + } + } +} + +#[derive(Deserialize, Serialize)] +pub(crate) struct SyncOptions { + keychain: SyncKeychain, + strategy: SyncStrategy, +} + +impl From for RgbLibSyncOptions { + fn from(value: SyncOptions) -> Self { + Self { + keychain: value.keychain.into(), + strategy: value.strategy.into(), + } + } +} + +#[derive(Deserialize, Serialize)] +pub(crate) struct SyncRequest { + pub(crate) options: SyncOptions, +} + +#[derive(Deserialize, Serialize)] +pub(crate) enum SyncStrategy { + FullScan, + FullSync, + FastSync, +} + +impl From for RgbLibSyncStrategy { + fn from(value: SyncStrategy) -> Self { + match value { + SyncStrategy::FullScan => RgbLibSyncStrategy::FullScan, + SyncStrategy::FullSync => RgbLibSyncStrategy::FullSync, + SyncStrategy::FastSync => RgbLibSyncStrategy::FastSync, + } + } +} + #[derive(Deserialize, Serialize)] pub(crate) struct TakerRequest { pub(crate) swapstring: String, @@ -1232,12 +1285,14 @@ pub(crate) enum TransferKind { ReceiveWitness, Send, Inflation, + Burn, } #[derive(Debug, PartialEq, Deserialize, Serialize)] pub(crate) enum TransferStatus { Initiated, WaitingCounterparty, + WaitingSafeHeight, WaitingConfirmations, Settled, Failed, @@ -2587,6 +2642,7 @@ pub(crate) async fn list_transfers( status: match transfer.status { rgb_lib::TransferStatus::Initiated => TransferStatus::Initiated, rgb_lib::TransferStatus::WaitingCounterparty => TransferStatus::WaitingCounterparty, + rgb_lib::TransferStatus::WaitingSafeHeight => TransferStatus::WaitingSafeHeight, rgb_lib::TransferStatus::WaitingConfirmations => { TransferStatus::WaitingConfirmations } @@ -2601,6 +2657,7 @@ pub(crate) async fn list_transfers( rgb_lib::wallet::TransferKind::ReceiveWitness => TransferKind::ReceiveWitness, rgb_lib::wallet::TransferKind::Send => TransferKind::Send, rgb_lib::wallet::TransferKind::Inflation => TransferKind::Inflation, + rgb_lib::wallet::TransferKind::Burn => TransferKind::Burn, }, txid: transfer.txid, recipient_id: transfer.recipient_id, @@ -3772,7 +3829,6 @@ pub(crate) async fn send_rgb( payload.fee_rate, payload.min_confirmations, payload.expiration_timestamp, - payload.skip_sync, ) }) .await @@ -3816,12 +3872,13 @@ pub(crate) async fn sign_message( pub(crate) async fn sync( State(state): State>, + WithRejection(Json(payload), _): WithRejection, APIError>, ) -> Result, APIError> { no_cancel(async move { let guard = state.check_unlocked().await?; let unlocked_state = guard.as_ref().unwrap(); - unlocked_state.rgb_sync()?; + unlocked_state.rgb_sync(payload.options.into())?; Ok(Json(EmptyResponse {})) }) diff --git a/src/test/mod.rs b/src/test/mod.rs index 4af5438f..0e3d9c66 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -1579,7 +1579,6 @@ async fn send_assets( OffsetDateTime::now_utc().unix_timestamp() as u64 + DURATION_SECONDS, ), recipient_map, - skip_sync: false, }; let res = reqwest::Client::new() .post(format!("http://{node_address}/sendrgb"))