From 5d5f5dd3502bc0d78fcfc67652b8a1fa8535aa75 Mon Sep 17 00:00:00 2001
From: Ilyar <761285+ilyar@users.noreply.github.com>
Date: Sun, 14 May 2023 05:25:37 +0200
Subject: [PATCH] refactor: updated dependencies and rename package
---
CHANGELOG.md | 7 +-
Cargo.lock | 2223 +++++++++++++++++
Cargo.toml | 8 +
Makefile | 31 +
README.md | 26 +-
builder/src/main.rs | 21 +-
debot-browser/Cargo.toml | 62 +-
debot-browser/README.md | 29 +-
debot-browser/src/api.rs | 59 +-
debot-browser/src/callbacks.rs | 8 +-
debot-browser/src/config.rs | 121 +-
debot-browser/src/crypto.rs | 64 +-
debot-browser/src/helpers.rs | 7 +-
debot-browser/src/interfaces/address_input.rs | 2 +-
debot-browser/src/interfaces/amount_input.rs | 2 +-
debot-browser/src/interfaces/confirm_input.rs | 2 +-
debot-browser/src/interfaces/dinterface.rs | 28 +-
debot-browser/src/interfaces/echo.rs | 50 +-
.../src/interfaces/encryption_box_input.rs | 34 +-
.../src/interfaces/input_interface.rs | 22 +-
debot-browser/src/interfaces/menu.rs | 15 +-
debot-browser/src/interfaces/mod.rs | 8 +-
debot-browser/src/interfaces/number_input.rs | 4 +-
.../src/interfaces/signing_box_input.rs | 32 +-
debot-browser/src/interfaces/stdout.rs | 44 +-
debot-browser/src/interfaces/terminal.rs | 16 +-
debot-browser/src/interfaces/userinfo.rs | 26 +-
debot-browser/src/lib.rs | 6 +-
debot-browser/src/pipechain.rs | 12 +-
debot-browser/src/processor.rs | 85 +-
debot-browser/src/term_browser.rs | 80 +-
debot-browser/src/term_signing_box.rs | 2 +-
debot-browser/tests/web.rs | 4 +-
demo/.gitignore | 24 +
{test-server => demo}/debot/ICompleted.sol | 0
{test-server => demo}/debot/SendDebot.sol | 0
{test-server => demo}/debot/TestDebot.sol | 0
demo/index.html | 13 +
demo/package-lock.json | 834 +++++++
demo/package.json | 21 +
demo/src/browser.ts | 75 +
demo/src/main.ts | 21 +
demo/src/manifest/default.json | 92 +
demo/src/manifest/send.json | 33 +
demo/src/style.css | 93 +
demo/src/vite-env.d.ts | 1 +
demo/tsconfig.json | 23 +
demo/vite.config.ts | 12 +
test-server/.bin/create-wasm-app.js | 24 -
test-server/.gitignore | 6 -
test-server/.travis.yml | 5 -
test-server/LICENSE-APACHE | 201 --
test-server/LICENSE-MIT | 25 -
test-server/README.md | 67 -
test-server/bootstrap.js | 5 -
test-server/index.html | 19 -
test-server/index.js | 216 --
test-server/package.json | 35 -
test-server/webpack.config.js | 14 -
59 files changed, 3998 insertions(+), 1001 deletions(-)
create mode 100644 Cargo.lock
create mode 100644 Cargo.toml
create mode 100644 Makefile
create mode 100644 demo/.gitignore
rename {test-server => demo}/debot/ICompleted.sol (100%)
rename {test-server => demo}/debot/SendDebot.sol (100%)
rename {test-server => demo}/debot/TestDebot.sol (100%)
create mode 100644 demo/index.html
create mode 100644 demo/package-lock.json
create mode 100644 demo/package.json
create mode 100644 demo/src/browser.ts
create mode 100644 demo/src/main.ts
create mode 100644 demo/src/manifest/default.json
create mode 100644 demo/src/manifest/send.json
create mode 100644 demo/src/style.css
create mode 100644 demo/src/vite-env.d.ts
create mode 100644 demo/tsconfig.json
create mode 100644 demo/vite.config.ts
delete mode 100755 test-server/.bin/create-wasm-app.js
delete mode 100644 test-server/.gitignore
delete mode 100644 test-server/.travis.yml
delete mode 100644 test-server/LICENSE-APACHE
delete mode 100644 test-server/LICENSE-MIT
delete mode 100644 test-server/README.md
delete mode 100644 test-server/bootstrap.js
delete mode 100644 test-server/index.html
delete mode 100644 test-server/index.js
delete mode 100644 test-server/package.json
delete mode 100644 test-server/webpack.config.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e90b959..d102e2f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
+## 0.6.0 (2023-05-??)
+
+* updated dependencies and ever-sdk to 1.42.1
+* rename package to `@ever-guild/debot-browser`
+
## 0.5.5 (2022-04-05)
## Fixes
@@ -82,4 +87,4 @@ All notable changes to this project will be documented in this file.
- MVP of wasm debot browser.
- add `run_debot_browser` API function.
- - add test server.
\ No newline at end of file
+ - add test server.
diff --git a/Cargo.lock b/Cargo.lock
new file mode 100644
index 0000000..4922544
--- /dev/null
+++ b/Cargo.lock
@@ -0,0 +1,2223 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "addr2line"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
+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.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
+dependencies = [
+ "cfg-if",
+ "cipher 0.3.0",
+ "cpufeatures",
+ "opaque-debug",
+]
+
+[[package]]
+name = "ahash"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
+dependencies = [
+ "getrandom 0.2.9",
+ "once_cell",
+ "version_check",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "ansi_term"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.71"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"
+
+[[package]]
+name = "api_derive"
+version = "1.42.1"
+source = "git+https://github.com/tonlabs/ever-sdk.git?tag=1.42.1#4dbaac8c5c329b87f81fa463ce9e1efbcd6a5353"
+dependencies = [
+ "api_info",
+ "proc-macro2",
+ "quote",
+ "serde_json",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "api_info"
+version = "1.42.1"
+source = "git+https://github.com/tonlabs/ever-sdk.git?tag=1.42.1#4dbaac8c5c329b87f81fa463ce9e1efbcd6a5353"
+dependencies = [
+ "serde",
+ "serde_derive",
+ "serde_json",
+]
+
+[[package]]
+name = "arrayref"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545"
+
+[[package]]
+name = "async-trait"
+version = "0.1.68"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.16",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "backtrace"
+version = "0.3.67"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide 0.6.2",
+ "object",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "base58"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83"
+
+[[package]]
+name = "base64"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "base64"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
+
+[[package]]
+name = "base64"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+
+[[package]]
+name = "base64"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
+
+[[package]]
+name = "bincode"
+version = "1.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[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-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block-modes"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2cb03d1bed155d89dce0f845b7899b18a9a163e148fd004e1c28421a783e2d8e"
+dependencies = [
+ "block-padding",
+ "cipher 0.3.0",
+]
+
+[[package]]
+name = "block-padding"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
+
+[[package]]
+name = "bstr"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "build_const"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4ae4235e6dac0694637c763029ecea1a2ec9e4e06ec2729bd21ba4d9c863eb7"
+
+[[package]]
+name = "builder"
+version = "0.1.0"
+dependencies = [
+ "dirs",
+ "flate2",
+ "regex",
+ "serde",
+ "serde_json",
+ "wasmprinter",
+ "wat",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b"
+
+[[package]]
+name = "byteorder"
+version = "1.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+
+[[package]]
+name = "cc"
+version = "1.0.79"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+dependencies = [
+ "jobserver",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chacha20"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed8738f14471a99f0e316c327e68fc82a3611cc2895fcb604b89eedaf8f39d95"
+dependencies = [
+ "cipher 0.2.5",
+]
+
+[[package]]
+name = "chrono"
+version = "0.4.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
+dependencies = [
+ "iana-time-zone",
+ "js-sys",
+ "num-integer",
+ "num-traits",
+ "time",
+ "wasm-bindgen",
+ "winapi",
+]
+
+[[package]]
+name = "cipher"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "cipher"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "clear_on_drop"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38508a63f4979f0048febc9966fadbd48e5dab31fd0ec6a3f151bbf4a74f7423"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "console_error_panic_hook"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb"
+dependencies = [
+ "build_const",
+]
+
+[[package]]
+name = "crc"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484"
+
+[[package]]
+name = "crc32fast"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crunchy"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "crypto-mac"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
+dependencies = [
+ "generic-array",
+ "subtle",
+]
+
+[[package]]
+name = "crypto-mac"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
+dependencies = [
+ "generic-array",
+ "subtle",
+]
+
+[[package]]
+name = "curve25519-dalek"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61"
+dependencies = [
+ "byteorder",
+ "digest 0.9.0",
+ "rand_core 0.5.1",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "debot-browser"
+version = "0.6.0-rc.2"
+dependencies = [
+ "async-trait",
+ "base64 0.10.1",
+ "clear_on_drop",
+ "console_error_panic_hook",
+ "hex 0.4.3",
+ "js-sys",
+ "lazy_static",
+ "log",
+ "num-bigint",
+ "num-traits",
+ "rand 0.8.5",
+ "regex",
+ "serde",
+ "serde-wasm-bindgen",
+ "serde_derive",
+ "serde_json",
+ "tokio",
+ "ton_client",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-bindgen-test",
+ "web-sys",
+]
+
+[[package]]
+name = "diffy"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c27ec7cef89a63c063e06570bb861b7d35e406d6885551b346d77c459b34d3db"
+dependencies = [
+ "ansi_term",
+]
+
+[[package]]
+name = "digest"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
+dependencies = [
+ "block-buffer 0.10.4",
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "dirs"
+version = "3.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309"
+dependencies = [
+ "dirs-sys",
+]
+
+[[package]]
+name = "dirs-sys"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
+[[package]]
+name = "ed25519"
+version = "1.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
+dependencies = [
+ "signature",
+]
+
+[[package]]
+name = "ed25519-dalek"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
+dependencies = [
+ "curve25519-dalek",
+ "ed25519",
+ "rand 0.7.3",
+ "serde",
+ "sha2 0.9.9",
+ "zeroize",
+]
+
+[[package]]
+name = "extfmt"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a48fe53466ab1f4ea6303bf9d7a0ca8060778590f09fd6c3304cc817aeb9935d"
+
+[[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 1.0.109",
+ "synstructure",
+]
+
+[[package]]
+name = "flate2"
+version = "1.0.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide 0.7.1",
+]
+
+[[package]]
+name = "form_urlencoded"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "futures"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.16",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
+
+[[package]]
+name = "futures-task"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
+
+[[package]]
+name = "futures-util"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+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",
+ "js-sys",
+ "libc",
+ "wasi 0.9.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "gimli"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+dependencies = [
+ "ahash",
+]
+
+[[package]]
+name = "hex"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
+
+[[package]]
+name = "hex"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+
+[[package]]
+name = "hmac"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
+dependencies = [
+ "crypto-mac 0.8.0",
+ "digest 0.9.0",
+]
+
+[[package]]
+name = "hmac"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
+dependencies = [
+ "crypto-mac 0.11.1",
+ "digest 0.9.0",
+]
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest 0.10.6",
+]
+
+[[package]]
+name = "hmac-drbg"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1"
+dependencies = [
+ "digest 0.9.0",
+ "generic-array",
+ "hmac 0.8.1",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "idna"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "index-fixed"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4161ceaf2f41b6cd3f6502f5da085d4ad4393a51e0c70ed2fce1d5698d798fae"
+
+[[package]]
+name = "indexed_db_futures"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d26ac735f676c52305becf53264b91cea9866a8de61ccbf464405b377b9cbca9"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "uuid",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+
+[[package]]
+name = "jobserver"
+version = "0.1.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.62"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68c16e1bfd491478ab155fd8b4896b86f9ede344949b641e61501e07c2b8b4d5"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "leb128"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
+
+[[package]]
+name = "libc"
+version = "0.2.144"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1"
+
+[[package]]
+name = "libsecp256k1"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73"
+dependencies = [
+ "arrayref",
+ "base64 0.12.3",
+ "digest 0.9.0",
+ "hmac-drbg",
+ "libsecp256k1-core",
+ "libsecp256k1-gen-ecmult",
+ "libsecp256k1-gen-genmult",
+ "rand 0.7.3",
+ "serde",
+ "sha2 0.9.9",
+ "typenum",
+]
+
+[[package]]
+name = "libsecp256k1-core"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80"
+dependencies = [
+ "crunchy",
+ "digest 0.9.0",
+ "subtle",
+]
+
+[[package]]
+name = "libsecp256k1-gen-ecmult"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3"
+dependencies = [
+ "libsecp256k1-core",
+]
+
+[[package]]
+name = "libsecp256k1-gen-genmult"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d"
+dependencies = [
+ "libsecp256k1-core",
+]
+
+[[package]]
+name = "lockfree"
+version = "0.5.1"
+source = "git+https://github.com/tonlabs/lockfree.git#bfcb66587dc4ffed9e8e9248995ad2fe8dc3669e"
+dependencies = [
+ "owned-alloc",
+]
+
+[[package]]
+name = "log"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "lru"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a"
+dependencies = [
+ "hashbrown",
+]
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
+dependencies = [
+ "adler",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
+dependencies = [
+ "adler",
+]
+
+[[package]]
+name = "num"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606"
+dependencies = [
+ "num-bigint",
+ "num-complex",
+ "num-integer",
+ "num-iter",
+ "num-rational",
+ "num-traits",
+]
+
+[[package]]
+name = "num-bigint"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-complex"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "num-derive"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+dependencies = [
+ "autocfg",
+ "num-traits",
+]
+
+[[package]]
+name = "num-iter"
+version = "0.1.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-rational"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
+dependencies = [
+ "autocfg",
+ "num-bigint",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "object"
+version = "0.30.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
+
+[[package]]
+name = "opaque-debug"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
+
+[[package]]
+name = "ordered-float"
+version = "2.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "owned-alloc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30fceb411f9a12ff9222c5f824026be368ff15dc2f13468d850c7d3f502205d6"
+
+[[package]]
+name = "pbkdf2"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa"
+dependencies = [
+ "crypto-mac 0.11.1",
+]
+
+[[package]]
+name = "pbkdf2"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
+dependencies = [
+ "digest 0.10.6",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
+
+[[package]]
+name = "pom"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60f6ce597ecdcc9a098e7fddacb1065093a3d66446fa16c675e7e71d1b5c28e6"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500"
+dependencies = [
+ "proc-macro2",
+]
+
+[[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 0.2.2",
+ "rand_core 0.5.1",
+ "rand_hc",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
+]
+
+[[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_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.6.4",
+]
+
+[[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.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom 0.2.9",
+]
+
+[[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.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
+dependencies = [
+ "getrandom 0.2.9",
+ "redox_syscall",
+ "thiserror",
+]
+
+[[package]]
+name = "regex"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c"
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
+[[package]]
+name = "rustc-hash"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
+[[package]]
+name = "ryu"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+
+[[package]]
+name = "salsa20"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecbd2eb639fd7cab5804a0837fe373cc2172d15437e804c054a9fb885cb923b0"
+dependencies = [
+ "cipher 0.3.0",
+]
+
+[[package]]
+name = "scoped-tls"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
+
+[[package]]
+name = "scrypt"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "879588d8f90906e73302547e20fffefdd240eb3e0e744e142321f5d49dea0518"
+dependencies = [
+ "hmac 0.11.0",
+ "pbkdf2 0.8.0",
+ "salsa20",
+ "sha2 0.9.9",
+]
+
+[[package]]
+name = "secstr"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cce2c726741c320e5b8f1edd9a21b3c2c292ae94514afd001d41d81ba143dafc"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.163"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde-wasm-bindgen"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e"
+dependencies = [
+ "js-sys",
+ "serde",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.163"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.16",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.96"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
+dependencies = [
+ "indexmap",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_repr"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.16",
+]
+
+[[package]]
+name = "sha2"
+version = "0.9.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
+dependencies = [
+ "block-buffer 0.9.0",
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.9.0",
+ "opaque-debug",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.6",
+]
+
+[[package]]
+name = "signature"
+version = "1.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
+
+[[package]]
+name = "similar"
+version = "2.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf"
+dependencies = [
+ "bstr",
+]
+
+[[package]]
+name = "slab"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+
+[[package]]
+name = "sodalite"
+version = "0.3.0"
+source = "git+https://github.com/tonlabs/sodalite.git#667f7f01290c95fdbeadc5bce3e32c1d14b92fe1"
+dependencies = [
+ "index-fixed",
+ "rand 0.7.3",
+]
+
+[[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.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "synstructure"
+version = "0.12.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "unicode-xid",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.16",
+]
+
+[[package]]
+name = "time"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
+dependencies = [
+ "libc",
+ "wasi 0.10.0+wasi-snapshot-preview1",
+ "winapi",
+]
+
+[[package]]
+name = "tiny-bip39"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861"
+dependencies = [
+ "anyhow",
+ "hmac 0.12.1",
+ "once_cell",
+ "pbkdf2 0.11.0",
+ "rand 0.8.5",
+ "rustc-hash",
+ "sha2 0.10.6",
+ "thiserror",
+ "unicode-normalization",
+ "wasm-bindgen",
+ "zeroize",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[package]]
+name = "tinyvec_macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
+
+[[package]]
+name = "tokio"
+version = "1.28.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105"
+dependencies = [
+ "autocfg",
+ "pin-project-lite",
+ "windows-sys",
+]
+
+[[package]]
+name = "tokio-stream"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "ton_abi"
+version = "2.3.73"
+source = "git+https://github.com/tonlabs/ever-abi.git?tag=2.3.73#cc50dcb6f04e8b2f9300e12d91bb57f15aadd44c"
+dependencies = [
+ "base64 0.10.1",
+ "byteorder",
+ "chrono",
+ "ed25519",
+ "ed25519-dalek",
+ "failure",
+ "hex 0.3.2",
+ "num-bigint",
+ "num-traits",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "sha2 0.10.6",
+ "ton_block 1.9.37",
+ "ton_types",
+]
+
+[[package]]
+name = "ton_api"
+version = "0.2.185"
+source = "git+https://github.com/tonlabs/ever-tl.git?tag=0.2.185#562c422f3136fe78d99518b4df62f1855eb83958"
+dependencies = [
+ "byteorder",
+ "extfmt",
+ "failure",
+ "hex 0.4.3",
+ "lazy_static",
+ "ordered-float",
+ "secstr",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "ton_block 1.9.37",
+ "ton_tl_codegen",
+ "ton_types",
+]
+
+[[package]]
+name = "ton_block"
+version = "1.9.28"
+source = "git+https://github.com/tonlabs/ever-block.git?tag=1.9.28#2d4130374d6b71e51156c51a589bfb92a05121bb"
+dependencies = [
+ "base64 0.13.1",
+ "crc 3.0.1",
+ "ed25519",
+ "ed25519-dalek",
+ "failure",
+ "hex 0.4.3",
+ "log",
+ "num",
+ "num-traits",
+ "sha2 0.10.6",
+ "ton_types",
+]
+
+[[package]]
+name = "ton_block"
+version = "1.9.37"
+source = "git+https://github.com/tonlabs/ever-block.git?tag=1.9.37#3a5a1bb0c6c5f20563f678885031e0942cb39c08"
+dependencies = [
+ "base64 0.13.1",
+ "crc 3.0.1",
+ "ed25519",
+ "ed25519-dalek",
+ "failure",
+ "hex 0.4.3",
+ "log",
+ "num",
+ "num-traits",
+ "sha2 0.10.6",
+ "ton_types",
+]
+
+[[package]]
+name = "ton_block_json"
+version = "0.7.105"
+source = "git+https://github.com/tonlabs/ever-block-json.git?tag=0.7.105#5405d633afa9638d2dcd89e5e4b1b8332b276ca5"
+dependencies = [
+ "base64 0.13.1",
+ "failure",
+ "hex 0.4.3",
+ "num",
+ "num-traits",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "ton_api",
+ "ton_block 1.9.37",
+ "ton_types",
+]
+
+[[package]]
+name = "ton_client"
+version = "1.42.1"
+source = "git+https://github.com/tonlabs/ever-sdk.git?tag=1.42.1#4dbaac8c5c329b87f81fa463ce9e1efbcd6a5353"
+dependencies = [
+ "aes",
+ "api_derive",
+ "api_info",
+ "async-trait",
+ "base58",
+ "base64 0.10.1",
+ "bincode",
+ "block-modes",
+ "byteorder",
+ "chacha20",
+ "chrono",
+ "crc 3.0.1",
+ "ed25519-dalek",
+ "failure",
+ "futures",
+ "hex 0.3.2",
+ "hmac 0.11.0",
+ "indexed_db_futures",
+ "js-sys",
+ "lazy_static",
+ "libsecp256k1",
+ "lockfree",
+ "log",
+ "lru",
+ "num-bigint",
+ "num-derive",
+ "num-traits",
+ "pbkdf2 0.8.0",
+ "rand 0.7.3",
+ "regex",
+ "scrypt",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "serde_repr",
+ "sha2 0.9.9",
+ "sodalite",
+ "tiny-bip39",
+ "tokio",
+ "tokio-stream",
+ "ton_abi",
+ "ton_block 1.9.37",
+ "ton_block_json",
+ "ton_client_processing",
+ "ton_executor",
+ "ton_sdk",
+ "ton_types",
+ "ton_vm",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "zeroize",
+ "zstd",
+]
+
+[[package]]
+name = "ton_client_processing"
+version = "1.42.1"
+source = "git+https://github.com/tonlabs/ever-sdk.git?tag=1.42.1#4dbaac8c5c329b87f81fa463ce9e1efbcd6a5353"
+dependencies = [
+ "api_derive",
+ "api_info",
+ "async-trait",
+ "base64 0.21.0",
+ "futures",
+ "log",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "serde_repr",
+ "tokio",
+ "ton_block 1.9.28",
+ "ton_types",
+]
+
+[[package]]
+name = "ton_executor"
+version = "1.15.185"
+source = "git+https://github.com/tonlabs/ever-executor.git?tag=1.15.185#a4de5692586262e61f052b03ce94201acb78c447"
+dependencies = [
+ "failure",
+ "lazy_static",
+ "log",
+ "ton_block 1.9.37",
+ "ton_types",
+ "ton_vm",
+]
+
+[[package]]
+name = "ton_sdk"
+version = "1.42.1"
+source = "git+https://github.com/tonlabs/ever-sdk.git?tag=1.42.1#4dbaac8c5c329b87f81fa463ce9e1efbcd6a5353"
+dependencies = [
+ "api_derive",
+ "api_info",
+ "base64 0.10.1",
+ "chrono",
+ "ed25519-dalek",
+ "failure",
+ "hex 0.3.2",
+ "lazy_static",
+ "log",
+ "num-bigint",
+ "num-traits",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "sha2 0.9.9",
+ "ton_abi",
+ "ton_block 1.9.37",
+ "ton_types",
+]
+
+[[package]]
+name = "ton_tl_codegen"
+version = "0.0.2"
+source = "git+https://github.com/tonlabs/ever-tl.git?tag=0.2.185#562c422f3136fe78d99518b4df62f1855eb83958"
+dependencies = [
+ "crc 1.8.1",
+ "failure",
+ "pom",
+ "proc-macro2",
+ "quote",
+ "serde",
+ "serde_derive",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "ton_types"
+version = "1.12.7"
+source = "git+https://github.com/tonlabs/ever-types.git?tag=1.12.7#d54c71302d899959fb944a73999d225917a0f769"
+dependencies = [
+ "base64 0.13.1",
+ "crc 1.8.1",
+ "failure",
+ "hex 0.4.3",
+ "lazy_static",
+ "lockfree",
+ "log",
+ "num",
+ "num-derive",
+ "num-traits",
+ "rand 0.8.5",
+ "sha2 0.9.9",
+ "smallvec",
+]
+
+[[package]]
+name = "ton_vm"
+version = "1.8.125"
+source = "git+https://github.com/tonlabs/ever-vm.git?tag=1.8.125#f9383849449f56d2ed0013f2044e1180c5994870"
+dependencies = [
+ "diffy",
+ "ed25519",
+ "ed25519-dalek",
+ "failure",
+ "hex 0.4.3",
+ "lazy_static",
+ "log",
+ "num",
+ "num-traits",
+ "rand 0.7.3",
+ "sha2 0.10.6",
+ "similar",
+ "ton_block 1.9.37",
+ "ton_types",
+ "zstd",
+]
+
+[[package]]
+name = "typenum"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
+dependencies = [
+ "tinyvec",
+]
+
+[[package]]
+name = "unicode-width"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
+
+[[package]]
+name = "url"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+]
+
+[[package]]
+name = "uuid"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
+dependencies = [
+ "getrandom 0.2.9",
+]
+
+[[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.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.85"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b6cb788c4e39112fbe1822277ef6fb3c55cd86b95cb3d3c4c1c9597e4ac74b4"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.85"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35e522ed4105a9d626d885b35d62501b30d9666283a5c8be12c14a8bdafe7822"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.16",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "083abe15c5d88556b77bdf7aef403625be9e327ad37c62c4e4129af740168163"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.85"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "358a79a0cb89d21db8120cbfb91392335913e4890665b1a7981d9e956903b434"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.85"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4783ce29f09b9d93134d41297aded3a712b7b979e9c6f28c32cb88c973a94869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.16",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.85"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a901d592cafaa4d711bc324edfaff879ac700b19c3dfd60058d2b445be2691eb"
+
+[[package]]
+name = "wasm-bindgen-test"
+version = "0.3.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b27e15b4a3030b9944370ba1d8cec6f21f66a1ad4fd14725c5685600460713ec"
+dependencies = [
+ "console_error_panic_hook",
+ "js-sys",
+ "scoped-tls",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-bindgen-test-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-test-macro"
+version = "0.3.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1dbaa9b9a574eac00c4f3a9c4941ac051f07632ecd0484a8588abd95af6b99d2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "wasm-encoder"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d05d0b6fcd0aeb98adf16e7975331b3c17222aa815148f5b976370ce589d80ef"
+dependencies = [
+ "leb128",
+]
+
+[[package]]
+name = "wasmparser"
+version = "0.104.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a396af81a7c56ad976131d6a35e4b693b78a1ea0357843bd436b4577e254a7d"
+dependencies = [
+ "indexmap",
+ "url",
+]
+
+[[package]]
+name = "wasmprinter"
+version = "0.2.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "731da2505d5437cd5d6feb09457835f76186be13be7677fe00781ae99d5bbe8a"
+dependencies = [
+ "anyhow",
+ "wasmparser",
+]
+
+[[package]]
+name = "wast"
+version = "57.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6eb0f5ed17ac4421193c7477da05892c2edafd67f9639e3c11a82086416662dc"
+dependencies = [
+ "leb128",
+ "memchr",
+ "unicode-width",
+ "wasm-encoder",
+]
+
+[[package]]
+name = "wat"
+version = "1.0.63"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab9ab0d87337c3be2bb6fc5cd331c4ba9fd6bcb4ee85048a0dd59ed9ecf92e53"
+dependencies = [
+ "wast",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.62"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16b5f940c7edfdc6d12126d98c9ef4d1b3d470011c47c76a6581df47ad9ba721"
+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 = "windows"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+
+[[package]]
+name = "zeroize"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.16",
+]
+
+[[package]]
+name = "zstd"
+version = "0.11.2+zstd.1.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"
+dependencies = [
+ "zstd-safe",
+]
+
+[[package]]
+name = "zstd-safe"
+version = "5.0.2+zstd.1.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"
+dependencies = [
+ "libc",
+ "zstd-sys",
+]
+
+[[package]]
+name = "zstd-sys"
+version = "2.0.8+zstd.1.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+]
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644
index 0000000..fe28cf2
--- /dev/null
+++ b/Cargo.toml
@@ -0,0 +1,8 @@
+[workspace]
+members = ["builder", "debot-browser"]
+
+[profile.release]
+opt-level = "s"
+lto = true
+codegen-units = 1
+strip = true
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5127845
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,31 @@
+debot-browser/pkg:
+ cargo run --package builder --profile release
+demo/node_modules:
+ cd demo && npm install
+release-pkg: debot-browser/pkg
+ cp CHANGELOG.md debot-browser/pkg
+ cd debot-browser/pkg && npm publish --access public
+gh-local:
+ git clone --depth=1 --branch=demo git@github.com:ever-guild/debot-browser.git gh-local
+release-demo: debot-browser/pkg demo/node_modules gh-local
+ cd demo && npm run build
+ git -C gh-local rm -rf .
+ cp -r demo/dist/. gh-local
+ git -C gh-local add .
+ git -C gh-local commit -m "update demo"
+ git -C gh-local push origin demo
+start: demo/node_modules
+ cd demo && npm run dev
+clean:
+ cargo clean
+ rm -rf debot-browser/pkg
+ rm -rf demo/node_modules
+ rm -rf gh-local
+test:
+ cargo test
+fmt:
+ cargo fmt
+fmt-check:
+ cargo fmt --all -- --check
+lint:
+ cargo clippy --all-targets
diff --git a/README.md b/README.md
index a7cf53e..169b441 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,6 @@
-
-
Cli Debot Browser
-
- A standalone console Debot Browser written in Rust and compiled as WebAssembly.
-
+ Debot browser
+ A standalone console Debot browser written in Rust and compiled as WebAssembly
## How to use
@@ -16,27 +13,24 @@ Read this [readme](./debot-browser/README.md)
For building WebAssembly:
-- Rust stable >= 1.55.
-- [wasm-pack] tool.
+- Rust stable >= 1.69.0
+- [wasm-pack] tool
- Clang-8 (to successfully build zstd-sys)
[wasm-pack]: https://rustwasm.github.io/wasm-pack/installer/
For running test example:
-- npm >= 7.22.0
+- node >= 18
### 🛠️ Compile wasm
-```bash
-cd builder
-cargo run
+```shell
+make debot-browser/pkg
```
-## How to try
+
+### How to try
```bash
-cd test-server
-npm install
-npm run start
+make start
```
-
diff --git a/builder/src/main.rs b/builder/src/main.rs
index 188d2af..83ff208 100644
--- a/builder/src/main.rs
+++ b/builder/src/main.rs
@@ -44,21 +44,17 @@ fn fix_wat(mut wrapper: String) -> String {
}
fn main() {
- let repo_dir = std::env::current_dir()
- .unwrap()
- .parent()
- .unwrap()
- .to_path_buf();
- let crate_dir = repo_dir.join(CRATE_NAME);
- std::env::set_current_dir(&crate_dir).unwrap();
-
- assert!(exec("wasm-pack", &["build", "--release"]).success());
+ assert!(exec(
+ "wasm-pack",
+ &["build", CRATE_NAME, "--release", "--scope", "ever-guild",]
+ )
+ .success());
+ let repo_dir = std::env::current_dir().unwrap();
+ let crate_dir = repo_dir.join(CRATE_NAME);
let pkg_dir = crate_dir.join("pkg");
- let wasm_path = pkg_dir
- .clone()
- .join(&format!("{}_bg.wasm", CRATE_NAME).replace('-', "_"));
+ let wasm_path = pkg_dir.join(format!("{}_bg.wasm", CRATE_NAME).replace('-', "_"));
println!("Disassembling wasm...");
let wat = wasmprinter::print_file(&wasm_path).unwrap();
@@ -69,7 +65,6 @@ fn main() {
let fixed_wasm = wat::parse_str(fixed_wat).unwrap();
println!("Done.");
fs::write(&wasm_path, fixed_wasm).unwrap();
-
}
pub fn exec(cmd: &str, args: &[&str]) -> ExitStatus {
diff --git a/debot-browser/Cargo.toml b/debot-browser/Cargo.toml
index 8c18a88..af8985c 100644
--- a/debot-browser/Cargo.toml
+++ b/debot-browser/Cargo.toml
@@ -1,26 +1,24 @@
[package]
-authors = ["TON Labs "]
+authors = ["Ever Guild"]
edition = "2018"
name = "debot-browser"
-version = "0.5.5"
-description = "Standalone cli DeBot Browser"
-repository = "https://github.com/tonlabs/rust-debot-browser"
+version = "0.6.0-rc.2"
+description = "Standalone debot browser"
+repository = "https://github.com/ever-guild/debot-browser"
license = "Apache-2.0"
keywords = [
"debot browser",
"debot",
"browser",
"wasm",
- "tonlabs",
- "Surf",
- "Everscale",
+ "tvm",
]
[lib]
crate-type = ["cdylib", "rlib"]
[features]
-default = [] # "console_error_panic_hook",
+default = [] # "console_error_panic_hook",
[dependencies.web-sys]
version = "0.3"
@@ -34,41 +32,31 @@ base64 = '0.10.1'
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.6", optional = true }
-hex = "0.3.2"
-js-sys = "0.3.55"
-lazy_static = "1.1.0"
-log = { version = "0.4.11", features = ["std"] }
-num-bigint = "0.4"
-num-traits = "0.2"
-serde = { version = "1.0", features = ["derive"] }
-serde_derive = "1.0"
-serde_json = "1.0"
-rand = "0.7.3"
-regex = "1.5.4"
-serde-wasm-bindgen = "0.3.1"
-tokio = { version = "0.2.13", features = [
- "sync",
- "stream",
-], default-features = false }
-
-ton_client = { git = 'https://github.com/tonlabs/TON-SDK.git', tag = '1.32.0', default-features = false, features = [
+hex = "0.4.3"
+js-sys = "0.3.62"
+lazy_static = "1.4.0"
+log = { version = "0.4.17", features = ["std"] }
+num-bigint = "0.4.3"
+num-traits = "0.2.15"
+serde = { version = "1.0.163", features = ["derive"] }
+serde_derive = "1.0.163"
+serde_json = "1.0.96"
+rand = "0.8.5"
+regex = "1.8.1"
+serde-wasm-bindgen = "0.5.0"
+tokio = "^1"
+wasm-bindgen = "0.2.85"
+wasm-bindgen-futures = "0.4.35"
+ton_client = { git = 'https://github.com/tonlabs/ever-sdk.git', tag = '1.42.1', default-features = false, features = [
"wasm",
] }
-wasm-bindgen = "0.2.77"
-wasm-bindgen-futures = "0.4.27"
-
[dev-dependencies]
-wasm-bindgen-test = "0.3.26"
+wasm-bindgen-test = "0.3.35"
[package.metadata.wasm-pack.profile.release]
-wasm-opt = ['-Os']
-
-[profile.release]
-#lto = true
-# Tell `rustc` to optimize for small code size.
-opt-level = "s"
+wasm-opt = ["-Oz", "--enable-mutable-globals"]
[dependencies.clear_on_drop]
features = ["no_cc"]
-version = "0.2" #This version should match the version that the ed25519-dalek crate depends on.
\ No newline at end of file
+version = "0.2" # This version should match the version that the ed25519-dalek crate depends on.
diff --git a/debot-browser/README.md b/debot-browser/README.md
index 6a699ad..e328eca 100644
--- a/debot-browser/README.md
+++ b/debot-browser/README.md
@@ -1,32 +1,32 @@
+
+
+
+
+
- Standalone cli DeBot Browser
+ Debot browser
- Standalone DeBot Browser written in Rust and compiled as WebAssembly
-
-
-
+ Standalone Debot browser written in Rust and compiled as WebAssembly
-# Cli DeBot Browser
-
## Purpose
-Run any DeBot in your website using DeBot Browser as Service.
+Run any Debot in your website using Debot browser as service.
## Getting Started
-To get started, install `debot-browser`:
+To get started, install:
-```sh
-npm i debot-browser
+```shell
+npm install @ever-guild/debot-browser
```
-Run DeBot:
+Run Debot:
```typescript
-import * as browser from "debot-browser";
+import * as browser from "@ever-guild/debot-browser";
let defaultWallet = null; // or string with TON address
let defaultPubkey = null; // or string with public key
@@ -156,6 +156,5 @@ let manifest = `{
await browser.close_signing_box(browserHandle, sboxHandle)
await browser.destroy_browser(browserHandle);
-
});
-```
\ No newline at end of file
+```
diff --git a/debot-browser/src/api.rs b/debot-browser/src/api.rs
index 69121f2..76505c0 100644
--- a/debot-browser/src/api.rs
+++ b/debot-browser/src/api.rs
@@ -22,10 +22,12 @@ use lazy_static::lazy_static;
use log::{info, LevelFilter, SetLoggerError};
use serde::Serialize;
use serde_wasm_bindgen::{from_value, to_value, Serializer};
-use std::sync::Arc;
use std::collections::HashMap;
+use std::sync::Arc;
use tokio::sync::{Mutex, RwLock};
-use ton_client::crypto::{KeyPair, ParamsOfSign, RegisteredSigningBox, ParamsOfGenerateRandomBytes};
+use ton_client::crypto::{
+ KeyPair, ParamsOfGenerateRandomBytes, ParamsOfSign, RegisteredSigningBox,
+};
use ton_client::{ClientConfig, ClientContext};
use wasm_bindgen::prelude::*;
@@ -34,17 +36,21 @@ lazy_static! {
}
struct BrowserTable {
- table: RwLock> > >,
+ table: RwLock>>>,
}
impl BrowserTable {
fn new() -> Self {
- Self { table: RwLock::new(HashMap::new()) }
+ Self {
+ table: RwLock::new(HashMap::new()),
+ }
}
async fn insert(&self, browser: TerminalBrowser) -> BrowserHandle {
let handle = Self::generate_handle();
- self.table.write().await
+ self.table
+ .write()
+ .await
.insert(handle.clone(), Arc::new(Mutex::new(browser)));
handle
}
@@ -63,7 +69,7 @@ impl BrowserTable {
}
pub(crate) fn init_log_() -> Result<(), SetLoggerError> {
- log::set_logger(&LOGGER).map(|()| log::set_max_level(LevelFilter::Info))
+ log::set_logger(&LOGGER).map(|()| log::set_max_level(LevelFilter::Trace))
}
#[wasm_bindgen]
@@ -71,6 +77,17 @@ pub fn init_log() -> Result<(), JsValue> {
init_log_().map_err(|e| to_value(&e.to_string()).unwrap())
}
+// Next let's define a macro that's like `println!`, only it works for
+// `console.log`. Note that `println!` doesn't actually work on the wasm target
+// because the standard library currently just eats all output. To get
+// `println!`-like behavior in your app you'll likely want a macro like this.
+
+macro_rules! console_log {
+ // Note that this is using the `log` function imported above during
+ // `bare_bones`
+ ($($t:tt)*) => (log(&format_args!($($t)*).to_string()))
+}
+
/// Starts Terminal DeBot Browser with main DeBot.
///
/// Fetches DeBot by address from blockchain and runs it according to pipechain.
@@ -154,7 +171,8 @@ pub async fn create_browser(
#[wasm_bindgen]
pub async fn destroy_browser(handle: BrowserHandle) -> Result<(), JsValue> {
BROWSER_TABLE
- .remove(&handle).await
+ .remove(&handle)
+ .await
.ok_or(format!("invalid handle"))?;
Ok(())
}
@@ -167,7 +185,8 @@ pub async fn destroy_browser(handle: BrowserHandle) -> Result<(), JsValue> {
pub async fn run_browser(handle: BrowserHandle, manifest: JsValue) -> Result {
let manifest: DebotManifest = from_value(manifest).unwrap();
let browser = BROWSER_TABLE
- .get(&handle).await
+ .get(&handle)
+ .await
.ok_or(format!("invalid handle"))?;
let result = browser.lock().await.run_manifest(manifest).await?;
let serializer = Serializer::new().serialize_maps_as_objects(true);
@@ -182,7 +201,8 @@ pub async fn run_browser(handle: BrowserHandle, manifest: JsValue) -> Result Result<(), JsValue> {
let browser = BROWSER_TABLE
- .get(&handle).await
+ .get(&handle)
+ .await
.ok_or(format!("invalid handle"))?;
let settings: UserSettings =
from_value(settings).map_err(|e| JsValue::from_str(&e.to_string()))?;
@@ -226,7 +246,8 @@ pub async fn register_signing_box(
dapp_box: DAppSigningBox,
) -> Result {
let browser = BROWSER_TABLE
- .get(&handle).await
+ .get(&handle)
+ .await
.ok_or(format!("invalid handle"))?;
let client = browser.lock().await.client.clone();
@@ -243,7 +264,8 @@ pub async fn close_signing_box(
sbox_handle: SigningBoxHandle,
) -> Result<(), JsValue> {
let browser = BROWSER_TABLE
- .get(&handle).await
+ .get(&handle)
+ .await
.ok_or(format!("invalid handle"))?;
let client = browser.lock().await.client.clone();
@@ -264,7 +286,8 @@ pub async fn signing_box_public_key(
sbox_handle: SigningBoxHandle,
) -> Result {
let browser = BROWSER_TABLE
- .get(&handle).await
+ .get(&handle)
+ .await
.ok_or(format!("invalid handle"))?;
let client = browser.lock().await.client.clone();
@@ -309,14 +332,10 @@ pub fn scrypt(params: JsValue) -> Result {
.map(|v| v.key)
}
-
#[wasm_bindgen]
pub fn generate_random_bytes(length: u32) -> Result {
let ctx = Arc::new(ClientContext::new(ClientConfig::default()).unwrap());
- ton_client::crypto::generate_random_bytes(
- ctx,
- ParamsOfGenerateRandomBytes{ length }
- )
- .map_err(|e| JsValue::from_str(&format!("{}", e)))
- .map(|v| v.bytes)
-}
\ No newline at end of file
+ ton_client::crypto::generate_random_bytes(ctx, ParamsOfGenerateRandomBytes { length })
+ .map_err(|e| JsValue::from_str(&format!("{}", e)))
+ .map(|v| v.bytes)
+}
diff --git a/debot-browser/src/callbacks.rs b/debot-browser/src/callbacks.rs
index f3b667c..0a01d68 100644
--- a/debot-browser/src/callbacks.rs
+++ b/debot-browser/src/callbacks.rs
@@ -35,10 +35,7 @@ pub(super) struct Callbacks {
}
impl Callbacks {
- pub fn new(
- client: TonClient,
- processor: Arc>,
- ) -> Self {
+ pub fn new(client: TonClient, processor: Arc>) -> Self {
Self {
client,
processor,
@@ -179,8 +176,7 @@ impl BrowserCallbacks for Callbacks {
}
info += &format!(" Message signer public key: {}\n", signkey);
if setcode {
- info +=
- " Warning: the transaction will change the account's code\n";
+ info += " Warning: the transaction will change the account's code\n";
}
prompt = "Confirm the transaction (y/n)?";
}
diff --git a/debot-browser/src/config.rs b/debot-browser/src/config.rs
index aaf14a4..c1c0435 100644
--- a/debot-browser/src/config.rs
+++ b/debot-browser/src/config.rs
@@ -11,12 +11,12 @@
* limitations under the License.
*/
use crate::SigningBoxHandle;
+use lazy_static::lazy_static;
+use regex::Regex;
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
use std::sync::Arc;
use tokio::sync::RwLock;
-use lazy_static::lazy_static;
-use regex::Regex;
fn default_wc() -> i32 {
0
@@ -38,14 +38,16 @@ fn default_false() -> bool {
false
}
-fn default_true() -> bool { true }
+fn default_true() -> bool {
+ true
+}
fn default_lifetime() -> u32 {
60
}
fn default_endpoints() -> Vec {
- return vec!();
+ return vec![];
}
#[derive(Serialize, Deserialize, Clone)]
@@ -128,31 +130,30 @@ impl Config {
#[cfg(not(target_arch = "wasm32"))]
pub fn from_file(path: &str) -> Option {
let conf_str = std::fs::read_to_string(path).ok()?;
- let conf: serde_json::error::Result = serde_json::from_str(&conf_str);
- conf.map(|c| c.config).or_else(|_| serde_json::from_str(&conf_str)).ok()
+ let conf: serde_json::error::Result = serde_json::from_str(&conf_str);
+ conf.map(|c| c.config)
+ .or_else(|_| serde_json::from_str(&conf_str))
+ .ok()
}
#[cfg(not(target_arch = "wasm32"))]
pub fn to_file(path: &str, conf: &Config) -> Result<(), String> {
- let mut fconf= FullConfig::from_file(path);
+ let mut fconf = FullConfig::from_file(path);
fconf.config = conf.to_owned();
FullConfig::to_file(path, &fconf)
}
}
-
lazy_static! {
static ref MAIN_ENDPOINTS: Vec = vec![
"https://main2.ton.dev".to_string(),
"https://main3.ton.dev".to_string(),
"https://main4.ton.dev".to_string(),
];
-
static ref NET_ENDPOINTS: Vec = vec![
"https://net1.ton.dev".to_string(),
"https://net5.ton.dev".to_string(),
];
-
static ref SE_ENDPOINTS: Vec = vec![
"http://0.0.0.0/".to_string(),
"http://127.0.0.1/".to_string(),
@@ -171,9 +172,7 @@ pub fn resolve_net_name(url: &str) -> Option {
}
}
}
- if url.contains("127.0.0.1") ||
- url.contains("0.0.0.0") ||
- url.contains("localhost") {
+ if url.contains("127.0.0.1") || url.contains("0.0.0.0") || url.contains("localhost") {
return Some("http://127.0.0.1/".to_string());
}
None
@@ -184,7 +183,7 @@ pub(crate) fn resolve_endpoints(url: &str) -> Vec {
Some(network) => FullConfig::default_map()[&network].clone(),
None => vec![url.to_string()],
}
-}
+}
impl FullConfig {
pub fn new() -> Self {
@@ -194,10 +193,14 @@ impl FullConfig {
}
}
pub fn default_map() -> BTreeMap> {
- [("main.ton.dev".to_owned(), MAIN_ENDPOINTS.to_owned()),
+ [
+ ("main.ton.dev".to_owned(), MAIN_ENDPOINTS.to_owned()),
("net.ton.dev".to_owned(), NET_ENDPOINTS.to_owned()),
("http://127.0.0.1/".to_owned(), SE_ENDPOINTS.to_owned()),
- ].iter().cloned().collect()
+ ]
+ .iter()
+ .cloned()
+ .collect()
}
#[allow(dead_code)]
@@ -206,19 +209,22 @@ impl FullConfig {
}
pub fn from_file(path: &str) -> FullConfig {
let conf_str = std::fs::read_to_string(path).ok().unwrap_or_default();
- serde_json::from_str(&conf_str).ok().unwrap_or(FullConfig::new())
+ serde_json::from_str(&conf_str)
+ .ok()
+ .unwrap_or(FullConfig::new())
}
- pub fn to_file(path: &str, fconf: &FullConfig) -> Result<(), String>{
+ pub fn to_file(path: &str, fconf: &FullConfig) -> Result<(), String> {
let conf_str = serde_json::to_string_pretty(fconf)
.map_err(|_| "failed to serialize config object".to_string())?;
- std::fs::write(path, conf_str).map_err(|e| format!("failed to write config file: {}", e))?;
+ std::fs::write(path, conf_str)
+ .map_err(|e| format!("failed to write config file: {}", e))?;
Ok(())
}
}
#[cfg(test)]
mod tests {
- use super::{resolve_net_name};
+ use super::resolve_net_name;
#[test]
fn test_endpoints_resolver() {
@@ -227,28 +233,73 @@ mod tests {
assert_eq!(resolve_net_name("https://rustnet.ton.dev"), None);
assert_eq!(resolve_net_name("rustnet.ton.com"), None);
assert_eq!(resolve_net_name("https://example.com"), None);
- assert_eq!(resolve_net_name("http://localhost"), Some("http://127.0.0.1/".to_owned()));
- assert_eq!(resolve_net_name("https://localhost"), Some("http://127.0.0.1/".to_owned()));
- assert_eq!(resolve_net_name("localhost"), Some("http://127.0.0.1/".to_owned()));
- assert_eq!(resolve_net_name("http://127.0.0.1"), Some("http://127.0.0.1/".to_owned()));
- assert_eq!(resolve_net_name("https://127.0.0.1"), Some("http://127.0.0.1/".to_owned()));
+ assert_eq!(
+ resolve_net_name("http://localhost"),
+ Some("http://127.0.0.1/".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name("https://localhost"),
+ Some("http://127.0.0.1/".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name("localhost"),
+ Some("http://127.0.0.1/".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name("http://127.0.0.1"),
+ Some("http://127.0.0.1/".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name("https://127.0.0.1"),
+ Some("http://127.0.0.1/".to_owned())
+ );
assert_eq!(resolve_net_name("https://127.0.0.2"), None);
assert_eq!(resolve_net_name("https://127.1.0.1"), None);
assert_eq!(resolve_net_name("https://0.0.0.1"), None);
assert_eq!(resolve_net_name("https://1.0.0.0"), None);
- assert_eq!(resolve_net_name("https://main.ton.dev"), Some("main.ton.dev".to_owned()));
- assert_eq!(resolve_net_name("http://main.ton.dev"), Some("main.ton.dev".to_owned()));
- assert_eq!(resolve_net_name(" http://main.ton.dev "), Some("main.ton.dev".to_owned()));
- assert_eq!(resolve_net_name(" https://main.ton.dev "), Some("main.ton.dev".to_owned()));
- assert_eq!(resolve_net_name("main.ton.dev"), Some("main.ton.dev".to_owned()));
+ assert_eq!(
+ resolve_net_name("https://main.ton.dev"),
+ Some("main.ton.dev".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name("http://main.ton.dev"),
+ Some("main.ton.dev".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name(" http://main.ton.dev "),
+ Some("main.ton.dev".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name(" https://main.ton.dev "),
+ Some("main.ton.dev".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name("main.ton.dev"),
+ Some("main.ton.dev".to_owned())
+ );
assert_eq!(resolve_net_name("main.ton.com"), None);
- assert_eq!(resolve_net_name("https://net.ton.dev"), Some("net.ton.dev".to_owned()));
- assert_eq!(resolve_net_name("http://net.ton.dev"), Some("net.ton.dev".to_owned()));
- assert_eq!(resolve_net_name(" http://net.ton.dev "), Some("net.ton.dev".to_owned()));
- assert_eq!(resolve_net_name(" https://net.ton.dev "), Some("net.ton.dev".to_owned()));
- assert_eq!(resolve_net_name("net.ton.dev"), Some("net.ton.dev".to_owned()));
+ assert_eq!(
+ resolve_net_name("https://net.ton.dev"),
+ Some("net.ton.dev".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name("http://net.ton.dev"),
+ Some("net.ton.dev".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name(" http://net.ton.dev "),
+ Some("net.ton.dev".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name(" https://net.ton.dev "),
+ Some("net.ton.dev".to_owned())
+ );
+ assert_eq!(
+ resolve_net_name("net.ton.dev"),
+ Some("net.ton.dev".to_owned())
+ );
assert_eq!(resolve_net_name("net.ton.com"), None);
}
}
diff --git a/debot-browser/src/crypto.rs b/debot-browser/src/crypto.rs
index 24ceb1e..95872f0 100644
--- a/debot-browser/src/crypto.rs
+++ b/debot-browser/src/crypto.rs
@@ -10,21 +10,14 @@
* See the License for the specific TON DEV software governing permissions and
* limitations under the License.
*/
-use crate::helpers::{create_client_local, WORD_COUNT, HD_PATH};
#[cfg(not(target_arch = "wasm32"))]
use crate::helpers::read_keys;
+use crate::helpers::{create_client_local, HD_PATH, WORD_COUNT};
use ton_client::crypto::{
- KeyPair,
- mnemonic_from_random,
- hdkey_xprv_from_mnemonic,
- hdkey_secret_from_xprv,
- nacl_sign_keypair_from_secret_key,
- hdkey_derive_from_xprv_path,
- ParamsOfHDKeySecretFromXPrv,
- ParamsOfHDKeyDeriveFromXPrvPath,
- ParamsOfHDKeyXPrvFromMnemonic,
- ParamsOfNaclSignKeyPairFromSecret,
- ParamsOfMnemonicFromRandom
+ hdkey_derive_from_xprv_path, hdkey_secret_from_xprv, hdkey_xprv_from_mnemonic,
+ mnemonic_from_random, nacl_sign_keypair_from_secret_key, KeyPair, MnemonicDictionary,
+ ParamsOfHDKeyDeriveFromXPrvPath, ParamsOfHDKeySecretFromXPrv, ParamsOfHDKeyXPrvFromMnemonic,
+ ParamsOfMnemonicFromRandom, ParamsOfNaclSignKeyPairFromSecret,
};
#[cfg(not(target_arch = "wasm32"))]
@@ -48,7 +41,7 @@ pub fn gen_seed_phrase() -> Result {
mnemonic_from_random(
client,
ParamsOfMnemonicFromRandom {
- dictionary: Some(1),
+ dictionary: Some(MnemonicDictionary::English),
word_count: Some(WORD_COUNT),
..Default::default()
},
@@ -62,12 +55,13 @@ pub fn generate_keypair_from_mnemonic(mnemonic: &str) -> Result
let hdk_master = hdkey_xprv_from_mnemonic(
client.clone(),
ParamsOfHDKeyXPrvFromMnemonic {
- dictionary: Some(1),
+ dictionary: Some(MnemonicDictionary::English),
word_count: Some(WORD_COUNT),
phrase: mnemonic.to_string(),
..Default::default()
},
- ).map_err(|e| format!("{}", e))?;
+ )
+ .map_err(|e| format!("{}", e))?;
let hdk_root = hdkey_derive_from_xprv_path(
client.clone(),
@@ -76,7 +70,8 @@ pub fn generate_keypair_from_mnemonic(mnemonic: &str) -> Result
path: HD_PATH.to_string(),
..Default::default()
},
- ).map_err(|e| format!("{}", e))?;
+ )
+ .map_err(|e| format!("{}", e))?;
let secret = hdkey_secret_from_xprv(
client.clone(),
@@ -84,7 +79,8 @@ pub fn generate_keypair_from_mnemonic(mnemonic: &str) -> Result
xprv: hdk_root.xprv,
..Default::default()
},
- ).map_err(|e| format!("{}", e))?;
+ )
+ .map_err(|e| format!("{}", e))?;
let mut keypair: KeyPair = nacl_sign_keypair_from_secret_key(
client.clone(),
@@ -92,11 +88,12 @@ pub fn generate_keypair_from_mnemonic(mnemonic: &str) -> Result
secret: secret.secret,
..Default::default()
},
- ).map_err(|e| format!("failed to get KeyPair from secret key: {}", e))?;
+ )
+ .map_err(|e| format!("failed to get KeyPair from secret key: {}", e))?;
// special case if secret contains public key too.
- let secret = hex::decode(&keypair.secret)
- .map_err(|e| format!("failed to decode the keypair: {}", e))?;
+ let secret =
+ hex::decode(&keypair.secret).map_err(|e| format!("failed to decode the keypair: {}", e))?;
if secret.len() > 32 {
keypair.secret = hex::encode(&secret[..32]);
}
@@ -109,15 +106,29 @@ mod tests {
#[test]
fn test_generate_keypair() {
- let mnemonic = "multiply extra monitor fog rocket defy attack right night jaguar hollow enlist";
+ let mnemonic =
+ "multiply extra monitor fog rocket defy attack right night jaguar hollow enlist";
let keypair = generate_keypair_from_mnemonic(mnemonic).unwrap();
- assert_eq!(&keypair.public, "757221fe3d4992e44632e75e700aaf205d799cb7373ee929273daf26adf29e56");
- assert_eq!(&keypair.secret, "30e3bc5e67af2b0a72971bcc11256e83d052c6cb861a69a19a8af88922fadf3a");
+ assert_eq!(
+ &keypair.public,
+ "757221fe3d4992e44632e75e700aaf205d799cb7373ee929273daf26adf29e56"
+ );
+ assert_eq!(
+ &keypair.secret,
+ "30e3bc5e67af2b0a72971bcc11256e83d052c6cb861a69a19a8af88922fadf3a"
+ );
- let mnemonic = "penalty nut enrich input palace flame safe session torch depth various hunt";
+ let mnemonic =
+ "penalty nut enrich input palace flame safe session torch depth various hunt";
let keypair = generate_keypair_from_mnemonic(mnemonic).unwrap();
- assert_eq!(&keypair.public, "8cf557aab2666867a1174e3147d89ddf28c2041a7322522276cd1cf1df47ae73");
- assert_eq!(&keypair.secret, "f63d3d11e0dc91f730f22d5397f269e01f1a5f984879c8581ac87f099bfd3b3a");
+ assert_eq!(
+ &keypair.public,
+ "8cf557aab2666867a1174e3147d89ddf28c2041a7322522276cd1cf1df47ae73"
+ );
+ assert_eq!(
+ &keypair.secret,
+ "f63d3d11e0dc91f730f22d5397f269e01f1a5f984879c8581ac87f099bfd3b3a"
+ );
}
#[test]
@@ -144,5 +155,4 @@ mod tests {
assert!(generate_keypair_from_mnemonic(phrase).is_err());
}
}
-
}
diff --git a/debot-browser/src/helpers.rs b/debot-browser/src/helpers.rs
index a0b4893..4ebd577 100644
--- a/debot-browser/src/helpers.rs
+++ b/debot-browser/src/helpers.rs
@@ -12,9 +12,8 @@
*/
use crate::config::Config;
use std::sync::Arc;
-use ton_client::abi::{
- Abi, AbiConfig, AbiContract};
-use ton_client::crypto::{CryptoConfig};
+use ton_client::abi::{Abi, AbiConfig, AbiContract};
+use ton_client::crypto::{CryptoConfig, MnemonicDictionary};
use ton_client::{ClientConfig, ClientContext};
pub const HD_PATH: &str = "m/44'/396'/0'/0/0";
@@ -53,7 +52,7 @@ pub fn create_client(conf: &Config) -> Result {
message_expiration_timeout_grow_factor: 1.3,
},
crypto: CryptoConfig {
- mnemonic_dictionary: 1,
+ mnemonic_dictionary: MnemonicDictionary::English,
mnemonic_word_count: WORD_COUNT,
hdkey_derivation_path: HD_PATH.to_string(),
},
diff --git a/debot-browser/src/interfaces/address_input.rs b/debot-browser/src/interfaces/address_input.rs
index ec077c1..e888314 100644
--- a/debot-browser/src/interfaces/address_input.rs
+++ b/debot-browser/src/interfaces/address_input.rs
@@ -1,7 +1,7 @@
use super::dinterface::{decode_answer_id, decode_prompt};
use crate::helpers::load_ton_address;
use crate::term_browser::terminal_input;
-use serde_json::{Value, json};
+use serde_json::{json, Value};
use ton_client::abi::Abi;
use ton_client::debot::{DebotInterface, InterfaceResult};
diff --git a/debot-browser/src/interfaces/amount_input.rs b/debot-browser/src/interfaces/amount_input.rs
index 9be8b12..de92fee 100644
--- a/debot-browser/src/interfaces/amount_input.rs
+++ b/debot-browser/src/interfaces/amount_input.rs
@@ -1,7 +1,7 @@
use super::dinterface::{decode_answer_id, decode_num_arg, decode_prompt};
use crate::convert;
use crate::term_browser::terminal_input;
-use serde_json::{Value, json};
+use serde_json::{json, Value};
use ton_client::abi::Abi;
use ton_client::debot::{DebotInterface, InterfaceResult};
use ton_client::encoding::decode_abi_number;
diff --git a/debot-browser/src/interfaces/confirm_input.rs b/debot-browser/src/interfaces/confirm_input.rs
index b0ad866..59ce0c8 100644
--- a/debot-browser/src/interfaces/confirm_input.rs
+++ b/debot-browser/src/interfaces/confirm_input.rs
@@ -1,6 +1,6 @@
use super::dinterface::{decode_answer_id, decode_prompt};
use crate::term_browser::terminal_input;
-use serde_json::{Value, json};
+use serde_json::{json, Value};
use ton_client::abi::Abi;
use ton_client::debot::{DebotInterface, InterfaceResult};
diff --git a/debot-browser/src/interfaces/dinterface.rs b/debot-browser/src/interfaces/dinterface.rs
index bac186b..4ab26dd 100644
--- a/debot-browser/src/interfaces/dinterface.rs
+++ b/debot-browser/src/interfaces/dinterface.rs
@@ -1,15 +1,15 @@
use super::echo::Echo;
use super::stdout::Stdout;
use super::{
- AddressInput, AmountInput, ConfirmInput, EncryptionBoxInput, InputInterface, Menu,
- NumberInput, SigningBoxInput, Terminal, UserInfo
+ AddressInput, AmountInput, ConfirmInput, EncryptionBoxInput, InputInterface, Menu, NumberInput,
+ SigningBoxInput, Terminal, UserInfo,
};
use crate::config::SharedUserSettings;
use crate::helpers::TonClient;
use crate::ChainProcessor;
use num_bigint::BigInt;
use num_traits::cast::NumCast;
-use serde_json::{Value};
+use serde_json::Value;
use std::collections::HashMap;
use std::sync::Arc;
use tokio::sync::RwLock;
@@ -46,13 +46,18 @@ impl InterfaceWrapper {
}
impl SupportedInterfaces {
- pub fn new(client: TonClient, settings: SharedUserSettings, processor: Arc>) -> Self {
+ pub fn new(
+ client: TonClient,
+ settings: SharedUserSettings,
+ processor: Arc>,
+ ) -> Self {
let mut interfaces = HashMap::new();
- let iw = InterfaceWrapper { processor: processor.clone() };
+ let iw = InterfaceWrapper {
+ processor: processor.clone(),
+ };
- let iface: Arc =
- iw.wrap(Arc::new(AddressInput::new()));
+ let iface: Arc = iw.wrap(Arc::new(AddressInput::new()));
interfaces.insert(iface.get_id(), iface);
let iface: Arc = iw.wrap(Arc::new(AmountInput::new()));
@@ -71,18 +76,17 @@ impl SupportedInterfaces {
interfaces.insert(iface.get_id(), iface);
let iface: Arc =
- iw.wrap(Arc::new(Terminal::new(Printer {processor})));
+ iw.wrap(Arc::new(Terminal::new(Printer { processor })));
interfaces.insert(iface.get_id(), iface);
let iface: Arc = iw.wrap(Arc::new(Menu::new()));
interfaces.insert(iface.get_id(), iface);
- let iface: Arc = Arc::new(
- SigningBoxInput::new(client.clone(), iw.processor.clone())
- );
+ let iface: Arc =
+ Arc::new(SigningBoxInput::new(client.clone(), iw.processor.clone()));
interfaces.insert(iface.get_id(), iface);
- let iface: Arc =
+ let iface: Arc =
Arc::new(UserInfo::new(client.clone(), settings));
interfaces.insert(iface.get_id(), iface);
diff --git a/debot-browser/src/interfaces/echo.rs b/debot-browser/src/interfaces/echo.rs
index 966add0..81be5e0 100644
--- a/debot-browser/src/interfaces/echo.rs
+++ b/debot-browser/src/interfaces/echo.rs
@@ -10,7 +10,7 @@
* See the License for the specific TON DEV software governing permissions and
* limitations under the License.
*/
-use serde_json::{Value, json};
+use serde_json::{json, Value};
use ton_client::abi::Abi;
use ton_client::debot::{DebotInterface, InterfaceResult};
@@ -48,35 +48,35 @@ pub const ECHO_ABI: &str = r#"
pub struct Echo {}
impl Echo {
- pub fn new() -> Self {
- Self {}
- }
+ pub fn new() -> Self {
+ Self {}
+ }
- fn echo(&self, args: &Value) -> InterfaceResult {
- let answer_id = u32::from_str_radix(args["answerId"].as_str().unwrap(), 10).unwrap();
- let request_vec = hex::decode(args["request"].as_str().unwrap()).unwrap();
- let request = std::str::from_utf8(&request_vec).unwrap();
- Ok((
- answer_id,
- json!({ "response": hex::encode(request.as_bytes()) }),
- ))
- }
+ fn echo(&self, args: &Value) -> InterfaceResult {
+ let answer_id = u32::from_str_radix(args["answerId"].as_str().unwrap(), 10).unwrap();
+ let request_vec = hex::decode(args["request"].as_str().unwrap()).unwrap();
+ let request = std::str::from_utf8(&request_vec).unwrap();
+ Ok((
+ answer_id,
+ json!({ "response": hex::encode(request.as_bytes()) }),
+ ))
+ }
}
#[async_trait::async_trait]
impl DebotInterface for Echo {
- fn get_id(&self) -> String {
- ECHO_ID.to_string()
- }
+ fn get_id(&self) -> String {
+ ECHO_ID.to_string()
+ }
- fn get_abi(&self) -> Abi {
- Abi::Json(ECHO_ABI.to_owned())
- }
+ fn get_abi(&self) -> Abi {
+ Abi::Json(ECHO_ABI.to_owned())
+ }
- async fn call(&self, func: &str, args: &Value) -> InterfaceResult {
- match func {
- "echo" => self.echo(args),
- _ => Err(format!("function \"{}\" is not implemented", func)),
- }
- }
+ async fn call(&self, func: &str, args: &Value) -> InterfaceResult {
+ match func {
+ "echo" => self.echo(args),
+ _ => Err(format!("function \"{}\" is not implemented", func)),
+ }
+ }
}
diff --git a/debot-browser/src/interfaces/encryption_box_input.rs b/debot-browser/src/interfaces/encryption_box_input.rs
index 19e71db..d0b6238 100644
--- a/debot-browser/src/interfaces/encryption_box_input.rs
+++ b/debot-browser/src/interfaces/encryption_box_input.rs
@@ -1,12 +1,14 @@
-use super::dinterface::{decode_answer_id, decode_nonce, decode_prompt, decode_arg, decode_num_arg};
+use super::dinterface::{
+ decode_answer_id, decode_arg, decode_nonce, decode_num_arg, decode_prompt,
+};
+use crate::helpers::TonClient;
use crate::term_encryption_box::{
EncryptionBoxType, ParamsOfTerminalEncryptionBox, TerminalEncryptionBox,
};
-use crate::helpers::TonClient;
use serde_json::{json, Value};
use tokio::sync::RwLock;
-use ton_client::{abi::Abi, crypto::EncryptionBoxHandle};
use ton_client::debot::{DebotInterface, InterfaceResult};
+use ton_client::{abi::Abi, crypto::EncryptionBoxHandle};
const ID: &'static str = "5b5f76b54d976d72f1ada3063d1af2e5352edaf1ba86b3b311170d4d81056d61";
@@ -119,8 +121,12 @@ impl EncryptionBoxInput {
box_type: EncryptionBoxType::NaCl,
their_pubkey: their_pubkey,
nonce: nonce,
- }).await;
- Ok((answer_id, json!({ "handle": self.insert_box(result).await.0 })))
+ })
+ .await;
+ Ok((
+ answer_id,
+ json!({ "handle": self.insert_box(result).await.0 }),
+ ))
}
async fn get_nacl_secret_box(&self, args: &Value) -> InterfaceResult {
let answer_id = decode_answer_id(args)?;
@@ -134,7 +140,10 @@ impl EncryptionBoxInput {
nonce: nonce,
})
.await;
- Ok((answer_id, json!({ "handle": self.insert_box(result).await.0})))
+ Ok((
+ answer_id,
+ json!({ "handle": self.insert_box(result).await.0}),
+ ))
}
async fn get_chacha20_box(&self, args: &Value) -> InterfaceResult {
let answer_id = decode_answer_id(args)?;
@@ -148,7 +157,10 @@ impl EncryptionBoxInput {
nonce,
})
.await;
- Ok((answer_id, json!({ "handle": self.insert_box(result).await.0})))
+ Ok((
+ answer_id,
+ json!({ "handle": self.insert_box(result).await.0}),
+ ))
}
async fn remove_handle(&self, args: &Value) -> InterfaceResult {
let answer_id = decode_answer_id(args)?;
@@ -173,13 +185,16 @@ impl EncryptionBoxInput {
}),
))
}
- async fn insert_box(&self, result_box: Result) -> EncryptionBoxHandle {
+ async fn insert_box(
+ &self,
+ result_box: Result,
+ ) -> EncryptionBoxHandle {
match result_box {
Ok(enc_box) => {
let handle = enc_box.handle();
self.handles.write().await.push(enc_box);
handle
- },
+ }
Err(_) => 0.into(),
}
}
@@ -206,4 +221,3 @@ impl DebotInterface for EncryptionBoxInput {
}
}
}
-
diff --git a/debot-browser/src/interfaces/input_interface.rs b/debot-browser/src/interfaces/input_interface.rs
index d35469c..29018be 100644
--- a/debot-browser/src/interfaces/input_interface.rs
+++ b/debot-browser/src/interfaces/input_interface.rs
@@ -14,7 +14,7 @@ use super::dinterface::{decode_answer_id, decode_prompt, decode_string_arg};
use super::menu::{MenuItem, ID as MENU_ID};
use super::terminal::ID as TERMINAL_ID;
use crate::{ChainProcessor, ProcessorError};
-use serde_json::{Value, json};
+use serde_json::{json, Value};
use std::sync::Arc;
use tokio::sync::RwLock;
use ton_client::abi::Abi;
@@ -53,12 +53,16 @@ impl DebotInterface for InputInterface {
return self.inner_interface.call(func, args).await;
}
}
- let result = self.processor.write().await.next_input(&self.get_id(), func, args);
+ let result = self
+ .processor
+ .write()
+ .await
+ .next_input(&self.get_id(), func, args);
match result {
Err(ProcessorError::InterfaceCallNeeded) => {
let res = self.inner_interface.call(func, args).await?;
Ok(res)
- },
+ }
Err(e) => Err(format!("{:?}", e))?,
Ok(params) => {
let prompt = decode_prompt(args);
@@ -77,12 +81,14 @@ impl DebotInterface for InputInterface {
}
}
let answer_id = if self.get_id() == MENU_ID {
- let n = params["index"].as_u64()
+ let n = params["index"]
+ .as_u64()
.ok_or(format!("invalid arguments for menu callback"))?;
- let menu_items: Vec