From e87744c95d4a105d9e1b6ccf359bb1e3abf91b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Tue, 10 Sep 2024 20:56:28 +0200 Subject: [PATCH] update rgb-lib to 0.3.0-alpha.7 --- .github/workflows/build.yaml | 1 + .github/workflows/rust.yaml | 48 --- Cargo.lock | 564 +++++++++++++---------------------- Cargo.toml | 6 +- rust-lightning | 2 +- rust-toolchain.toml | 5 - src/ldk.rs | 45 ++- src/rgb.rs | 14 +- 8 files changed, 257 insertions(+), 428 deletions(-) delete mode 100644 .github/workflows/rust.yaml delete mode 100644 rust-toolchain.toml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6ea7942..4de1e20 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,6 +26,7 @@ jobs: timeout-minutes: 30 steps: + - uses: ilammy/setup-nasm@v1 - uses: actions/checkout@v4 with: submodules: true diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml deleted file mode 100644 index 05ebdc1..0000000 --- a/.github/workflows/rust.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: Rust - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - lint: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - components: clippy - - name: Lint - run: cargo clippy --all-targets --all-features -- -D warnings - - format: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - components: rustfmt - - name: Format - run: cargo fmt -- --check - - test: - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Tests - run: cargo test --all-features diff --git a/Cargo.lock b/Cargo.lock index 50387a9..b6006be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,13 +75,14 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "aluvm" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032d213fd6b80b26217efb9846b273671acff3f696ada7e0314c6af2b4c3275" +checksum = "db04c1d697d7f5b86d935bfe06cfd0310fd8a6c491b043118bec228597dcede9" dependencies = [ "amplify", "ascii-armor", - "baid58", + "baid64", + "blake3", "getrandom", "half", "paste", @@ -95,9 +96,9 @@ dependencies = [ [[package]] name = "amplify" -version = "4.6.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e711289a6cb28171b4f0e6c8019c69ff9476050508dc082167575d458ff74d0" +checksum = "7147b742325842988dd6c793d55f58df3ae36bccf7d9b6e07db10ab035be343d" dependencies = [ "amplify_apfloat", "amplify_derive", @@ -112,9 +113,9 @@ dependencies = [ [[package]] name = "amplify_apfloat" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e23f5ede99065fa6957a633498d2728d51016d61dae23b69c866112b7c61ee" +checksum = "695e433882668b55b3d7fb0ba22bf9be66a91abe30d7ca1f1a774f8b90b4db4c" dependencies = [ "amplify_num", "bitflags 2.6.0", @@ -123,9 +124,9 @@ dependencies = [ [[package]] name = "amplify_derive" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759dcbfaf94d838367a86d493ec34ccc8aa6fe365cb7880d6bf89006de24d9c1" +checksum = "2a6309e6b8d89b36b9f959b7a8fa093583b94922a0f6438a24fb08936de4d428" dependencies = [ "amplify_syn", "proc-macro2", @@ -135,9 +136,9 @@ dependencies = [ [[package]] name = "amplify_num" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c009c5c4de814911b177e2ea59e4930bb918978ed3cce4900d846a6ceb0838" +checksum = "99bcb75a2982047f733547042fc3968c0f460dfcf7d90b90dea3b2744580e9ad" dependencies = [ "serde", "wasm-bindgen", @@ -256,12 +257,12 @@ dependencies = [ [[package]] name = "ascii-armor" -version = "0.2.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743d90b41a39d6e3920eef64a70f6411097cbb47141606a45b2a96533ec7111c" +checksum = "e4966ac403dc4a666d8131dfe4df684f45acc68d4c7e768db89c463aa5617910" dependencies = [ "amplify", - "baid58", + "baid64", "base85", "sha2 0.10.8", "strict_encoding", @@ -512,10 +513,10 @@ dependencies = [ "axum-core", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.4.1", + "hyper", "hyper-util", "itoa", "matchit", @@ -546,8 +547,8 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -568,8 +569,8 @@ dependencies = [ "axum-core", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -607,6 +608,18 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "baid64" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95dabc2759e01e2c382968639868a701f384a18890934f9e75d4feb4d6623794" +dependencies = [ + "amplify", + "base64 0.22.1", + "mnemonic", + "sha2 0.10.8", +] + [[package]] name = "base58" version = "0.2.0" @@ -900,9 +913,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ec96fe9a81b5e365f9db71fe00edc4fe4ca2cc7dcb7861f0603012a7caa210" +checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" dependencies = [ "arrayref", "arrayvec", @@ -961,9 +974,9 @@ dependencies = [ [[package]] name = "bp-consensus" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "966395ea17fa99b33a9093355924b0f79312b410e2c8a85ca8ebb8333098fb9a" +checksum = "ae3a99a46063d23d20a3177a04923652b245f31c2a04a6d0c47d5a93dc201a80" dependencies = [ "amplify", "chrono", @@ -976,9 +989,9 @@ dependencies = [ [[package]] name = "bp-core" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27581dae64d76a00fe4015eb7d710d262192ca6f18c1e798f75c4f5477f52d3c" +checksum = "60b8caf04291e2703ce267b1f8baf14f03879a6d1a5afe76e011ada489f172f9" dependencies = [ "amplify", "bp-consensus", @@ -995,9 +1008,9 @@ dependencies = [ [[package]] name = "bp-dbc" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4d21f5af26b145f7f73c7a338dc7bfe44d2b0f943c3ec6e3447d11d1fc3d6e0" +checksum = "11fc4081db2147411381b9650765ce683e5065559f1125508696f79cc4cbfedf" dependencies = [ "amplify", "base85", @@ -1010,48 +1023,48 @@ dependencies = [ [[package]] name = "bp-derive" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "259436bf0c49fa1fd0648cdde09d2d9bdc183dd4d2dfb3934902ef27faa9f14d" +checksum = "1d2687829a365ba79a22d91737fa7404fd3e2aaeee6b8f5780fa3e94e6cb36c2" dependencies = [ "amplify", - "bitcoin_hashes 0.13.0", "bp-consensus", "bp-invoice", "commit_verify", - "indexmap 2.2.6", + "hmac", + "indexmap 2.5.0", "serde", + "sha2 0.10.8", ] [[package]] name = "bp-electrum" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9be4a57a8cd34770dcc51dd0531bd05cc796d4ae7706f72bb233eb7bb718fb" +checksum = "0db2dc3a49489718e6e06cb796c536ca39eef8c036051afcb3f8d51cbc610fb8" dependencies = [ "amplify", "bp-std", "byteorder", "libc", "log", - "rustls 0.21.12", + "rustls 0.23.12", "serde", "serde_json", "sha2 0.10.8", - "webpki-roots 0.25.4", + "webpki-roots 0.26.3", "winapi", ] [[package]] name = "bp-esplora" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9e6234da60b0b790b2221567e14a7a89ac522bfd79f95d94a2ed9760d931a4" +checksum = "e93ec91cf6d037996044e90223ef0fba7f8a465e24eeed73ca9651271b03a964" dependencies = [ "amplify", "bp-std", "log", - "reqwest 0.11.27", "serde", "serde_with", "sha2 0.10.8", @@ -1060,25 +1073,25 @@ dependencies = [ [[package]] name = "bp-invoice" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ee0387fa924bd002b51713c42daf3cb7c3b669509523607445a99c90491788" +checksum = "f29c4f672b4b82ce7a218b2900254ac8e4b15b0022ed13abffa722571e73d375" dependencies = [ "amplify", "bech32 0.9.1", - "bitcoin_hashes 0.13.0", "bp-consensus", + "commit_verify", "serde", ] [[package]] name = "bp-seals" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131f371c9d605d5ed07cb0f5b07f3f261f6b3f6a146b6e890ecdb37802c51f6a" +checksum = "d607238c2bf2c34d048d14cd798a6365306e0fb6b02211235f3ccad0bc7fa8f1" dependencies = [ "amplify", - "baid58", + "baid64", "bp-consensus", "bp-dbc", "commit_verify", @@ -1090,36 +1103,38 @@ dependencies = [ [[package]] name = "bp-std" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84413a3ce10b304ce52c7a1604fccf78634f3a27df47b239be381b76ceb1bdea" +checksum = "c3c9642f7b303791ba5696ff4be52c8d21ac2d2265bf9552692c8b03c741c11c" dependencies = [ "amplify", "bp-consensus", "bp-derive", "bp-invoice", "descriptors", + "getrandom", "psbt", + "secp256k1 0.29.0", "serde", + "wasm-bindgen", ] [[package]] name = "bp-wallet" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4552e90fad2ed01b091b499b891e7a5d9e03f3c74e718e0e4801b01056fc247" +checksum = "c1b3cda17bafd67254e6f0be1b401a31d942dc54be138d5cc7976bb58291dff0" dependencies = [ "amplify", - "bp-electrum", - "bp-esplora", "bp-std", - "cfg_eval", "descriptors", + "log", + "nonasync", "psbt", "serde", - "serde_json", - "serde_with", "serde_yaml", + "sha2 0.10.8", + "strict_encoding", "toml", ] @@ -1143,12 +1158,13 @@ checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "cc" -version = "1.1.6" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -1166,17 +1182,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_eval" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", -] - [[package]] name = "chacha20" version = "0.9.1" @@ -1310,9 +1315,9 @@ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "commit_encoding_derive" -version = "0.11.0-beta.5" +version = "0.11.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d660fdac917fb67edd1707bc9481e51ed9062ab4ba1c4e56ed7856977fff9f3" +checksum = "ca41bd14a6c400486463a5b0e7e8916b1c7bad554a382f62c3b11bd58dea5934" dependencies = [ "amplify", "amplify_syn", @@ -1323,9 +1328,9 @@ dependencies = [ [[package]] name = "commit_verify" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77b78d8453b82136eb9743a8da9a94e265146e5c48668f0e0e71859aa726fa67" +checksum = "82a1982dc6c54d2dcfa2bf4398d97e4e80a93f24d2537e58d6110b2b272cff0c" dependencies = [ "amplify", "commit_encoding_derive", @@ -1564,13 +1569,13 @@ dependencies = [ [[package]] name = "descriptors" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08e46bb50018748f38bad98647589f2bef433faa5d8ed233c1e472c51275bd0d" +checksum = "9e15b0f1ea4c1b7f66b86153341f08961122f5bad3fa68546b9ac5b199c99c39" dependencies = [ "amplify", "bp-derive", - "indexmap 2.2.6", + "indexmap 2.5.0", "serde", ] @@ -1810,6 +1815,12 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "fast32" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27ea9bdb2356e5a92403cf23ac493f9b43bd71e4ffd0f800862b841dd723994c" + [[package]] name = "fastrand" version = "1.9.0" @@ -2091,31 +2102,13 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.2.6", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "half" -version = "2.2.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ + "cfg-if", "crunchy", ] @@ -2225,17 +2218,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.1.0" @@ -2247,17 +2229,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -2265,7 +2236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.1.0", + "http", ] [[package]] @@ -2276,8 +2247,8 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -2293,30 +2264,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hyper" -version = "0.14.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.7", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.4.1" @@ -2326,8 +2273,8 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -2337,19 +2284,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.30", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "hyper-tls" version = "0.6.0" @@ -2358,7 +2292,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.4.1", + "hyper", "hyper-util", "native-tls", "tokio", @@ -2375,9 +2309,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "hyper 1.4.1", + "http", + "http-body", + "hyper", "pin-project-lite", "socket2 0.5.7", "tokio", @@ -2438,9 +2372,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2851,7 +2785,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 1.1.0", + "http", "httparse", "memchr", "mime", @@ -2894,6 +2828,16 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nonasync" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b1005555d351f593bf72ffc3a89a0d42e243df004d2c4ded17699f10b562b98" +dependencies = [ + "amplify", + "log", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -3332,18 +3276,18 @@ dependencies = [ [[package]] name = "psbt" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a572f23bb63e0826d4540a6b925f152c64a47e0871d63dc06553aa7fcd045e5a" +checksum = "8b5b2f8fb596a1caffa486595c66eae3ebc3fb05c74063348b9a987373ba0cdb" dependencies = [ "amplify", - "base64 0.21.7", + "base64 0.22.1", "bp-core", "bp-derive", "chrono", "commit_verify", "descriptors", - "indexmap 2.2.6", + "indexmap 2.5.0", "serde", "strict_encoding", ] @@ -3469,47 +3413,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "hyper-tls 0.5.0", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tokio-native-tls", - "tokio-socks", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg 0.50.0", -] - [[package]] name = "reqwest" version = "0.12.5" @@ -3521,11 +3424,11 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.4.1", - "hyper-tls 0.6.0", + "hyper", + "hyper-tls", "hyper-util", "ipnet", "js-sys", @@ -3536,7 +3439,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile 2.1.2", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", @@ -3550,19 +3453,18 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg 0.52.0", + "winreg", ] [[package]] name = "rgb-core" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377bc5d01d9b22fef51da1ab83cfc743bf29827ce11fc4a2616894282a95c6a8" +checksum = "43dc70212f5eff8189f3cdfef2d11f53f7be4c4128db9839b5d56a0f9ef60c98" dependencies = [ "aluvm", "amplify", - "ascii-armor", - "baid58", + "baid64", "bp-core", "chrono", "commit_verify", @@ -3576,19 +3478,40 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "rgb-interfaces" +version = "0.11.0-beta.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37dea80df39205f6c1d0fc4a6d2ea0401d5e6b9b28ed852b707cb01517b3c991" +dependencies = [ + "aluvm", + "amplify", + "bp-core", + "chrono", + "getrandom", + "rgb-std", + "serde_json", + "sha2 0.10.8", + "strict_encoding", + "strict_types", + "wasm-bindgen", +] + [[package]] name = "rgb-invoice" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb83cdef397b7e8d84bd46f3f61620d89436e139cbab1cb929fd1c29aae24376" +checksum = "d42e9d284f857f3dccce63521789f3da75568f55488d255ebacc8fe343012a5d" dependencies = [ "amplify", - "baid58", + "baid64", "bp-core", "bp-invoice", + "fast32", "fluent-uri", - "indexmap 2.2.6", + "indexmap 2.5.0", "percent-encoding", + "rand", "rgb-core", "serde", "strict_encoding", @@ -3597,9 +3520,9 @@ dependencies = [ [[package]] name = "rgb-lib" -version = "0.3.0-alpha.6" +version = "0.3.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eeffa7599873a82aa22569c5f4a6b36d08fc07d5211543272c9ad2903d524bf" +checksum = "f0a62f2c679fd2041b098492ad0948a179372d256807d9652fe6a30427ef268a" dependencies = [ "amplify", "base64 0.22.1", @@ -3607,6 +3530,7 @@ dependencies = [ "bitcoin 0.30.2", "bp-core", "bp-electrum", + "bp-esplora", "bp-seals", "bp-std", "chacha20poly1305", @@ -3616,11 +3540,11 @@ dependencies = [ "futures", "hex", "rand", - "reqwest 0.12.5", + "reqwest", "rgb-core", + "rgb-interfaces", "rgb-invoice", "rgb-lib-migration", - "rgb-persist-fs", "rgb-psbt", "rgb-runtime", "rgb-schemata", @@ -3634,8 +3558,6 @@ dependencies = [ "slog-async", "slog-term", "strict_encoding", - "strict_encoding_derive", - "strict_types", "tempfile", "thiserror", "time", @@ -3685,7 +3607,7 @@ dependencies = [ "once_cell", "rand", "regex", - "reqwest 0.12.5", + "reqwest", "rgb-lib", "scrypt", "serde", @@ -3706,25 +3628,14 @@ dependencies = [ "zip", ] -[[package]] -name = "rgb-persist-fs" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1395497e320822a11f8db5097060f03c5dcde17d5b5dccb5f31a4a9a304085c3" -dependencies = [ - "amplify", - "rgb-std", - "strict_encoding", -] - [[package]] name = "rgb-psbt" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212024149dfccaa87d4764e845774a00592bbe81397597a65e969e49b0b64c31" +checksum = "d305b4fa125ed6d02ac211de9b1bb3d700e4cbb0a6508d32305a8fc2d31b6f02" dependencies = [ "amplify", - "baid58", + "baid64", "bp-core", "bp-std", "commit_verify", @@ -3737,12 +3648,12 @@ dependencies = [ [[package]] name = "rgb-runtime" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc2dd7c058c9c408eb923e7000243c9301d765f661570252f12ab2189b7a600" +checksum = "3ebf8b95c78697ecd2ffc51f6f207fad3808132f5399ce43d56a43d424f71d45" dependencies = [ "amplify", - "baid58", + "baid64", "bp-core", "bp-electrum", "bp-esplora", @@ -3751,26 +3662,28 @@ dependencies = [ "chrono", "commit_verify", "descriptors", - "indexmap 2.2.6", - "rgb-persist-fs", + "getrandom", + "indexmap 2.5.0", + "nonasync", "rgb-psbt", "rgb-std", "serde", - "serde_with", "serde_yaml", "strict_types", + "wasm-bindgen", ] [[package]] name = "rgb-schemata" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e9bb5205af73bf7cc9f4b471ca3e95817819f86932989a7cd974915d221d71" +checksum = "61aa7e109d0b8a73ff900c0af1cf256a9c4b14ded46fd3aa47540f461f0aa05d" dependencies = [ "aluvm", "amplify", - "ascii-armor", "bp-core", + "chrono", + "rgb-interfaces", "rgb-std", "serde", "serde_json", @@ -3781,19 +3694,21 @@ dependencies = [ [[package]] name = "rgb-std" -version = "0.11.0-beta.5" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a52e61cff03f205c5f4782bbe714d3a9a065086ec6c896ca39f3618aea5434d2" +checksum = "763a97b5e58521f41837b1a92f480041fd72a0659f22cb132354d2bbcba25b25" dependencies = [ + "aluvm", "amplify", "ascii-armor", - "baid58", + "baid64", "base85", "bp-core", "chrono", "commit_verify", "getrandom", - "indexmap 2.2.6", + "indexmap 2.5.0", + "nonasync", "rand", "rgb-core", "rgb-invoice", @@ -3914,15 +3829,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - [[package]] name = "rustls-pemfile" version = "2.1.2" @@ -4203,7 +4109,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" dependencies = [ "bitcoin_hashes 0.13.0", - "rand", "secp256k1-sys 0.9.2", "serde", ] @@ -4249,25 +4154,25 @@ dependencies = [ [[package]] name = "secp256k1-zkp" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4e48ef9c98bfbcb98bd15693ffa19676cb3e29426b75eda8b73c05cdd7959f8" +checksum = "52a44aed3002b5ae975f8624c5df3a949cfbf00479e18778b6058fcd213b76e3" dependencies = [ "bitcoin-private", "rand", - "secp256k1 0.28.2", + "secp256k1 0.29.0", "secp256k1-zkp-sys", "serde", ] [[package]] name = "secp256k1-zkp-sys" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ead52f43074bae2ddbd1e0e66e6b170135e76117f5ea9916f33d7bd0b36e29" +checksum = "8c6eea7919e0cab992510edfbf40bd9342c0a3c2bb910f2c51355c2cb2d69839" dependencies = [ "cc", - "secp256k1-sys 0.9.2", + "secp256k1-sys 0.10.0", ] [[package]] @@ -4319,7 +4224,7 @@ version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "itoa", "ryu", "serde", @@ -4337,9 +4242,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -4376,7 +4281,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.5.0", "serde", "serde_derive", "serde_json", @@ -4402,7 +4307,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "itoa", "ryu", "serde", @@ -4505,9 +4410,9 @@ dependencies = [ [[package]] name = "single_use_seals" -version = "0.11.0-beta.6" +version = "0.11.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55367b3a0d642ee289fec6781fda0b527a35d45511a04bb4cd19fa315c441b77" +checksum = "c1a4c51f21507cf63984c367507f281215073e85b08711ed7da4fc63dbd709e0" dependencies = [ "amplify_derive", ] @@ -4670,7 +4575,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.6", + "indexmap 2.5.0", "log", "memchr", "native-tls", @@ -4837,24 +4742,25 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strict_encoding" -version = "2.7.0-beta.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12eaa6985afa31deacc86cdc4935a36960ae09131a1f4e1db430127ebc4f05d" +checksum = "d69b4893cf054e129d5288a565102124520d7b94eb9589d1e78202abc7e2092d" dependencies = [ "amplify", "half", "serde", "strict_encoding_derive", + "wasm-bindgen", ] [[package]] name = "strict_encoding_derive" -version = "2.7.0-beta.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1b064a62618a785e6d8f4df13d905dc335b56400d48f9b4f8b12dcba82b260" +checksum = "0d4f9b678862372f8e439bcaafc27df7610ea93b06d2deb6244dec0af4259ce6" dependencies = [ "amplify_syn", - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", "syn 1.0.109", @@ -4862,15 +4768,15 @@ dependencies = [ [[package]] name = "strict_types" -version = "2.7.0-beta.2" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c32716de4b99b0e8fb0c114e99b6929613e8d7302999c6b8c77251783923ad" +checksum = "5f16e8855a575633815f01482ac927ebaca3d2485aec8e17226c6826de29154e" dependencies = [ "amplify", "ascii-armor", - "baid58", + "baid64", "half", - "indexmap 2.2.6", + "indexmap 2.5.0", "serde", "serde_json", "serde_yaml", @@ -4878,6 +4784,7 @@ dependencies = [ "strict_encoding", "toml", "vesper-lang", + "wasm-bindgen", ] [[package]] @@ -4953,27 +4860,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "take_mut" version = "0.2.2" @@ -5128,18 +5014,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-socks" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" -dependencies = [ - "either", - "futures-util", - "thiserror", - "tokio", -] - [[package]] name = "tokio-util" version = "0.7.11" @@ -5155,9 +5029,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.15" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -5167,20 +5041,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.16" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", @@ -5211,8 +5085,8 @@ checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ "bitflags 2.6.0", "bytes", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "pin-project-lite", "tower-layer", @@ -5411,9 +5285,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72139d247e5f97a3eff96229a7ae85ead5328a39efe76f8bf5a06313d505b6ea" +checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" dependencies = [ "base64 0.22.1", "flate2", @@ -5848,23 +5722,13 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557404e450152cd6795bb558bca69e43c585055f4606e3bcae5894fc6dac9ba0" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "winreg" version = "0.52.0" @@ -5925,7 +5789,7 @@ dependencies = [ "crc32fast", "crossbeam-utils", "displaydoc", - "indexmap 2.2.6", + "indexmap 2.5.0", "memchr", "thiserror", "time", diff --git a/Cargo.toml b/Cargo.toml index ce0a010..25164fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,13 +2,13 @@ name = "rgb-lightning-node" version = "0.1.0" edition = "2021" -rust-version = "1.75.0" +rust-version = "1.76.0" [[bin]] name = "rgb-lightning-node" [dependencies] -amplify = { version = "=4.6.0", default-features = false } +amplify = { version = "=4.7.0", default-features = false } anyhow = "1.0.86" axum = { version = "0.7.5", features = ["multipart"] } axum-extra = "0.9.3" @@ -32,7 +32,7 @@ lightning-persister = { version = "0.0.123", path = "./rust-lightning/lightning- lightning-rapid-gossip-sync = { version = "0.0.123", path = "./rust-lightning/lightning-rapid-gossip-sync" } magic-crypt = "3.1.13" rand = "0.8.5" -rgb-lib = { version = "0.3.0-alpha.6", features = [ +rgb-lib = { version = "0.3.0-alpha.7", features = [ "electrum", "esplora", ] } diff --git a/rust-lightning b/rust-lightning index bafe1db..372f2e3 160000 --- a/rust-lightning +++ b/rust-lightning @@ -1 +1 @@ -Subproject commit bafe1db29ea9c09045c0a3fa17c6d14a29d62a31 +Subproject commit 372f2e3ab041e03d48cb5878e81e7fac70aaddbf diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index f7b1400..0000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,5 +0,0 @@ -[toolchain] -channel = "stable" -components = ["clippy", "rustfmt"] -targets = [] -profile = "minimal" diff --git a/src/ldk.rs b/src/ldk.rs index 53dfb40..98fdc53 100644 --- a/src/ldk.rs +++ b/src/ldk.rs @@ -44,7 +44,6 @@ use lightning_block_sync::UnboundedCache; use lightning_net_tokio::SocketDescriptor; use lightning_persister::fs_store::FilesystemStore; use rand::{thread_rng, Rng, RngCore}; -use rgb_lib::wallet::AssetIface; use rgb_lib::{ bdk::keys::{bip39::Mnemonic, DerivableKey, ExtendedKey}, bitcoin::{ @@ -56,10 +55,10 @@ use rgb_lib::{ utils::{get_account_xpub, recipient_id_from_script_buf, script_buf_from_recipient_id}, wallet::{ rust_only::{AssetColoringInfo, ColoringInfo}, - DatabaseType, Outpoint, Recipient, TransportEndpoint, Wallet as RgbLibWallet, WalletData, - WitnessData, + AssetIface, DatabaseType, Outpoint, Recipient, TransportEndpoint, Wallet as RgbLibWallet, + WalletData, WitnessData, }, - AssetSchema, ContractId, FileContent, RgbTransfer, + AssetSchema, ConsignmentExt, ContractId, FileContent, RgbTransfer, }; use std::collections::hash_map::Entry; use std::collections::HashMap; @@ -503,7 +502,7 @@ async fn handle_ldk_events( &temporary_channel_id, &PathBuf::from(&static_state.ldk_data_dir), ); - let (unsigned_psbt, asset_id) = if is_colored { + let (unsigned_psbt, asset_id, recipient_id) = if is_colored { let (rgb_info, _) = get_rgb_channel_info_pending( &temporary_channel_id, &PathBuf::from(&static_state.ldk_data_dir), @@ -517,7 +516,7 @@ async fn handle_ldk_events( let recipient_map = map! { asset_id.clone() => vec![Recipient { - recipient_id, + recipient_id: recipient_id.clone(), witness_data: Some(WitnessData { amount_sat: channel_value_satoshis, blinding: Some(STATIC_BLINDING), @@ -534,12 +533,12 @@ async fn handle_ldk_events( }) .await .unwrap(); - (unsigned_psbt, Some(asset_id)) + (unsigned_psbt, Some(asset_id), Some(recipient_id)) } else { let unsigned_psbt = unlocked_state .rgb_send_btc_begin(addr.to_address(), channel_value_satoshis, FEE_RATE) .unwrap(); - (unsigned_psbt, None) + (unsigned_psbt, None, None) }; let signed_psbt = unlocked_state.rgb_sign_psbt(unsigned_psbt).unwrap(); @@ -554,13 +553,17 @@ async fn handle_ldk_events( fs::write(psbt_path, psbt.to_string()).unwrap(); if is_colored { - let asset_id = asset_id.expect("Must be present"); + let asset_id = asset_id.expect("is present"); + let recipient_id = recipient_id.expect("is present"); let consignment_path = unlocked_state .rgb_get_wallet_dir() .join("transfers") .join(funding_txid.clone()) .join(asset_id.replace("rgb:", "")) - .join("consignment_out"); + .join(format!( + "{}.consignment_out", + recipient_id.replace(":", "_") + )); let proxy_url = TransportEndpoint::new(static_state.proxy_endpoint.clone()) .unwrap() .endpoint; @@ -1193,11 +1196,12 @@ impl OutputSpender for RgbOutputSpender { }; let txid = outpoint.txid; + let txid_str = txid.to_string(); let transfer_info_path = self .static_state .ldk_data_dir - .join(format!("{txid}_transfer_info")); + .join(format!("{txid_str}_transfer_info")); if !transfer_info_path.exists() { continue; }; @@ -1208,6 +1212,18 @@ impl OutputSpender for RgbOutputSpender { vanilla_descriptor = false; + let closing_height = self + .rgb_wallet_wrapper + .get_tx_height(txid_str.clone()) + .map_err(|_| ())?; + let update_res = self + .rgb_wallet_wrapper + .update_witnesses(closing_height.unwrap()) + .unwrap(); + if !update_res.failed.is_empty() { + return Err(()); + } + let contract_id = transfer_info.contract_id; let mut new_asset = false; @@ -1229,14 +1245,10 @@ impl OutputSpender for RgbOutputSpender { receive_data.recipient_id }; - self.rgb_wallet_wrapper - .consume_fascia(transfer_info.fascia.clone()) - .unwrap(); - let amt_rgb = transfer_info.rgb_amount; let input_outpoint = Outpoint { - txid: outpoint.txid.to_string(), + txid: txid_str, vout: outpoint.index.into(), }; asset_info @@ -1291,6 +1303,7 @@ impl OutputSpender for RgbOutputSpender { let coloring_info = ColoringInfo { asset_info_map, static_blinding: None, + nonce: None, }; let mut psbt = RgbLibPsbt::from_str(&psbt.to_string()).unwrap(); diff --git a/src/rgb.rs b/src/rgb.rs index f915ecd..f091f15 100644 --- a/src/rgb.rs +++ b/src/rgb.rs @@ -20,7 +20,7 @@ use rgb_lib::{ ReceiveData, Recipient, RefreshResult, SendResult, Transaction as RgbLibTransaction, Transfer, Unspent, WalletData, }, - AssetSchema, Contract, ContractId, Error as RgbLibError, Fascia, RgbTransfer, + AssetSchema, Contract, ContractId, Error as RgbLibError, RgbTransfer, UpdateRes, Wallet as RgbLibWallet, }; use std::collections::HashMap; @@ -272,10 +272,6 @@ impl RgbLibWalletWrapper { .color_psbt_and_consume(psbt_to_color, coloring_info) } - pub(crate) fn consume_fascia(&self, fascia: Fascia) -> Result<(), RgbLibError> { - self.get_rgb_wallet().consume_fascia(fascia) - } - pub(crate) fn create_utxos( &self, up_to: bool, @@ -312,6 +308,10 @@ impl RgbLibWalletWrapper { self.get_rgb_wallet().get_media_dir() } + pub(crate) fn get_tx_height(&self, txid: String) -> Result, RgbLibError> { + self.get_rgb_wallet().get_tx_height(txid) + } + pub(crate) fn get_wallet_data(&self) -> WalletData { self.get_rgb_wallet().get_wallet_data() } @@ -488,6 +488,10 @@ impl RgbLibWalletWrapper { self.get_rgb_wallet().sign_psbt(unsigned_psbt, None) } + pub(crate) fn update_witnesses(&self, after_height: u32) -> Result { + self.get_rgb_wallet().update_witnesses(after_height) + } + pub(crate) fn witness_receive( &self, transport_endpoints: Vec,