From 075ef240cdf58681fea6fc0edf059bf4204f99a2 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 5 Aug 2025 11:35:37 -0700 Subject: [PATCH 1/4] hyperwallet: change types to remove generics --- .gitignore | 5 +- hyperdrive/packages/hyperwallet/Cargo.lock | 4334 +++++++++++++++++ .../hyperwallet/hyperwallet/Cargo.toml | 5 +- .../hyperwallet/src/api/messages.rs | 104 +- .../hyperwallet/src/core/session.rs | 221 +- .../hyperwallet/src/core/transactions.rs | 74 +- .../hyperwallet/src/core/wallet_lifecycle.rs | 143 +- .../hyperwallet/src/core/wallet_queries.rs | 59 +- .../src/integrations/erc4337_operations.rs | 48 +- .../hyperwallet/src/integrations/hypermap.rs | 5 +- .../hyperwallet/src/permissions/validator.rs | 6 +- hyperdrive/packages/hyperwallet/metadata.json | 4 +- .../hyperwallet/pkg/ui/index-B1lsByE2.css | 1 - .../hyperwallet/pkg/ui/index-BYsSXCSl.js | 40 - .../packages/hyperwallet/pkg/ui/index.html | 16 - .../hyperwallet/ui/dist/index-B1lsByE2.css | 1 - .../hyperwallet/ui/dist/index-BYsSXCSl.js | 40 - .../packages/hyperwallet/ui/dist/index.html | 16 - 18 files changed, 4695 insertions(+), 427 deletions(-) create mode 100644 hyperdrive/packages/hyperwallet/Cargo.lock delete mode 100644 hyperdrive/packages/hyperwallet/pkg/ui/index-B1lsByE2.css delete mode 100644 hyperdrive/packages/hyperwallet/pkg/ui/index-BYsSXCSl.js delete mode 100644 hyperdrive/packages/hyperwallet/pkg/ui/index.html delete mode 100644 hyperdrive/packages/hyperwallet/ui/dist/index-B1lsByE2.css delete mode 100644 hyperdrive/packages/hyperwallet/ui/dist/index-BYsSXCSl.js delete mode 100644 hyperdrive/packages/hyperwallet/ui/dist/index.html diff --git a/.gitignore b/.gitignore index d0c37afe0..d75accaf2 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,9 @@ hyperdrive/packages/file-explorer/api hyperdrive/packages/file-explorer/pkg/ui/* hyperdrive/packages/homepage/pkg/ui/* hyperdrive/packages/settings/pkg/ui/* +hyperdrive/packages/hyperwallet/pkg/ui +hyperdrive/packages/hyperwallet/ui/dist +hyperdrive/packages/docs/pkg/ui + hyperdrive/src/register-ui/build/ hyperdrive/src/register-ui/dist/ -hyperdrive/packages/docs/pkg/ui diff --git a/hyperdrive/packages/hyperwallet/Cargo.lock b/hyperdrive/packages/hyperwallet/Cargo.lock new file mode 100644 index 000000000..734dc66d3 --- /dev/null +++ b/hyperdrive/packages/hyperwallet/Cargo.lock @@ -0,0 +1,4334 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.3", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "alloy" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59febb24956a41c29bb5f450978fbe825bd6456b3f80586c8bd558dc882e7b6a" +dependencies = [ + "alloy-consensus", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-json-rpc", + "alloy-network", + "alloy-provider", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", +] + +[[package]] +name = "alloy-chains" +version = "0.1.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28e2652684758b0d9b389d248b209ed9fd9989ef489a550265fe4bb8454fe7eb" +dependencies = [ + "alloy-primitives 0.8.25", + "num_enum", + "strum", +] + +[[package]] +name = "alloy-consensus" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88e1edea70787c33e11197d3f32ae380f3db19e6e061e539a5bcf8184a6b326" +dependencies = [ + "alloy-eips", + "alloy-primitives 0.8.25", + "alloy-rlp", + "alloy-serde", + "alloy-trie", + "auto_impl", + "c-kzg", + "derive_more 1.0.0", + "serde", +] + +[[package]] +name = "alloy-consensus-any" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57b1bb53f40c0273cd1975573cd457b39213e68584e36d1401d25fd0398a1d65" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives 0.8.25", + "alloy-rlp", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-core" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d8bcce99ad10fe02640cfaec1c6bc809b837c783c1d52906aa5af66e2a196f6" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives 0.8.25", + "alloy-rlp", + "alloy-sol-types 0.8.25", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb8e762aefd39a397ff485bc86df673465c4ad3ec8819cc60833a8a3ba5cdc87" +dependencies = [ + "alloy-json-abi", + "alloy-primitives 0.8.25", + "alloy-sol-type-parser", + "alloy-sol-types 0.8.25", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow", +] + +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives 0.8.25", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" +dependencies = [ + "alloy-primitives 0.8.25", + "alloy-rlp", + "derive_more 1.0.0", + "serde", +] + +[[package]] +name = "alloy-eips" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9fadfe089e9ccc0650473f2d4ef0a28bc015bbca5631d9f0f09e49b557fdb3" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives 0.8.25", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", + "sha2", +] + +[[package]] +name = "alloy-genesis" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2a4cf7b70f3495788e74ce1c765260ffe38820a2a774ff4aacb62e31ea73f9" +dependencies = [ + "alloy-primitives 0.8.25", + "alloy-serde", + "alloy-trie", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6beff64ad0aa6ad1019a3db26fef565aefeb011736150ab73ed3366c3cfd1b" +dependencies = [ + "alloy-primitives 0.8.25", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e29040b9d5fe2fb70415531882685b64f8efd08dfbd6cc907120650504821105" +dependencies = [ + "alloy-primitives 0.8.25", + "alloy-sol-types 0.8.25", + "serde", + "serde_json", + "thiserror 2.0.12", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510cc00b318db0dfccfdd2d032411cfae64fc144aef9679409e014145d3dacc4" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives 0.8.25", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types 0.8.25", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9081c099e798b8a2bba2145eb82a9a146f01fc7a35e9ab6e7b43305051f97550" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives 0.8.25", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-primitives" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 0.99.20", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-primitives" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c77490fe91a0ce933a1f219029521f20fc28c2c0ca95d53fa4da9c00b8d9d4e" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more 2.0.1", + "foldhash", + "hashbrown 0.15.4", + "indexmap", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.8.5", + "ruint", + "rustc-hash", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc2dfaddd9a30aa870a78a4e1316e3e115ec1e12e552cbc881310456b85c1f24" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives 0.8.25", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru", + "parking_lot", + "pin-project", + "reqwest", + "schnellru", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f70d83b765fdc080dbcd4f4db70d8d23fe4761f2f02ebfa9146b833900634b4" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64b728d511962dda67c1bc7ea7c03736ec275ed2cf4c35d9585298ac9ccf3b73" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531137b283547d5b9a5cafc96b006c64ef76810c681d606f28be9781955293b6" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives 0.8.25", + "alloy-transport", + "alloy-transport-http", + "futures", + "pin-project", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3410a472ce26c457e9780f708ee6bd540b30f88f1f31fdab7a11d00bd6aa1aee" +dependencies = [ + "alloy-primitives 0.8.25", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed98e1af55a7d856bfa385f30f63d8d56be2513593655c904a8f4a7ec963aa3e" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8737d7a6e37ca7bba9c23e9495c6534caec6760eb24abc9d5ffbaaba147818e1" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives 0.8.25", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types 0.8.25", + "derive_more 1.0.0", + "itertools 0.13.0", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5851bf8d5ad33014bd0c45153c603303e730acc8a209450a7ae6b4a12c2789e2" +dependencies = [ + "alloy-primitives 0.8.25", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e10ca565da6500cca015ba35ee424d59798f2e1b85bc0dd8f81dafd401f029a" +dependencies = [ + "alloy-primitives 0.8.25", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-signer-local" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fababf5a745133490cde927d48e50267f97d3d1209b9fc9f1d1d666964d172" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives 0.8.25", + "alloy-signer", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" +dependencies = [ + "alloy-sol-macro-expander 0.7.7", + "alloy-sol-macro-input 0.7.7", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10ae8e9a91d328ae954c22542415303919aabe976fe7a92eb06db1b68fd59f2" +dependencies = [ + "alloy-sol-macro-expander 0.8.25", + "alloy-sol-macro-input 0.8.25", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" +dependencies = [ + "alloy-sol-macro-input 0.7.7", + "const-hex", + "heck", + "indexmap", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 0.7.7", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83ad5da86c127751bc607c174d6c9fe9b85ef0889a9ca0c641735d77d4f98f26" +dependencies = [ + "alloy-sol-macro-input 0.8.25", + "const-hex", + "heck", + "indexmap", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 0.8.25", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 0.7.7", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3d30f0d3f9ba3b7686f3ff1de9ee312647aac705604417a2f40c604f409a9e" +dependencies = [ + "const-hex", + "dunce", + "heck", + "macro-string", + "proc-macro2", + "quote", + "syn 2.0.104", + "syn-solidity 0.8.25", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d162f8524adfdfb0e4bd0505c734c985f3e2474eb022af32eef0d52a4f3935c" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" +dependencies = [ + "alloy-primitives 0.7.7", + "alloy-sol-macro 0.7.7", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-sol-types" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d43d5e60466a440230c07761aa67671d4719d46f43be8ea6e7ed334d8db4a9ab" +dependencies = [ + "alloy-json-abi", + "alloy-primitives 0.8.25", + "alloy-sol-macro 0.8.25", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "538a04a37221469cac0ce231b737fd174de2fdfcdd843bdd068cb39ed3e066ad" +dependencies = [ + "alloy-json-rpc", + "base64", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-transport-http" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ed40eb1e1265b2911512f6aa1dcece9702d078f5a646730c45e39e2be00ac1c" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest", + "serde_json", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-trie" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95a94854e420f07e962f7807485856cde359ab99ab6413883e15235ad996e8b" +dependencies = [ + "alloy-primitives 0.8.25", + "alloy-rlp", + "arrayvec", + "derive_more 1.0.0", + "nybbles", + "serde", + "smallvec", + "tracing", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[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 = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "serde", +] + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "auto_impl" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[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 = "blst" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fd49896f12ac9b6dcd7a5998466b9b58263a695a3dd1ecc1aaca2e12a90b080" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +dependencies = [ + "serde", +] + +[[package]] +name = "c-kzg" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "once_cell", + "serde", +] + +[[package]] +name = "cc" +version = "1.2.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" + +[[package]] +name = "chrono" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "color-eyre" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d" +dependencies = [ + "backtrace", + "color-spantrace", + "eyre", + "indenter", + "once_cell", + "owo-colors", + "tracing-error", +] + +[[package]] +name = "color-spantrace" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b88ea9df13354b55bc7234ebcce36e6ef896aca2e42a15de9e10edce01b427" +dependencies = [ + "once_cell", + "owo-colors", + "tracing-core", + "tracing-error", +] + +[[package]] +name = "const-hex" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const_format" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[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 = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.1", + "syn 2.0.104", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl 1.0.0", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl 2.0.1", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "unicode-xid", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "unicode-xid", +] + +[[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.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", + "serde", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "hyperwallet" +version = "0.1.0" +dependencies = [ + "alloy-primitives 0.7.7", + "alloy-sol-types 0.7.7", + "anyhow", + "base64ct", + "chrono", + "hyperware_process_lib", + "process_macros", + "serde", + "serde_json", + "url", + "wit-bindgen", +] + +[[package]] +name = "hyperware_process_lib" +version = "1.2.0" +dependencies = [ + "alloy", + "alloy-primitives 0.8.25", + "alloy-sol-macro 0.8.25", + "alloy-sol-types 0.8.25", + "anyhow", + "base64", + "bincode", + "color-eyre", + "hex", + "http", + "mime_guess", + "rand 0.8.5", + "regex", + "rmp-serde", + "serde", + "serde_json", + "sha3", + "thiserror 1.0.69", + "tracing", + "tracing-error", + "tracing-subscriber", + "url", + "wit-bindgen", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[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 = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +dependencies = [ + "equivalent", + "hashbrown 0.15.4", + "serde", +] + +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[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.174" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.4", +] + +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "nybbles" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983bb634df7248924ee0c4c3a749609b5abcb082c28fffe3254b3eb3602b307" +dependencies = [ + "alloy-rlp", + "const-hex", + "proptest", + "serde", + "smallvec", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "owo-colors" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48dd4f4a2c8405440fd0462561f0e5806bd0f77e86f51c761481bdd4018b545e" + +[[package]] +name = "parity-scale-codec" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" +dependencies = [ + "memchr", + "thiserror 2.0.12", + "ucd-trie", +] + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" +dependencies = [ + "proc-macro2", + "syn 2.0.104", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "process_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecfcd7b51a1b9249fb47359a9f8d57a9e9dbc71857c5cfd08f98764f7106a3d" +dependencies = [ + "quote", + "syn 2.0.104", +] + +[[package]] +name = "proptest" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags", + "lazy_static", + "num-traits", + "rand 0.9.2", + "rand_chacha 0.9.0", + "rand_xorshift", + "regex-syntax 0.8.5", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[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", + "serde", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", +] + +[[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_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", +] + +[[package]] +name = "rand_xorshift" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" +dependencies = [ + "rand_core 0.9.3", +] + +[[package]] +name = "redox_syscall" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "reqwest" +version = "0.12.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" +dependencies = [ + "base64", + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rmp" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "ruint" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecb38f82477f20c5c3d62ef52d7c4e536e38ea9b73fb570a20c5cae0e14bcf6" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp 0.3.1", + "fastrlp 0.4.0", + "num-bigint", + "num-integer", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rand 0.9.2", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.26", +] + +[[package]] +name = "rustix" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.60.2", +] + +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustversion" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "schnellru" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" +dependencies = [ + "ahash", + "cfg-if", + "hashbrown 0.13.2", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" + +[[package]] +name = "semver-parser" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "serde_json" +version = "1.0.142" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "slab" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "spdx" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e17e880bafaeb362a7b751ec46bdc5b61445a188f80e0606e68167cd540fa3" +dependencies = [ + "smallvec", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strum" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[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.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "syn-solidity" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4560533fbd6914b94a8fb5cc803ed6801c3455668db3b810702c57612bac9412" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +dependencies = [ + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "pin-project-lite", + "slab", + "socket2", + "tokio-macros", + "windows-sys 0.59.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-error" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" +dependencies = [ + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wait-timeout" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +dependencies = [ + "libc", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt 0.39.0", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.104", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.220.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e913f9242315ca39eff82aee0e19ee7a372155717ff0eb082c741e435ce25ed1" +dependencies = [ + "leb128", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.220.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185dfcd27fa5db2e6a23906b54c28199935f71d9a27a1a27b3a88d6fee2afae7" +dependencies = [ + "anyhow", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.220.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d07b6a3b550fefa1a914b6d54fc175dd11c3392da11eee604e6ffc759805d25" +dependencies = [ + "ahash", + "bitflags", + "hashbrown 0.14.5", + "indexmap", + "semver 1.0.26", +] + +[[package]] +name = "wasmtimer" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8d49b5d6c64e8558d9b1b065014426f35c18de636895d24893dbbd329743446" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] + +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +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-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.3", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "winnow" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" +dependencies = [ + "wit-bindgen-rt 0.36.0", + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" +dependencies = [ + "bitflags", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn 2.0.104", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.104", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.220.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b505603761ed400c90ed30261f44a768317348e49f1864e82ecdc3b2744e5627" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.220.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae2a7999ed18efe59be8de2db9cb2b7f84d88b27818c79353dfc53131840fe1a" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.26", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +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.104", +] + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbb9122ea75b11bf96e7492afb723e8a7fbe12c67417aa95e7e3d18144d37cd" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.104", +] diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml b/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml index 7dc529e4a..b9ec34cd8 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml +++ b/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml @@ -6,7 +6,8 @@ publish = false [dependencies] anyhow = "1.0" -hyperware_process_lib = { git = "https://github.com/hyperware-ai/process_lib", branch = "hyperwallet-client_lib", features = ["logging"] } +hyperware_process_lib = { path = "../../../../../process_lib", features = ["logging"] } +#hyperware_process_lib = { git = "https://github.com/hyperware-ai/process_lib", branch = "hyperwallet-client_lib", features = ["logging"] } process_macros = "0.1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" @@ -21,4 +22,4 @@ url = "2.5" crate-type = ["cdylib"] [package.metadata.component] -package = "hyperware:process" \ No newline at end of file +package = "hyperware:process" diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/api/messages.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/api/messages.rs index 5a9ac28d8..ff0f3500e 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/api/messages.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/api/messages.rs @@ -1,11 +1,11 @@ /// Centralized message dispatcher for all Hyperwallet operations -/// -/// This module handles incoming HyperwalletMessage requests and routes them to +/// +/// This module handles incoming HyperwalletMessage requests and routes them to /// the appropriate core business logic or external integrations. - use crate::state::HyperwalletState; use hyperware_process_lib::hyperwallet_client::types::{ - HyperwalletMessage, HyperwalletResponse, OperationError, HyperwalletResponseData, + HyperwalletMessage, HyperwalletRequest, HyperwalletResponse, HyperwalletResponseData, + OperationError, }; use hyperware_process_lib::logging::{error, info}; use hyperware_process_lib::{Address, Response}; @@ -23,7 +23,7 @@ pub fn handle_process_message( Err(e) => { error!("Failed to parse process message from {}: {}", source, e); let error = OperationError::invalid_params(&format!("Invalid message format: {}", e)); - let response = HyperwalletResponse::::error(error); + let response = HyperwalletResponse::error(error); Response::new() .body(serde_json::to_vec(&response)?) .send()?; @@ -33,7 +33,8 @@ pub fn handle_process_message( info!( "Process request from {}: {:?}", - source, message.operation_type() + source, + message.operation_type() ); let response = execute_message(message, source, state); @@ -49,56 +50,89 @@ pub fn execute_message( message: HyperwalletMessage, source: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { - match message { +) -> HyperwalletResponse { + let session_id = &message.session_id; + + match message.request { // Session Management (core/session.rs) - HyperwalletMessage::Handshake(req) => core::session::handle_handshake_step(req, source, state).map(HyperwalletResponseData::Handshake), - HyperwalletMessage::UnlockWallet(req) => core::session::handle_unlock_wallet(req, source, state), + HyperwalletRequest::Handshake(req) => { + core::session::handle_handshake_step(req, source, state) + } + HyperwalletRequest::UnlockWallet(req) => { + core::session::handle_unlock_wallet(req, session_id, source, state) + } // Wallet Management (core/wallet_lifecycle.rs) - HyperwalletMessage::CreateWallet(req) => core::wallet_lifecycle::create_wallet(req, source, state), - HyperwalletMessage::ImportWallet(req) => core::wallet_lifecycle::import_wallet(req, source, state), - HyperwalletMessage::DeleteWallet(req) => core::wallet_lifecycle::delete_wallet(req, source, state), - HyperwalletMessage::RenameWallet(req) => core::wallet_lifecycle::rename_wallet(req, source, state), - HyperwalletMessage::ExportWallet(req) => core::wallet_lifecycle::export_wallet(req, source, state), + HyperwalletRequest::CreateWallet(req) => { + core::wallet_lifecycle::create_wallet(req, session_id, source, state) + } + HyperwalletRequest::ImportWallet(req) => { + core::wallet_lifecycle::import_wallet(req, session_id, source, state) + } + HyperwalletRequest::DeleteWallet(req) => { + core::wallet_lifecycle::delete_wallet(req, session_id, source, state) + } + HyperwalletRequest::RenameWallet(req) => { + core::wallet_lifecycle::rename_wallet(req, session_id, source, state) + } + HyperwalletRequest::ExportWallet(req) => { + core::wallet_lifecycle::export_wallet(req, session_id, source, state) + } // Queries (core/wallet_queries.rs) - HyperwalletMessage::ListWallets(req) => core::wallet_queries::list_wallets(req, source, state), - HyperwalletMessage::GetWalletInfo(req) => core::wallet_queries::get_wallet_info(req, source, state), - HyperwalletMessage::GetBalance(req) => core::wallet_queries::get_balance(req, source, state), - HyperwalletMessage::GetTokenBalance(req) => core::wallet_queries::get_token_balance(req, source, state), + HyperwalletRequest::ListWallets => { + core::wallet_queries::list_wallets(session_id, source, state) + } + HyperwalletRequest::GetWalletInfo(req) => { + core::wallet_queries::get_wallet_info(req, session_id, source, state) + } + HyperwalletRequest::GetBalance(req) => { + core::wallet_queries::get_balance(req, session_id, source, state) + } + HyperwalletRequest::GetTokenBalance(req) => { + core::wallet_queries::get_token_balance(req, session_id, source, state) + } // Transactions (core/transactions.rs) - HyperwalletMessage::SendEth(req) => core::transactions::send_eth(req, source, state), - HyperwalletMessage::SendToken(req) => core::transactions::send_token(req, source, state), + HyperwalletRequest::SendEth(req) => { + core::transactions::send_eth(req, session_id, source, state) + } + HyperwalletRequest::SendToken(req) => { + core::transactions::send_token(req, session_id, source, state) + } // Account Abstraction (integrations/erc4337_operations.rs) - HyperwalletMessage::BuildAndSignUserOperationForPayment(req) => integrations::erc4337_operations::build_and_sign_user_operation_for_payment(req, source, state), + HyperwalletRequest::BuildAndSignUserOperationForPayment(req) => { + integrations::erc4337_operations::build_and_sign_user_operation_for_payment( + req, session_id, source, state, + ) + } // TODO: Update to use typed approach when integrations are migrated - // Convert OperationResponse to HyperwalletResponse - HyperwalletMessage::SubmitUserOperation(req) => integrations::erc4337_operations::submit_user_operation(req), - HyperwalletMessage::GetUserOperationReceipt(req) => integrations::erc4337_operations::get_user_operation_receipt(req), + // Convert OperationResponse to HyperwalletResponse + HyperwalletRequest::SubmitUserOperation(req) => { + integrations::erc4337_operations::submit_user_operation(req, session_id) + } + HyperwalletRequest::GetUserOperationReceipt(req) => { + integrations::erc4337_operations::get_user_operation_receipt(req, session_id) + } // Hypermap Operations (integrations/hypermap.rs) - //HyperwalletMessage::CheckTbaOwnership(req) => integrations::hypermap::check_tba_ownership(req, source), + //HyperwalletRequest::CheckTbaOwnership(req) => integrations::hypermap::check_tba_ownership(req, source), // TODO: Update to use typed approach when integrations are migrated. These should just be added from process_lib. - //HyperwalletMessage::CreateNote(_req) => { + //HyperwalletRequest::CreateNote(_req) => { // HyperwalletResponse::error(OperationError::invalid_params( // "Hypermap operations temporarily disabled during reorganization" // )) //}, //// Token Bound Account Operations (core/transactions.rs) - //HyperwalletMessage::ExecuteViaTba(_req) => { + //HyperwalletRequest::ExecuteViaTba(_req) => { // HyperwalletResponse::error(OperationError::invalid_params( // "TBA operations temporarily disabled during reorganization" // )) //}, - - _ => { - HyperwalletResponse::error(OperationError::invalid_params( - "Operation not yet implemented in new architecture" - )) - } + _ => HyperwalletResponse::error(OperationError::invalid_params( + "Operation not yet implemented in new architecture", + )), } -} \ No newline at end of file +} diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/session.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/session.rs index f09acfaba..95724495b 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/session.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/session.rs @@ -1,68 +1,86 @@ -use crate::state::HyperwalletState; use crate::permissions::{ProcessPermissions, SpendingLimits, UpdatableSetting}; +use crate::state::HyperwalletState; use hyperware_process_lib::hyperwallet_client::types::{ - HyperwalletRequest, HyperwalletResponse, HyperwalletResponseData, - OperationError, HandshakeStep, UnlockWalletRequest, UnlockWalletResponse, - HandshakeRequest, Operation, + HandshakeStep, HyperwalletResponse, HyperwalletResponseData, Operation, + OperationError, SessionId, UnlockWalletRequest, UnlockWalletResponse, }; use hyperware_process_lib::logging::{info, warn}; use hyperware_process_lib::Address; pub fn handle_handshake_step( - request: HandshakeRequest, + step: HandshakeStep, source: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { +) -> HyperwalletResponse { state.cleanup_expired_sessions(); - info!("Received handshake request {:?} from {:?}", request, source); - - let step = &request.step; - + info!("Received handshake request {:?} from {:?}", step, source); + match &step { - HandshakeStep::ClientHello { client_version, client_name } => { - handle_client_hello(client_version.clone(), client_name.clone(), state) - } - HandshakeStep::Register { required_operations, spending_limits } => { - handle_register(required_operations.clone(), spending_limits.clone(), source, state) + HandshakeStep::ClientHello { + client_version, + client_name, + } => handle_client_hello(client_version.clone(), client_name.clone(), state), + HandshakeStep::Register { + required_operations, + spending_limits, + } => handle_register( + required_operations.clone(), + spending_limits.clone(), + source, + state, + ), + _ => { + return HyperwalletResponse::error(OperationError::invalid_params( + "Invalid handshake step", + )) } - _ => return HyperwalletResponse::error(OperationError::invalid_params("Invalid handshake step")) } - } fn handle_client_hello( client_version: String, client_name: String, _state: &HyperwalletState, -) -> HyperwalletResponse { // ← Return specific type - info!("Received ClientHello from {} (version {})", client_name, client_version); - +) -> HyperwalletResponse { + // ← Return specific type + info!( + "Received ClientHello from {} (version {})", + client_name, client_version + ); + if !is_compatible_version(&client_version) { - warn!("Version incompatibility: client {} vs server {}", client_version, env!("CARGO_PKG_VERSION")); + warn!( + "Version incompatibility: client {} vs server {}", + client_version, + env!("CARGO_PKG_VERSION") + ); return HyperwalletResponse::error(OperationError::invalid_params(&format!( "Version incompatibility: client {} vs server {}", - client_version, + client_version, env!("CARGO_PKG_VERSION") ))); } let supported_operations = get_all_supported_operations(); - - info!("Sending ServerWelcome with {} operations and {} chains", - supported_operations.len(), 1); - HyperwalletResponse::success(HandshakeStep::ServerWelcome { + info!( + "Sending ServerWelcome with {} operations and {} chains", + supported_operations.len(), + 1 + ); + + HyperwalletResponse::success(HyperwalletResponseData::Handshake(HandshakeStep::ServerWelcome { server_version: env!("CARGO_PKG_VERSION").to_string(), supported_operations, supported_chains: vec![8453], // Base features: vec![ "spending_limits".to_string(), - "session_management".to_string(), - "erc4337".to_string(), - "gasless_payments".to_string() - ] - }) + "session_management".to_string(), + "erc4337".to_string(), + "gasless_payments".to_string(), + ], + })) } fn handle_register( @@ -70,20 +88,26 @@ fn handle_register( spending_limits: Option, address: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { // ← Return specific type - info!("Processing Register for {} with {} operations", address, required_operations.len()); - +) -> HyperwalletResponse { + // ← Return specific type + info!( + "Processing Register for {} with {} operations", + address, + required_operations.len() + ); + let supported_ops = get_all_supported_operations(); for op in &required_operations { if !supported_ops.contains(op) { return HyperwalletResponse::error(OperationError::invalid_params(&format!( - "Operation {:?} is not supported by this server", op + "Operation {:?} is not supported by this server", + op ))); } } - + let mut permissions = ProcessPermissions::new(address.clone(), required_operations.clone()); - + if let Some(limits) = spending_limits.clone() { permissions.spending_limits = Some(limits); permissions.updatable_settings = vec![UpdatableSetting::SpendingLimits]; @@ -91,105 +115,115 @@ fn handle_register( let was_update = state.get_permissions(address).is_some(); state.set_permissions(address.clone(), permissions.clone()); - + let session_id = state.create_session(address, 0); - - info!("{} process {} with {} operations, created session {}", - if was_update { "Updated" } else { "Registered" }, - address, - permissions.allowed_operations.len(), - session_id); - HyperwalletResponse::success(HandshakeStep::Complete { + info!( + "{} process {} with {} operations, created session {}", + if was_update { "Updated" } else { "Registered" }, + address, + permissions.allowed_operations.len(), + session_id + ); + + HyperwalletResponse::success(HyperwalletResponseData::Handshake(HandshakeStep::Complete { session_id, registered_permissions: permissions, - }) + })) } pub fn handle_unlock_wallet( - request: HyperwalletRequest, + req: UnlockWalletRequest, + session_id: &SessionId, address: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { +) -> HyperwalletResponse { state.cleanup_expired_sessions(); - - let data = &request.data; - - match state.validate_session(&data.session_id) { - Some(session) if session.process_address == *address => {}, + + match state.validate_session(&req.session_id) { + Some(session) if session.process_address == *address => {} Some(_) => { return HyperwalletResponse::error(OperationError::invalid_params( - "Session does not belong to this process" + "Session does not belong to this process", )); } None => { return HyperwalletResponse::error(OperationError::invalid_params( - "Invalid or expired session_id" + "Invalid or expired session_id", )); } } - - let (wallet_address, key_storage) = match state.get_wallet(address, &data.wallet_id) { + + let (wallet_address, key_storage) = match state.get_wallet(address, &req.wallet_id) { Some(wallet) => (wallet.address.clone(), wallet.key_storage.clone()), None => { - return HyperwalletResponse::error(OperationError::wallet_not_found(&data.wallet_id)); + return HyperwalletResponse::error(OperationError::wallet_not_found(&req.wallet_id)); } }; - + let result = match &key_storage { crate::state::KeyStorage::Encrypted(encrypted_data) => { - match hyperware_process_lib::signer::LocalSigner::decrypt(encrypted_data, &data.password) { + match hyperware_process_lib::signer::LocalSigner::decrypt( + encrypted_data, + &req.password, + ) { Ok(signer) => { - state.active_signers.insert( - (address.clone(), wallet_address.clone()), - signer - ); - - if let Err(e) = state.add_unlocked_wallet(&data.session_id, wallet_address.clone()) { + state + .active_signers + .insert((address.clone(), wallet_address.clone()), signer); + + if let Err(e) = + state.add_unlocked_wallet(&req.session_id, wallet_address.clone()) + { return HyperwalletResponse::error(OperationError::internal_error(&e)); } - - info!("Unlocked wallet {} for session {}", wallet_address, data.session_id); - - HyperwalletResponse::success(UnlockWalletResponse { + + info!( + "Unlocked wallet {} for session {}", + wallet_address, req.session_id + ); + + HyperwalletResponse::success(HyperwalletResponseData::UnlockWallet(UnlockWalletResponse { success: true, - wallet_id: data.wallet_id.clone(), + wallet_id: req.wallet_id.clone(), message: format!("Wallet {} unlocked successfully", wallet_address), - }) - } - Err(_) => { - HyperwalletResponse::error(OperationError::authentication_failed("Invalid password")) + })) } + Err(_) => HyperwalletResponse::error(OperationError::authentication_failed( + "Invalid password", + )), } } crate::state::KeyStorage::Decrypted(_) => { - if let Err(e) = state.add_unlocked_wallet(&data.session_id, wallet_address.clone()) { + if let Err(e) = state.add_unlocked_wallet(&req.session_id, wallet_address.clone()) { return HyperwalletResponse::error(OperationError::internal_error(&e)); } - - info!("Wallet {} was already unlocked, added to session {}", wallet_address, data.session_id); - - HyperwalletResponse::success(UnlockWalletResponse { + + info!( + "Wallet {} was already unlocked, added to session {}", + wallet_address, req.session_id + ); + + HyperwalletResponse::success(HyperwalletResponseData::UnlockWallet(UnlockWalletResponse { success: true, - wallet_id: data.wallet_id.clone(), + wallet_id: req.wallet_id.clone(), message: format!("Wallet {} was already unlocked", wallet_address), - }) + })) } }; - - result.map(HyperwalletResponseData::UnlockWallet) + + result } fn get_all_supported_operations() -> Vec { use Operation::*; - + vec![ // Process Management RegisterProcess, UpdateSpendingLimits, Handshake, UnlockWallet, - // Wallet Management CreateWallet, ImportWallet, @@ -201,7 +235,6 @@ fn get_all_supported_operations() -> Vec { GetWalletInfo, ListWallets, SetWalletLimits, - // Ethereum Operations SendEth, SendToken, @@ -209,12 +242,10 @@ fn get_all_supported_operations() -> Vec { CallContract, SignTransaction, SignMessage, - // TBA Operations ExecuteViaTba, CheckTbaOwnership, SetupTbaDelegation, - // ERC-4337 Operations BuildUserOperation, SignUserOperation, @@ -224,7 +255,6 @@ fn get_all_supported_operations() -> Vec { EstimateUserOperationGas, GetUserOperationReceipt, ConfigurePaymaster, - // Hypermap Operations ResolveIdentity, CreateNote, @@ -232,7 +262,6 @@ fn get_all_supported_operations() -> Vec { SetupDelegation, VerifyDelegation, MintEntry, - // Query Operations GetBalance, GetTokenBalance, @@ -240,7 +269,6 @@ fn get_all_supported_operations() -> Vec { EstimateGas, GetGasPrice, GetTransactionReceipt, - // Advanced Operations BatchOperations, ScheduleOperation, @@ -254,8 +282,11 @@ fn is_compatible_version(client_version: &str) -> bool { // For now, accept all versions but log warnings for major differences // TODO: Implement proper semantic versioning compatibility if client_version != env!("CARGO_PKG_VERSION") { - warn!("Client version {} differs from server version {}", - client_version, env!("CARGO_PKG_VERSION")); + warn!( + "Client version {} differs from server version {}", + client_version, + env!("CARGO_PKG_VERSION") + ); } true -} \ No newline at end of file +} diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/transactions.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/transactions.rs index d4da3a978..cd0c70a51 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/transactions.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/transactions.rs @@ -9,7 +9,7 @@ use crate::config::DEFAULT_CHAIN_ID; use crate::state::{HyperwalletState, KeyStorage, Wallet}; use hyperware_process_lib::hyperwallet_client::types::{ - HyperwalletRequest, HyperwalletResponse, HyperwalletResponseData, OperationError, + HyperwalletResponse, HyperwalletResponseData, OperationError, SessionId, SendEthRequest, SendEthResponse, SendTokenRequest, SendTokenResponse, ExecuteViaTbaRequest, ExecuteViaTbaResponse, }; use hyperware_process_lib::eth::Provider; @@ -23,7 +23,7 @@ use alloy_primitives::U256; pub fn get_signer_from_wallet( wallet: &Wallet, password: Option<&Value>, -) -> Result> { +) -> Result { match &wallet.key_storage { KeyStorage::Decrypted(signer) => Ok(signer.clone()), KeyStorage::Encrypted(encrypted_data) => { @@ -46,7 +46,7 @@ pub fn sign_hash( wallet: &Wallet, password: Option<&Value>, user_op_hash: &[u8] -) -> Result, HyperwalletResponse> { +) -> Result, HyperwalletResponse> { let signer = match get_signer_from_wallet(wallet, password) { Ok(s) => s, Err(e) => return Err(e), @@ -64,17 +64,17 @@ pub fn sign_hash( } pub fn send_eth( - request: HyperwalletRequest, + req: SendEthRequest, + session_id: &SessionId, address: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { - let data = &request.data; +) -> HyperwalletResponse { let chain_id = DEFAULT_CHAIN_ID; - let wallet = match state.get_wallet(address, &data.wallet_id) { + let wallet = match state.get_wallet(address, &req.wallet_id) { Some(w) => w, None => { - return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &data.wallet_id))); + return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &req.wallet_id))); } }; @@ -98,7 +98,7 @@ pub fn send_eth( let provider = Provider::new(chain_id, 60000); - let eth_amount = match EthAmount::from_string(&data.amount) { + let eth_amount = match EthAmount::from_string(&req.amount) { Ok(amt) => amt, Err(e) => { return HyperwalletResponse::error(OperationError::invalid_params(&format!( @@ -108,24 +108,23 @@ pub fn send_eth( } }; - match wallet::send_eth(&data.to, eth_amount, provider, &signer) { + match wallet::send_eth(&req.to, eth_amount, provider, &signer) { Ok(receipt) => { - if let Some(wallet_mut) = state.get_wallet_mut(address, &data.wallet_id) { + if let Some(wallet_mut) = state.get_wallet_mut(address, &req.wallet_id) { wallet_mut.last_used = Some(chrono::Utc::now()); } state.save(); info!("Process {} sent {} ETH from {} to {}", - address, data.amount, wallet_address, data.to); + address, req.amount, wallet_address, req.to); - let result = HyperwalletResponse::success(SendEthResponse { + HyperwalletResponse::success(HyperwalletResponseData::SendEth(SendEthResponse { tx_hash: format!("0x{:x}", receipt.hash), from_address: wallet_address, - to_address: data.to.clone(), - amount: data.amount.clone(), + to_address: req.to.clone(), + amount: req.amount.clone(), chain_id, - }); - result.map(HyperwalletResponseData::SendEth) + })) } Err(e) => HyperwalletResponse::error(OperationError::internal_error(&format!( "Failed to send ETH: {}", @@ -135,25 +134,25 @@ pub fn send_eth( } pub fn send_token( - request: HyperwalletRequest, + req: SendTokenRequest, + session_id: &SessionId, address: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { - let data = &request.data; +) -> HyperwalletResponse { let chain_id = DEFAULT_CHAIN_ID; - let wallet = match state.get_wallet(address, &data.wallet_id) { + let wallet = match state.get_wallet(address, &req.wallet_id) { Some(w) => w, None => { - return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &data.wallet_id))); + return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &req.wallet_id))); } }; info!("Token send request from {} for wallet {}: {} {} to {}", - address, data.wallet_id, data.amount, data.token_address, data.to); + address, req.wallet_id, req.amount, req.token_address, req.to); - let amount: U256 = if data.amount.starts_with("0x") { - match U256::from_str_radix(&data.amount[2..], 16) { + let amount: U256 = if req.amount.starts_with("0x") { + match U256::from_str_radix(&req.amount[2..], 16) { Ok(amt) => amt, Err(_) => { return HyperwalletResponse::error(OperationError::invalid_params( @@ -161,12 +160,12 @@ pub fn send_token( )); } } - } else if let Ok(raw_amount) = U256::from_str_radix(&data.amount, 10) { + } else if let Ok(raw_amount) = U256::from_str_radix(&req.amount, 10) { raw_amount - } else if let Ok(decimal_amount) = data.amount.parse::() { + } else if let Ok(decimal_amount) = req.amount.parse::() { let provider = Provider::new(chain_id, 60000); - match wallet::erc20_decimals(&data.token_address, &provider) { + match wallet::erc20_decimals(&req.token_address, &provider) { Ok(decimals) => { let multiplier = 10_u128.pow(decimals as u32); U256::from((decimal_amount * multiplier as f64) as u128) @@ -196,25 +195,24 @@ pub fn send_token( let provider = Provider::new(chain_id, 60000); - match erc20_transfer(&data.token_address, &data.to, amount, &provider, &signer) { + match erc20_transfer(&req.token_address, &req.to, amount, &provider, &signer) { Ok(receipt) => { - if let Some(wallet_mut) = state.get_wallet_mut(address, &data.wallet_id) { + if let Some(wallet_mut) = state.get_wallet_mut(address, &req.wallet_id) { wallet_mut.last_used = Some(chrono::Utc::now()); } state.save(); info!("Process {} sent {} tokens from {} to {}", - address, amount, wallet_address, data.to); + address, amount, wallet_address, req.to); - let result = HyperwalletResponse::success(SendTokenResponse { + HyperwalletResponse::success(HyperwalletResponseData::SendToken(SendTokenResponse { tx_hash: format!("0x{:x}", receipt.hash), from_address: wallet_address, - to_address: data.to.clone(), - token_address: data.token_address.clone(), - amount: data.amount.clone(), + to_address: req.to.clone(), + token_address: req.token_address.clone(), + amount: req.amount.clone(), chain_id, - }); - result.map(HyperwalletResponseData::SendToken) + })) } Err(e) => HyperwalletResponse::error(OperationError::internal_error(&format!( "Failed to send token: {}", e @@ -227,7 +225,7 @@ pub fn send_token( // request: HyperwalletRequest, // address: &Address, // state: &mut HyperwalletState, -//) -> HyperwalletResponse { +//) -> HyperwalletResponse { // // eoa should be in request // //let eoa_signer= match request.data.wallet_id.as_deref() { // // Some(id) => id, diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_lifecycle.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_lifecycle.rs index 6b11d6710..726f40578 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_lifecycle.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_lifecycle.rs @@ -5,7 +5,7 @@ use crate::config::DEFAULT_CHAIN_ID; use crate::state::{HyperwalletState, KeyStorage, Wallet}; use hyperware_process_lib::hyperwallet_client::types::{ - HyperwalletRequest, HyperwalletResponse, HyperwalletResponseData, OperationError, + HyperwalletResponse, HyperwalletResponseData, OperationError, SessionId, CreateWalletRequest, CreateWalletResponse, ImportWalletRequest, ImportWalletResponse, DeleteWalletRequest, DeleteWalletResponse, ExportWalletRequest, ExportWalletResponse, RenameWalletRequest @@ -15,18 +15,18 @@ use hyperware_process_lib::logging::info; use hyperware_process_lib::Address; pub fn create_wallet( - request: HyperwalletRequest, + req: CreateWalletRequest, + session_id: &SessionId, address: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { - let data = &request.data; +) -> HyperwalletResponse { let chain_id = DEFAULT_CHAIN_ID; match LocalSigner::new_random(chain_id) { Ok(signer) => { let wallet_address = signer.address().to_string(); - let key_storage = if let Some(ref password) = data.password { + let key_storage = if let Some(ref password) = req.password { match signer.encrypt(password) { Ok(encrypted) => KeyStorage::Encrypted(encrypted), Err(e) => { @@ -41,7 +41,7 @@ pub fn create_wallet( let wallet = Wallet { address: wallet_address.clone(), - name: Some(data.name.clone()), + name: Some(req.name.clone()), chain_id, key_storage, created_at: chrono::Utc::now(), @@ -53,12 +53,13 @@ pub fn create_wallet( info!("Created wallet {} for process {}", wallet_address, address); - let result = HyperwalletResponse::success(CreateWalletResponse { - wallet_id: wallet_address.clone(), - address: wallet_address, - name: data.name.clone(), - }); - result.map(HyperwalletResponseData::CreateWallet) + HyperwalletResponse::success(HyperwalletResponseData::CreateWallet( + CreateWalletResponse { + wallet_id: wallet_address.clone(), + address: wallet_address, + name: req.name.clone(), + } + )) } Err(e) => HyperwalletResponse::error(OperationError::internal_error(&format!( "Failed to create wallet: {}", @@ -68,14 +69,14 @@ pub fn create_wallet( } pub fn import_wallet( - request: HyperwalletRequest, + req: ImportWalletRequest, + session_id: &SessionId, address: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { - let data = &request.data; +) -> HyperwalletResponse { let chain_id = DEFAULT_CHAIN_ID; - match LocalSigner::from_private_key(&data.private_key, chain_id) { + match LocalSigner::from_private_key(&req.private_key, chain_id) { Ok(signer) => { let wallet_address = signer.address().to_string(); @@ -85,7 +86,7 @@ pub fn import_wallet( )); } - let key_storage = if let Some(ref password) = data.password { + let key_storage = if let Some(ref password) = req.password { match signer.encrypt(password) { Ok(encrypted) => KeyStorage::Encrypted(encrypted), Err(e) => { @@ -101,7 +102,7 @@ pub fn import_wallet( // Create the wallet let wallet = Wallet { address: wallet_address.clone(), - name: Some(data.name.clone()), + name: Some(req.name.clone()), chain_id, key_storage, created_at: chrono::Utc::now(), @@ -113,12 +114,13 @@ pub fn import_wallet( info!("Imported wallet {} for process {}", wallet_address, address); - let result = HyperwalletResponse::success(ImportWalletResponse { - wallet_id: wallet_address.clone(), - address: wallet_address, - name: data.name.clone(), - }); - result.map(HyperwalletResponseData::ImportWallet) + HyperwalletResponse::success(HyperwalletResponseData::ImportWallet( + ImportWalletResponse { + wallet_id: wallet_address.clone(), + address: wallet_address, + name: req.name.clone(), + } + )) } Err(e) => HyperwalletResponse::error(OperationError::internal_error(&format!( "Failed to import wallet: {}", @@ -128,11 +130,12 @@ pub fn import_wallet( } pub fn delete_wallet( - request: HyperwalletRequest, + req: DeleteWalletRequest, + session_id: &SessionId, address: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { - let wallet_id = &request.data.wallet_id; +) -> HyperwalletResponse { + let wallet_id = &req.wallet_id; let wallet = match state.get_wallet(address, wallet_id) { Some(w) => w.clone(), @@ -144,25 +147,26 @@ pub fn delete_wallet( info!("Deleted wallet {} for process {}", wallet.address, address); - let result = HyperwalletResponse::success(DeleteWalletResponse { - wallet_id: wallet.address.clone(), - success: true, - message: "Wallet deleted successfully".to_string(), - }); - result.map(HyperwalletResponseData::DeleteWallet) + HyperwalletResponse::success(HyperwalletResponseData::DeleteWallet( + DeleteWalletResponse { + wallet_id: wallet.address.clone(), + success: true, + message: "Wallet deleted successfully".to_string(), + } + )) } else { HyperwalletResponse::error(OperationError::internal_error("Failed to delete wallet")) } } pub fn rename_wallet( - request: HyperwalletRequest, + req: RenameWalletRequest, + session_id: &SessionId, address: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { - let data = &request.data; - let new_name = &data.new_name; - let wallet_id = &data.wallet_id; +) -> HyperwalletResponse { + let new_name = &req.new_name; + let wallet_id = &req.wallet_id; match state.get_wallet_mut(address, wallet_id) { Some(wallet) => { @@ -174,23 +178,14 @@ pub fn rename_wallet( info!("Renamed wallet {} to '{}' for process {}", wallet_id, new_name, address); - let result = HyperwalletResponse::success(serde_json::json!({ - "wallet_id": wallet_address.clone(), - "address": wallet_address, - "new_name": new_name.clone(), - "message": "Wallet renamed successfully" - })); - // TODO: Add RenameWallet variant to HyperwalletResponseData enum and use it here - result.map(|data| HyperwalletResponseData::CreateWallet( - serde_json::from_value(data).unwrap_or_else(|_| { - // Fallback to a basic CreateWalletResponse structure - hyperware_process_lib::hyperwallet_client::types::CreateWalletResponse { - wallet_id: wallet_address.clone(), - address: wallet_address, - name: new_name.clone(), - } - }) + // For now, use CreateWallet variant as a workaround + HyperwalletResponse::success(HyperwalletResponseData::CreateWallet( + CreateWalletResponse { + wallet_id: wallet_address.clone(), + address: wallet_address, + name: new_name.clone(), + } )) } None => HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", wallet_id))), @@ -198,21 +193,20 @@ pub fn rename_wallet( } pub fn export_wallet( - request: HyperwalletRequest, + req: ExportWalletRequest, + session_id: &SessionId, address: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { - let data = &request.data; - - let wallet = match state.get_wallet(address, &data.wallet_id) { +) -> HyperwalletResponse { + let wallet = match state.get_wallet(address, &req.wallet_id) { Some(w) => w, - None => return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &data.wallet_id))), + None => return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &req.wallet_id))), }; let private_key = match &wallet.key_storage { KeyStorage::Decrypted(signer) => signer.export_private_key(), KeyStorage::Encrypted(encrypted_data) => { - let pwd = match data.password.as_deref() { + let pwd = match req.password.as_deref() { Some(p) => p, None => { return HyperwalletResponse::error(OperationError::invalid_params("Password required for encrypted wallet")); @@ -230,19 +224,24 @@ pub fn export_wallet( info!("Exported wallet {} for {}", wallet.address, address); - let result = HyperwalletResponse::success(ExportWalletResponse { - address: wallet.address.clone(), - private_key, - }); - result.map(HyperwalletResponseData::ExportWallet) + HyperwalletResponse::success(HyperwalletResponseData::ExportWallet( + ExportWalletResponse { + address: wallet.address.clone(), + private_key, + } + )) } +// NOTE: This function still uses the generic HyperwalletResponse type +// because there is no SetWalletLimits variant in HyperwalletResponseData enum yet. +// Once the variant is added to types.rs, this function should be updated to match +// the pattern used by other functions in this module. pub fn set_wallet_limits( wallet_id: &str, params: serde_json::Value, address: &Address, state: &mut HyperwalletState, -) -> HyperwalletResponse { +) -> HyperwalletResponse { let max_per_call = params.get("max_per_call").and_then(|v| v.as_str()).map(|s| s.to_string()); let max_total = params.get("max_total").and_then(|v| v.as_str()).map(|s| s.to_string()); let currency = params.get("currency").and_then(|v| v.as_str()).unwrap_or("USDC").to_string(); @@ -262,14 +261,8 @@ pub fn set_wallet_limits( wallet_id, address, max_per_call, max_total, currency); // TODO: Replace json! macro with typed SetWalletLimitsResponse struct - HyperwalletResponse::success(serde_json::json!({ - "wallet_id": wallet_id, - "limits": { - "max_per_call": max_per_call, - "max_total": max_total, - "currency": currency - } - })) + // For now, return an error since there's no SetWalletLimits variant in HyperwalletResponseData + HyperwalletResponse::error(OperationError::operation_not_supported("SetWalletLimits response type not yet implemented")) } Err(e) => { HyperwalletResponse::error(OperationError::invalid_params(&e)) diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_queries.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_queries.rs index 70e9f4290..56d58a2fa 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_queries.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_queries.rs @@ -8,7 +8,7 @@ use crate::config::DEFAULT_CHAIN_ID; use crate::state::HyperwalletState; use hyperware_process_lib::hyperwallet_client::types::{ - HyperwalletRequest, HyperwalletResponse, HyperwalletResponseData, OperationError, + HyperwalletResponse, HyperwalletResponseData, OperationError, SessionId, GetBalanceRequest, GetBalanceResponse, GetWalletInfoRequest, GetWalletInfoResponse, GetTokenBalanceRequest, GetTokenBalanceResponse, ListWalletsResponse, Balance, Wallet @@ -19,17 +19,17 @@ use hyperware_process_lib::Address; use serde_json::json; pub fn get_balance( - request: HyperwalletRequest, + req: GetBalanceRequest, + session_id: &SessionId, source: &Address, state: &HyperwalletState, -) -> HyperwalletResponse { - let data = &request.data; +) -> HyperwalletResponse { let chain_id = DEFAULT_CHAIN_ID; - let wallet = match state.get_wallet(source, &data.wallet_id) { + let wallet = match state.get_wallet(source, &req.wallet_id) { Some(w) => w, None => { - return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &data.wallet_id))); + return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &req.wallet_id))); } }; @@ -37,15 +37,14 @@ pub fn get_balance( match wallet::get_eth_balance(&wallet.address, chain_id, provider) { Ok(balance) => { - let result = HyperwalletResponse::success(GetBalanceResponse { + HyperwalletResponse::success(HyperwalletResponseData::GetBalance(GetBalanceResponse { wallet_id: wallet.address.clone(), balance: Balance { formatted: balance.to_string(), raw: balance.to_string(), }, chain_id, - }); - result.map(HyperwalletResponseData::GetBalance) + })) }, Err(e) => HyperwalletResponse::error(OperationError::internal_error(&format!( "Failed to get balance: {}", @@ -55,10 +54,10 @@ pub fn get_balance( } pub fn list_wallets( - _request: HyperwalletRequest<()>, + session_id: &SessionId, address: &Address, state: &HyperwalletState, -) -> HyperwalletResponse { +) -> HyperwalletResponse { let wallets: Vec<_> = state .list_wallets(address) .into_iter() @@ -74,51 +73,48 @@ pub fn list_wallets( .collect(); let wallet_count = wallets.len(); - let result = HyperwalletResponse::success(ListWalletsResponse { + HyperwalletResponse::success(HyperwalletResponseData::ListWallets(ListWalletsResponse { process: address.to_string(), wallets: wallets.into_iter().map(|w| serde_json::from_value(w).unwrap()).collect(), total: wallet_count, - }); - result.map(HyperwalletResponseData::ListWallets) + })) } pub fn get_wallet_info( - request: HyperwalletRequest, + req: GetWalletInfoRequest, + session_id: &SessionId, address: &Address, state: &HyperwalletState, -) -> HyperwalletResponse { - let data = &request.data; - - let wallet = match state.get_wallet(address, &data.wallet_id) { +) -> HyperwalletResponse { + let wallet = match state.get_wallet(address, &req.wallet_id) { Some(w) => w, None => { - return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &data.wallet_id))); + return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &req.wallet_id))); } }; - let result = HyperwalletResponse::success(GetWalletInfoResponse { + HyperwalletResponse::success(HyperwalletResponseData::GetWalletInfo(GetWalletInfoResponse { wallet_id: wallet.address.clone(), address: wallet.address.clone(), name: wallet.name.clone().unwrap_or_else(|| "Unnamed Wallet".to_string()), chain_id: wallet.chain_id, is_locked: matches!(wallet.key_storage, crate::state::KeyStorage::Encrypted(_)), - }); - result.map(HyperwalletResponseData::GetWalletInfo) + })) } pub fn get_token_balance( - request: HyperwalletRequest, + req: GetTokenBalanceRequest, + session_id: &SessionId, address: &Address, state: &HyperwalletState, -) -> HyperwalletResponse { - let data = &request.data; +) -> HyperwalletResponse { let chain_id = DEFAULT_CHAIN_ID; // Get the wallet - let wallet = match state.get_wallet(address, &data.wallet_id) { + let wallet = match state.get_wallet(address, &req.wallet_id) { Some(w) => w, None => { - return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &data.wallet_id))); + return HyperwalletResponse::error(OperationError::invalid_params(&format!("Wallet not found: {}", &req.wallet_id))); } }; @@ -126,14 +122,13 @@ pub fn get_token_balance( let provider = Provider::new(chain_id, 60000); // Get token details - match wallet::get_token_details(&data.token_address, &wallet.address, &provider) { + match wallet::get_token_details(&req.token_address, &wallet.address, &provider) { Ok(details) => { - let result = HyperwalletResponse::success(GetTokenBalanceResponse { + HyperwalletResponse::success(HyperwalletResponseData::GetTokenBalance(GetTokenBalanceResponse { formatted: Some(details.formatted_balance), balance: details.balance, decimals: Some(details.decimals), - }); - result.map(HyperwalletResponseData::GetTokenBalance) + })) }, Err(e) => HyperwalletResponse::error(OperationError::internal_error(&format!( "Failed to get token balance: {}", diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/erc4337_operations.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/erc4337_operations.rs index bf43ad0e3..8936511b4 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/erc4337_operations.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/erc4337_operations.rs @@ -1,5 +1,5 @@ use hyperware_process_lib::hyperwallet_client::types::{ - HyperwalletRequest, HyperwalletResponse, HyperwalletResponseData, OperationError, + HyperwalletResponse, HyperwalletResponseData, OperationError, SessionId, BuildAndSignUserOperationForPaymentRequest, BuildAndSignUserOperationResponse, SubmitUserOperationRequest, SubmitUserOperationResponse, GetUserOperationReceiptRequest, UserOperationReceiptResponse, @@ -38,8 +38,7 @@ impl OperationResponse { } // Helper to convert from HyperwalletResponse to OperationResponse - pub fn from_hyperwallet_response(response: hyperware_process_lib::hyperwallet_client::types::HyperwalletResponse) -> Self - where T: serde::Serialize { + pub fn from_hyperwallet_response(response: hyperware_process_lib::hyperwallet_client::types::HyperwalletResponse) -> Self { if response.success { if let Some(data) = response.data { match serde_json::to_value(data) { @@ -77,12 +76,12 @@ use crate::integrations::erc4337_bundler as bundler; use crate::config::DEFAULT_CHAIN_ID; pub fn build_and_sign_user_operation_for_payment( - hyperwallet_request: HyperwalletRequest, + request: BuildAndSignUserOperationForPaymentRequest, + session_id: &SessionId, address: &Address, state: &HyperwalletState, -) -> HyperwalletResponse { +) -> HyperwalletResponse { info!("Building UserOperation for payment"); - let request = hyperwallet_request.data; let sender = EthAddress::from_str(&request.tba_address).unwrap(); @@ -229,8 +228,7 @@ pub fn build_and_sign_user_operation_for_payment( ready_to_submit: true, }; - let result = HyperwalletResponse::success(response_data); - result.map(HyperwalletResponseData::BuildAndSignUserOperationForPayment) + HyperwalletResponse::success(HyperwalletResponseData::BuildAndSignUserOperationForPayment(response_data)) } fn parse_hex(hex: &str) -> Result, OperationResponse> { @@ -434,22 +432,20 @@ pub struct SubmitUserOpParams { } pub fn submit_user_operation( - request: HyperwalletRequest, -) -> HyperwalletResponse { + req: SubmitUserOperationRequest, + session_id: &SessionId, +) -> HyperwalletResponse { info!("Submitting UserOperation to bundler ^^"); - let data = &request.data; - match bundler::submit_user_operation( - data.signed_user_operation.clone(), - data.entry_point.clone(), + req.signed_user_operation.clone(), + req.entry_point.clone(), ) { Ok(user_op_hash) => { info!("UserOperation submitted successfully: {}", user_op_hash); - let result = HyperwalletResponse::success(SubmitUserOperationResponse { - user_op_hash, - }); - result.map(HyperwalletResponseData::SubmitUserOperation) + HyperwalletResponse::success(HyperwalletResponseData::SubmitUserOperation(SubmitUserOperationResponse { + user_op_hash, + })) } Err(e) => { error!("Failed to submit UserOperation: {:?}", e); @@ -459,21 +455,19 @@ pub fn submit_user_operation( } pub fn get_user_operation_receipt( - request: HyperwalletRequest, -) -> HyperwalletResponse { + req: GetUserOperationReceiptRequest, + session_id: &SessionId, +) -> HyperwalletResponse { info!("Getting UserOperation receipt"); - let data = &request.data; - - match bundler::get_user_operation_receipt(data.user_op_hash.clone()) { + match bundler::get_user_operation_receipt(req.user_op_hash.clone()) { Ok(receipt_data) => { info!("UserOperation receipt retrieved successfully"); - let result = HyperwalletResponse::success(UserOperationReceiptResponse { - user_op_hash: data.user_op_hash.clone(), + HyperwalletResponse::success(HyperwalletResponseData::GetUserOperationReceipt(UserOperationReceiptResponse { + user_op_hash: req.user_op_hash.clone(), status: "success".to_string(), receipt: Some(receipt_data), - }); - result.map(HyperwalletResponseData::GetUserOperationReceipt) + })) } Err(e) => { error!("Failed to get UserOperation receipt: {:?}", e); diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/hypermap.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/hypermap.rs index c69621b94..57034e8f8 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/hypermap.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/hypermap.rs @@ -35,9 +35,8 @@ impl OperationResponse { } } - // Helper to convert from HyperwalletResponse to OperationResponse - pub fn from_hyperwallet_response(response: hyperware_process_lib::hyperwallet_client::types::HyperwalletResponse) -> Self - where T: serde::Serialize { + // Helper to convert from HyperwalletResponse to OperationResponse + pub fn from_hyperwallet_response(response: hyperware_process_lib::hyperwallet_client::types::HyperwalletResponse) -> Self { if response.success { if let Some(data) = response.data { match serde_json::to_value(data) { diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/permissions/validator.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/permissions/validator.rs index d329337fd..7403b580c 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/permissions/validator.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/permissions/validator.rs @@ -1,6 +1,6 @@ /// Permission validation logic -use hyperware_process_lib::hyperwallet_client::types::{OperationError, HyperwalletMessage, HyperwalletResponse, HyperwalletResponseData}; +use hyperware_process_lib::hyperwallet_client::types::{OperationError, HyperwalletMessage, HyperwalletRequest, HyperwalletResponse, HyperwalletResponseData}; use hyperware_process_lib::hyperwallet_client::types::Operation; use hyperware_process_lib::Address; use crate::permissions::operation_requires_wallet; @@ -19,10 +19,10 @@ impl PermissionValidator { message: HyperwalletMessage, address: &Address, state: &mut HyperwalletState, - ) -> HyperwalletResponse { + ) -> HyperwalletResponse { // Special handling for operations that don't require existing permissions. might be unsafe? - if matches!(message, HyperwalletMessage::Handshake(_)) { + if matches!(message.request, HyperwalletRequest::Handshake(_)) { info!("Processing Handshake from {}", address); return crate::api::messages::execute_message(message, address, state); } diff --git a/hyperdrive/packages/hyperwallet/metadata.json b/hyperdrive/packages/hyperwallet/metadata.json index c1abe0c40..c13dfa7ce 100644 --- a/hyperdrive/packages/hyperwallet/metadata.json +++ b/hyperdrive/packages/hyperwallet/metadata.json @@ -5,7 +5,7 @@ "properties": { "package_name": "hyperwallet", "current_version": "0.1.0", - "publisher": "hallman.hypr", + "publisher": "sys", "mirrors": [], "code_hashes": { "0.1.0": "" @@ -15,4 +15,4 @@ }, "external_url": "", "animation_url": "" -} \ No newline at end of file +} diff --git a/hyperdrive/packages/hyperwallet/pkg/ui/index-B1lsByE2.css b/hyperdrive/packages/hyperwallet/pkg/ui/index-B1lsByE2.css deleted file mode 100644 index b04b5de9d..000000000 --- a/hyperdrive/packages/hyperwallet/pkg/ui/index-B1lsByE2.css +++ /dev/null @@ -1 +0,0 @@ -#root{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.react:hover{filter:drop-shadow(0 0 2em #61dafbaa)}@keyframes logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion: no-preference){a:nth-of-type(2) .logo{animation:logo-spin infinite 20s linear}}.card{padding:2em}.read-the-docs{color:#888}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;color:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.container{max-width:800px;margin:0 auto;padding:20px}.card{background:#ffffff1a;border-radius:8px;padding:20px;margin:10px 0;border:1px solid rgba(255,255,255,.2)}.status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:15px;margin:20px 0}.status-item{background:#ffffff0d;padding:15px;border-radius:6px;text-align:center}.status-item h3{margin:0 0 10px;font-size:1.1em;color:#646cff}.status-item p{margin:0;font-size:1.5em;font-weight:700}.error{color:#ff6b6b;background:#ff6b6b1a;padding:10px;border-radius:4px;margin:10px 0}.loading{text-align:center;padding:40px;color:#888}.permissions-list{max-height:300px;overflow-y:auto;background:#0003;border-radius:4px;padding:10px}.permission-item{background:#ffffff0d;margin:5px 0;padding:10px;border-radius:4px;font-size:.9em}.permission-item strong{color:#646cff} diff --git a/hyperdrive/packages/hyperwallet/pkg/ui/index-BYsSXCSl.js b/hyperdrive/packages/hyperwallet/pkg/ui/index-BYsSXCSl.js deleted file mode 100644 index 6174376ea..000000000 --- a/hyperdrive/packages/hyperwallet/pkg/ui/index-BYsSXCSl.js +++ /dev/null @@ -1,40 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const i of u.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(l){if(l.ep)return;l.ep=!0;const u=n(l);fetch(l.href,u)}})();function rc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ho={exports:{}},el={},Qo={exports:{}},L={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Xn=Symbol.for("react.element"),lc=Symbol.for("react.portal"),uc=Symbol.for("react.fragment"),ic=Symbol.for("react.strict_mode"),oc=Symbol.for("react.profiler"),sc=Symbol.for("react.provider"),ac=Symbol.for("react.context"),cc=Symbol.for("react.forward_ref"),fc=Symbol.for("react.suspense"),dc=Symbol.for("react.memo"),pc=Symbol.for("react.lazy"),Mi=Symbol.iterator;function mc(e){return e===null||typeof e!="object"?null:(e=Mi&&e[Mi]||e["@@iterator"],typeof e=="function"?e:null)}var Ko={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yo=Object.assign,Xo={};function ln(e,t,n){this.props=e,this.context=t,this.refs=Xo,this.updater=n||Ko}ln.prototype.isReactComponent={};ln.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ln.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Go(){}Go.prototype=ln.prototype;function $u(e,t,n){this.props=e,this.context=t,this.refs=Xo,this.updater=n||Ko}var Au=$u.prototype=new Go;Au.constructor=$u;Yo(Au,ln.prototype);Au.isPureReactComponent=!0;var Di=Array.isArray,Zo=Object.prototype.hasOwnProperty,Vu={current:null},Jo={key:!0,ref:!0,__self:!0,__source:!0};function qo(e,t,n){var r,l={},u=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(u=""+t.key),t)Zo.call(t,r)&&!Jo.hasOwnProperty(r)&&(l[r]=t[r]);var o=arguments.length-2;if(o===1)l.children=n;else if(1>>1,G=x[H];if(0>>1;Hl(gl,T))vtl(er,gl)?(x[H]=er,x[vt]=T,H=vt):(x[H]=gl,x[ht]=T,H=ht);else if(vtl(er,T))x[H]=er,x[vt]=T,H=vt;else break e}}return z}function l(x,z){var T=x.sortIndex-z.sortIndex;return T!==0?T:x.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var s=[],c=[],h=1,m=null,p=3,g=!1,w=!1,S=!1,I=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(x){for(var z=n(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=x)r(c),z.sortIndex=z.expirationTime,t(s,z);else break;z=n(c)}}function v(x){if(S=!1,d(x),!w)if(n(s)!==null)w=!0,vl(E);else{var z=n(c);z!==null&&yl(v,z.startTime-x)}}function E(x,z){w=!1,S&&(S=!1,f(P),P=-1),g=!0;var T=p;try{for(d(z),m=n(s);m!==null&&(!(m.expirationTime>z)||x&&!Ne());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var G=H(m.expirationTime<=z);z=e.unstable_now(),typeof G=="function"?m.callback=G:m===n(s)&&r(s),d(z)}else r(s);m=n(s)}if(m!==null)var bn=!0;else{var ht=n(c);ht!==null&&yl(v,ht.startTime-z),bn=!1}return bn}finally{m=null,p=T,g=!1}}var _=!1,N=null,P=-1,B=5,j=-1;function Ne(){return!(e.unstable_now()-jx||125H?(x.sortIndex=T,t(c,x),n(s)===null&&x===n(c)&&(S?(f(P),P=-1):S=!0,yl(v,T-H))):(x.sortIndex=G,t(s,x),w||g||(w=!0,vl(E))),x},e.unstable_shouldYield=Ne,e.unstable_wrapCallback=function(x){var z=p;return function(){var T=p;p=z;try{return x.apply(this,arguments)}finally{p=T}}}})(rs);ns.exports=rs;var Nc=ns.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Pc=wt,ye=Nc;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yl=Object.prototype.hasOwnProperty,zc=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ii={},Ui={};function Tc(e){return Yl.call(Ui,e)?!0:Yl.call(Ii,e)?!1:zc.test(e)?Ui[e]=!0:(Ii[e]=!0,!1)}function Lc(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jc(e,t,n,r){if(t===null||typeof t>"u"||Lc(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function se(e,t,n,r,l,u,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=i}var ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ee[e]=new se(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ee[t]=new se(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ee[e]=new se(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ee[e]=new se(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ee[e]=new se(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ee[e]=new se(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ee[e]=new se(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ee[e]=new se(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ee[e]=new se(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bu=/[\-:]([a-z])/g;function Hu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Bu,Hu);ee[t]=new se(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Bu,Hu);ee[t]=new se(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Bu,Hu);ee[t]=new se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ee[e]=new se(e,1,!1,e.toLowerCase(),null,!1,!1)});ee.xlinkHref=new se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ee[e]=new se(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qu(e,t,n,r){var l=ee.hasOwnProperty(t)?ee[t]:null;(l!==null?l.type!==0:r||!(2o||l[i]!==u[o]){var s=` -`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=o);break}}}finally{kl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gn(e):""}function Rc(e){switch(e.tag){case 5:return gn(e.type);case 16:return gn("Lazy");case 13:return gn("Suspense");case 19:return gn("SuspenseList");case 0:case 2:case 15:return e=El(e.type,!1),e;case 11:return e=El(e.type.render,!1),e;case 1:return e=El(e.type,!0),e;default:return""}}function Jl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Mt:return"Fragment";case Ot:return"Portal";case Xl:return"Profiler";case Ku:return"StrictMode";case Gl:return"Suspense";case Zl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case is:return(e.displayName||"Context")+".Consumer";case us:return(e._context.displayName||"Context")+".Provider";case Yu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xu:return t=e.displayName||null,t!==null?t:Jl(e.type)||"Memo";case Ze:t=e._payload,e=e._init;try{return Jl(e(t))}catch{}}return null}function Oc(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Jl(t);case 8:return t===Ku?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ct(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ss(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mc(e){var t=ss(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,u.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rr(e){e._valueTracker||(e._valueTracker=Mc(e))}function as(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ss(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ql(e,t){var n=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ai(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ct(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cs(e,t){t=t.checked,t!=null&&Qu(e,"checked",t,!1)}function bl(e,t){cs(e,t);var n=ct(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?eu(e,t.type,n):t.hasOwnProperty("defaultValue")&&eu(e,t.type,ct(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function eu(e,t,n){(t!=="number"||Lr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wn=Array.isArray;function Qt(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=lr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var En={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dc=["Webkit","ms","Moz","O"];Object.keys(En).forEach(function(e){Dc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),En[t]=En[e]})});function ms(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||En.hasOwnProperty(e)&&En[e]?(""+t).trim():t+"px"}function hs(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=ms(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Fc=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ru(e,t){if(t){if(Fc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(y(62))}}function lu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var uu=null;function Gu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var iu=null,Kt=null,Yt=null;function Hi(e){if(e=Jn(e)){if(typeof iu!="function")throw Error(y(280));var t=e.stateNode;t&&(t=ul(t),iu(e.stateNode,e.type,t))}}function vs(e){Kt?Yt?Yt.push(e):Yt=[e]:Kt=e}function ys(){if(Kt){var e=Kt,t=Yt;if(Yt=Kt=null,Hi(e),t)for(e=0;e>>=0,e===0?32:31-(Yc(e)/Xc|0)|0}var ur=64,ir=4194304;function Sn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,u=e.pingedLanes,i=n&268435455;if(i!==0){var o=i&~l;o!==0?r=Sn(o):(u&=i,u!==0&&(r=Sn(u)))}else i=n&~l,i!==0?r=Sn(i):u!==0&&(r=Sn(u));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,u=t&-t,l>=u||l===16&&(u&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Gn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-je(t),e[t]=n}function qc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Cn),bi=" ",eo=!1;function Is(e,t){switch(e){case"keyup":return Pf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Us(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dt=!1;function Tf(e,t){switch(e){case"compositionend":return Us(t);case"keypress":return t.which!==32?null:(eo=!0,bi);case"textInput":return e=t.data,e===bi&&eo?null:e;default:return null}}function Lf(e,t){if(Dt)return e==="compositionend"||!ri&&Is(e,t)?(e=Ds(),kr=ei=et=null,Dt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lo(n)}}function Ws(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ws(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bs(){for(var e=window,t=Lr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lr(e.document)}return t}function li(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $f(e){var t=Bs(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ws(n.ownerDocument.documentElement,n)){if(r!==null&&li(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,u=Math.min(r.start,l);r=r.end===void 0?u:Math.min(r.end,l),!e.extend&&u>r&&(l=r,r=u,u=l),l=uo(n,u);var i=uo(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ft=null,du=null,Nn=null,pu=!1;function io(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;pu||Ft==null||Ft!==Lr(r)||(r=Ft,"selectionStart"in r&&li(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nn&&Un(Nn,r)||(Nn=r,r=Ir(du,"onSelect"),0$t||(e.current=wu[$t],wu[$t]=null,$t--)}function M(e,t){$t++,wu[$t]=e.current,e.current=t}var ft={},le=pt(ft),fe=pt(!1),_t=ft;function qt(e,t){var n=e.type.contextTypes;if(!n)return ft;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},u;for(u in n)l[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function de(e){return e=e.childContextTypes,e!=null}function $r(){F(fe),F(le)}function mo(e,t,n){if(le.current!==ft)throw Error(y(168));M(le,t),M(fe,n)}function qs(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(y(108,Oc(e)||"Unknown",l));return V({},n,r)}function Ar(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ft,_t=le.current,M(le,e),M(fe,fe.current),!0}function ho(e,t,n){var r=e.stateNode;if(!r)throw Error(y(169));n?(e=qs(e,t,_t),r.__reactInternalMemoizedMergedChildContext=e,F(fe),F(le),M(le,e)):F(fe),M(fe,n)}var Ae=null,il=!1,Fl=!1;function bs(e){Ae===null?Ae=[e]:Ae.push(e)}function Jf(e){il=!0,bs(e)}function mt(){if(!Fl&&Ae!==null){Fl=!0;var e=0,t=O;try{var n=Ae;for(O=1;e>=i,l-=i,Ve=1<<32-je(t)+l|n<P?(B=N,N=null):B=N.sibling;var j=p(f,N,d[P],v);if(j===null){N===null&&(N=B);break}e&&N&&j.alternate===null&&t(f,N),a=u(j,a,P),_===null?E=j:_.sibling=j,_=j,N=B}if(P===d.length)return n(f,N),U&&yt(f,P),E;if(N===null){for(;PP?(B=N,N=null):B=N.sibling;var Ne=p(f,N,j.value,v);if(Ne===null){N===null&&(N=B);break}e&&N&&Ne.alternate===null&&t(f,N),a=u(Ne,a,P),_===null?E=Ne:_.sibling=Ne,_=Ne,N=B}if(j.done)return n(f,N),U&&yt(f,P),E;if(N===null){for(;!j.done;P++,j=d.next())j=m(f,j.value,v),j!==null&&(a=u(j,a,P),_===null?E=j:_.sibling=j,_=j);return U&&yt(f,P),E}for(N=r(f,N);!j.done;P++,j=d.next())j=g(N,f,P,j.value,v),j!==null&&(e&&j.alternate!==null&&N.delete(j.key===null?P:j.key),a=u(j,a,P),_===null?E=j:_.sibling=j,_=j);return e&&N.forEach(function(sn){return t(f,sn)}),U&&yt(f,P),E}function I(f,a,d,v){if(typeof d=="object"&&d!==null&&d.type===Mt&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case nr:e:{for(var E=d.key,_=a;_!==null;){if(_.key===E){if(E=d.type,E===Mt){if(_.tag===7){n(f,_.sibling),a=l(_,d.props.children),a.return=f,f=a;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ze&&go(E)===_.type){n(f,_.sibling),a=l(_,d.props),a.ref=hn(f,_,d),a.return=f,f=a;break e}n(f,_);break}else t(f,_);_=_.sibling}d.type===Mt?(a=Ct(d.props.children,f.mode,v,d.key),a.return=f,f=a):(v=Tr(d.type,d.key,d.props,null,f.mode,v),v.ref=hn(f,a,d),v.return=f,f=v)}return i(f);case Ot:e:{for(_=d.key;a!==null;){if(a.key===_)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){n(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{n(f,a);break}else t(f,a);a=a.sibling}a=Hl(d,f.mode,v),a.return=f,f=a}return i(f);case Ze:return _=d._init,I(f,a,_(d._payload),v)}if(wn(d))return w(f,a,d,v);if(cn(d))return S(f,a,d,v);pr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(n(f,a.sibling),a=l(a,d),a.return=f,f=a):(n(f,a),a=Bl(d,f.mode,v),a.return=f,f=a),i(f)):n(f,a)}return I}var en=ra(!0),la=ra(!1),Br=pt(null),Hr=null,Wt=null,si=null;function ai(){si=Wt=Hr=null}function ci(e){var t=Br.current;F(Br),e._currentValue=t}function Eu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Gt(e,t){Hr=e,si=Wt=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ce=!0),e.firstContext=null)}function Ce(e){var t=e._currentValue;if(si!==e)if(e={context:e,memoizedValue:t,next:null},Wt===null){if(Hr===null)throw Error(y(308));Wt=e,Hr.dependencies={lanes:0,firstContext:e}}else Wt=Wt.next=e;return t}var kt=null;function fi(e){kt===null?kt=[e]:kt.push(e)}function ua(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,fi(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ke(e,r)}function Ke(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Je=!1;function di(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ia(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Be(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function it(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,R&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ke(e,n)}return l=r.interleaved,l===null?(t.next=t,fi(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ke(e,n)}function xr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ju(e,n)}}function wo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?l=u=i:u=u.next=i,n=n.next}while(n!==null);u===null?l=u=t:u=u.next=t}else l=u=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qr(e,t,n,r){var l=e.updateQueue;Je=!1;var u=l.firstBaseUpdate,i=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var s=o,c=s.next;s.next=null,i===null?u=c:i.next=c,i=s;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==i&&(o===null?h.firstBaseUpdate=c:o.next=c,h.lastBaseUpdate=s))}if(u!==null){var m=l.baseState;i=0,h=c=s=null,o=u;do{var p=o.lane,g=o.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:g,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var w=e,S=o;switch(p=t,g=n,S.tag){case 1:if(w=S.payload,typeof w=="function"){m=w.call(g,m,p);break e}m=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,p=typeof w=="function"?w.call(g,m,p):w,p==null)break e;m=V({},m,p);break e;case 2:Je=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[o]:p.push(o))}else g={eventTime:g,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(c=h=g,s=m):h=h.next=g,i|=p;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;p=o,o=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(h===null&&(s=m),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=h,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else u===null&&(l.shared.lanes=0);zt|=i,e.lanes=i,e.memoizedState=m}}function So(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ul.transition;Ul.transition={};try{e(!1),t()}finally{O=n,Ul.transition=r}}function xa(){return _e().memoizedState}function td(e,t,n){var r=st(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ca(e))_a(t,n);else if(n=ua(e,t,n,r),n!==null){var l=ie();Re(n,e,r,l),Na(n,t,r)}}function nd(e,t,n){var r=st(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ca(e))_a(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var i=t.lastRenderedState,o=u(i,n);if(l.hasEagerState=!0,l.eagerState=o,Oe(o,i)){var s=t.interleaved;s===null?(l.next=l,fi(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=ua(e,t,l,r),n!==null&&(l=ie(),Re(n,e,r,l),Na(n,t,r))}}function Ca(e){var t=e.alternate;return e===A||t!==null&&t===A}function _a(e,t){Pn=Yr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Na(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ju(e,n)}}var Xr={readContext:Ce,useCallback:te,useContext:te,useEffect:te,useImperativeHandle:te,useInsertionEffect:te,useLayoutEffect:te,useMemo:te,useReducer:te,useRef:te,useState:te,useDebugValue:te,useDeferredValue:te,useTransition:te,useMutableSource:te,useSyncExternalStore:te,useId:te,unstable_isNewReconciler:!1},rd={readContext:Ce,useCallback:function(e,t){return De().memoizedState=[e,t===void 0?null:t],e},useContext:Ce,useEffect:Eo,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_r(4194308,4,ga.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _r(4194308,4,e,t)},useInsertionEffect:function(e,t){return _r(4,2,e,t)},useMemo:function(e,t){var n=De();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=De();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=td.bind(null,A,e),[r.memoizedState,e]},useRef:function(e){var t=De();return e={current:e},t.memoizedState=e},useState:ko,useDebugValue:Si,useDeferredValue:function(e){return De().memoizedState=e},useTransition:function(){var e=ko(!1),t=e[0];return e=ed.bind(null,e[1]),De().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=A,l=De();if(U){if(n===void 0)throw Error(y(407));n=n()}else{if(n=t(),J===null)throw Error(y(349));Pt&30||ca(r,t,n)}l.memoizedState=n;var u={value:n,getSnapshot:t};return l.queue=u,Eo(da.bind(null,r,u,e),[e]),r.flags|=2048,Kn(9,fa.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=De(),t=J.identifierPrefix;if(U){var n=We,r=Ve;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Hn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Fe]=t,e[Vn]=r,Fa(e,t,!1,!1),t.stateNode=e;e:{switch(i=lu(n,r),n){case"dialog":D("cancel",e),D("close",e),l=r;break;case"iframe":case"object":case"embed":D("load",e),l=r;break;case"video":case"audio":for(l=0;lrn&&(t.flags|=128,r=!0,vn(u,!1),t.lanes=4194304)}else{if(!r)if(e=Kr(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vn(u,!0),u.tail===null&&u.tailMode==="hidden"&&!i.alternate&&!U)return ne(t),null}else 2*Q()-u.renderingStartTime>rn&&n!==1073741824&&(t.flags|=128,r=!0,vn(u,!1),t.lanes=4194304);u.isBackwards?(i.sibling=t.child,t.child=i):(n=u.last,n!==null?n.sibling=i:t.child=i,u.last=i)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Q(),t.sibling=null,n=$.current,M($,r?n&1|2:n&1),t):(ne(t),null);case 22:case 23:return Ni(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?me&1073741824&&(ne(t),t.subtreeFlags&6&&(t.flags|=8192)):ne(t),null;case 24:return null;case 25:return null}throw Error(y(156,t.tag))}function fd(e,t){switch(ii(t),t.tag){case 1:return de(t.type)&&$r(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tn(),F(fe),F(le),hi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mi(t),null;case 13:if(F($),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(y(340));bt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F($),null;case 4:return tn(),null;case 10:return ci(t.type._context),null;case 22:case 23:return Ni(),null;case 24:return null;default:return null}}var hr=!1,re=!1,dd=typeof WeakSet=="function"?WeakSet:Set,k=null;function Bt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){W(e,t,r)}else n.current=null}function ju(e,t,n){try{n()}catch(r){W(e,t,r)}}var Oo=!1;function pd(e,t){if(mu=Dr,e=Bs(),li(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var i=0,o=-1,s=-1,c=0,h=0,m=e,p=null;t:for(;;){for(var g;m!==n||l!==0&&m.nodeType!==3||(o=i+l),m!==u||r!==0&&m.nodeType!==3||(s=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break t;if(p===n&&++c===l&&(o=i),p===u&&++h===r&&(s=i),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}n=o===-1||s===-1?null:{start:o,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(hu={focusedElem:e,selectionRange:n},Dr=!1,k=t;k!==null;)if(t=k,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,k=e;else for(;k!==null;){t=k;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,I=w.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?S:ze(t.type,S),I);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){W(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,k=e;break}k=t.return}return w=Oo,Oo=!1,w}function zn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&ju(t,n,u)}l=l.next}while(l!==r)}}function al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ru(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $a(e){var t=e.alternate;t!==null&&(e.alternate=null,$a(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Fe],delete t[Vn],delete t[gu],delete t[Gf],delete t[Zf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Aa(e){return e.tag===5||e.tag===3||e.tag===4}function Mo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Aa(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ou(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ur));else if(r!==4&&(e=e.child,e!==null))for(Ou(e,t,n),e=e.sibling;e!==null;)Ou(e,t,n),e=e.sibling}function Mu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Mu(e,t,n),e=e.sibling;e!==null;)Mu(e,t,n),e=e.sibling}var q=null,Te=!1;function Ge(e,t,n){for(n=n.child;n!==null;)Va(e,t,n),n=n.sibling}function Va(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount=="function")try{Ie.onCommitFiberUnmount(tl,n)}catch{}switch(n.tag){case 5:re||Bt(n,t);case 6:var r=q,l=Te;q=null,Ge(e,t,n),q=r,Te=l,q!==null&&(Te?(e=q,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):q.removeChild(n.stateNode));break;case 18:q!==null&&(Te?(e=q,n=n.stateNode,e.nodeType===8?Dl(e.parentNode,n):e.nodeType===1&&Dl(e,n),Fn(e)):Dl(q,n.stateNode));break;case 4:r=q,l=Te,q=n.stateNode.containerInfo,Te=!0,Ge(e,t,n),q=r,Te=l;break;case 0:case 11:case 14:case 15:if(!re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var u=l,i=u.destroy;u=u.tag,i!==void 0&&(u&2||u&4)&&ju(n,t,i),l=l.next}while(l!==r)}Ge(e,t,n);break;case 1:if(!re&&(Bt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){W(n,t,o)}Ge(e,t,n);break;case 21:Ge(e,t,n);break;case 22:n.mode&1?(re=(r=re)||n.memoizedState!==null,Ge(e,t,n),re=r):Ge(e,t,n);break;default:Ge(e,t,n)}}function Do(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dd),t.forEach(function(r){var l=Ed.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Pe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~u}if(r=l,r=Q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hd(r/1960))-r,10e?16:e,tt===null)var r=!1;else{if(e=tt,tt=null,Jr=0,R&6)throw Error(y(331));var l=R;for(R|=4,k=e.current;k!==null;){var u=k,i=u.child;if(k.flags&16){var o=u.deletions;if(o!==null){for(var s=0;sQ()-Ci?xt(e,0):xi|=n),pe(e,t)}function Ga(e,t){t===0&&(e.mode&1?(t=ir,ir<<=1,!(ir&130023424)&&(ir=4194304)):t=1);var n=ie();e=Ke(e,t),e!==null&&(Gn(e,t,n),pe(e,n))}function kd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ga(e,n)}function Ed(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(t),Ga(e,n)}var Za;Za=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fe.current)ce=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ce=!1,ad(e,t,n);ce=!!(e.flags&131072)}else ce=!1,U&&t.flags&1048576&&ea(t,Wr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Nr(e,t),e=t.pendingProps;var l=qt(t,le.current);Gt(t,n),l=yi(null,t,r,e,l,n);var u=gi();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,de(r)?(u=!0,Ar(t)):u=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,di(t),l.updater=sl,t.stateNode=l,l._reactInternals=t,Cu(t,r,e,n),t=Pu(null,t,r,!0,u,n)):(t.tag=0,U&&u&&ui(t),ue(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Nr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Cd(r),e=ze(r,e),l){case 0:t=Nu(null,t,r,e,n);break e;case 1:t=Lo(null,t,r,e,n);break e;case 11:t=zo(null,t,r,e,n);break e;case 14:t=To(null,t,r,ze(r.type,e),n);break e}throw Error(y(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Nu(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Lo(e,t,r,l,n);case 3:e:{if(Oa(t),e===null)throw Error(y(387));r=t.pendingProps,u=t.memoizedState,l=u.element,ia(e,t),Qr(t,r,null,n);var i=t.memoizedState;if(r=i.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){l=nn(Error(y(423)),t),t=jo(e,t,r,n,l);break e}else if(r!==l){l=nn(Error(y(424)),t),t=jo(e,t,r,n,l);break e}else for(he=ut(t.stateNode.containerInfo.firstChild),ve=t,U=!0,Le=null,n=la(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bt(),r===l){t=Ye(e,t,n);break e}ue(e,t,r,n)}t=t.child}return t;case 5:return oa(t),e===null&&ku(t),r=t.type,l=t.pendingProps,u=e!==null?e.memoizedProps:null,i=l.children,vu(r,l)?i=null:u!==null&&vu(r,u)&&(t.flags|=32),Ra(e,t),ue(e,t,i,n),t.child;case 6:return e===null&&ku(t),null;case 13:return Ma(e,t,n);case 4:return pi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=en(t,null,r,n):ue(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),zo(e,t,r,l,n);case 7:return ue(e,t,t.pendingProps,n),t.child;case 8:return ue(e,t,t.pendingProps.children,n),t.child;case 12:return ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,u=t.memoizedProps,i=l.value,M(Br,r._currentValue),r._currentValue=i,u!==null)if(Oe(u.value,i)){if(u.children===l.children&&!fe.current){t=Ye(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var o=u.dependencies;if(o!==null){i=u.child;for(var s=o.firstContext;s!==null;){if(s.context===r){if(u.tag===1){s=Be(-1,n&-n),s.tag=2;var c=u.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s}}u.lanes|=n,s=u.alternate,s!==null&&(s.lanes|=n),Eu(u.return,n,t),o.lanes|=n;break}s=s.next}}else if(u.tag===10)i=u.type===t.type?null:u.child;else if(u.tag===18){if(i=u.return,i===null)throw Error(y(341));i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),Eu(i,n,t),i=u.sibling}else i=u.child;if(i!==null)i.return=u;else for(i=u;i!==null;){if(i===t){i=null;break}if(u=i.sibling,u!==null){u.return=i.return,i=u;break}i=i.return}u=i}ue(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Gt(t,n),l=Ce(l),r=r(l),t.flags|=1,ue(e,t,r,n),t.child;case 14:return r=t.type,l=ze(r,t.pendingProps),l=ze(r.type,l),To(e,t,r,l,n);case 15:return La(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Nr(e,t),t.tag=1,de(r)?(e=!0,Ar(t)):e=!1,Gt(t,n),Pa(t,r,l),Cu(t,r,l,n),Pu(null,t,r,!0,e,n);case 19:return Da(e,t,n);case 22:return ja(e,t,n)}throw Error(y(156,t.tag))};function Ja(e,t){return Cs(e,t)}function xd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ee(e,t,n,r){return new xd(e,t,n,r)}function zi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cd(e){if(typeof e=="function")return zi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Yu)return 11;if(e===Xu)return 14}return 2}function at(e,t){var n=e.alternate;return n===null?(n=Ee(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tr(e,t,n,r,l,u){var i=2;if(r=e,typeof e=="function")zi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Mt:return Ct(n.children,l,u,t);case Ku:i=8,l|=8;break;case Xl:return e=Ee(12,n,t,l|2),e.elementType=Xl,e.lanes=u,e;case Gl:return e=Ee(13,n,t,l),e.elementType=Gl,e.lanes=u,e;case Zl:return e=Ee(19,n,t,l),e.elementType=Zl,e.lanes=u,e;case os:return fl(n,l,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case us:i=10;break e;case is:i=9;break e;case Yu:i=11;break e;case Xu:i=14;break e;case Ze:i=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return t=Ee(i,n,t,l),t.elementType=e,t.type=r,t.lanes=u,t}function Ct(e,t,n,r){return e=Ee(7,e,r,t),e.lanes=n,e}function fl(e,t,n,r){return e=Ee(22,e,r,t),e.elementType=os,e.lanes=n,e.stateNode={isHidden:!1},e}function Bl(e,t,n){return e=Ee(6,e,null,t),e.lanes=n,e}function Hl(e,t,n){return t=Ee(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _d(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cl(0),this.expirationTimes=Cl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ti(e,t,n,r,l,u,i,o,s){return e=new _d(e,t,n,o,s),t===1?(t=1,u===!0&&(t|=8)):t=0,u=Ee(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},di(u),e}function Nd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tc)}catch(e){console.error(e)}}tc(),ts.exports=ge;var jd=ts.exports,Bo=jd;Kl.createRoot=Bo.createRoot,Kl.hydrateRoot=Bo.hydrateRoot;async function Ql(e,t){var n;try{const r=await fetch(`/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok)throw new Error(`HTTP ${r.status}: ${r.statusText}`);const l=await r.json();if(l.success!==void 0&&!l.success)throw new Error(((n=l.error)==null?void 0:n.message)||"Operation failed");return l}catch(r){throw console.error("API call failed:",r),r}}function Rd(){const[e,t]=wt.useState(null),[n,r]=wt.useState(!0),[l,u]=wt.useState(null);wt.useEffect(()=>{i()},[]);const i=async()=>{try{r(!0),u(null);const c=await Ql("status",{});t(c)}catch(c){u(c instanceof Error?c.message:"Failed to fetch status")}finally{r(!1)}},o=async()=>{try{u(null);const c=await Ql("api",{operation:"ListWallets",params:{},timestamp:Date.now()/1e3});console.log("ListWallets response:",c),alert("Check console for ListWallets response")}catch(c){u(c instanceof Error?c.message:"Failed to test permissions")}},s=async()=>{try{u(null);const c=await Ql("api",{operation:"CreateWallet",params:{name:"Test Wallet",chain_id:8453,encrypt:!1},timestamp:Date.now()/1e3});console.log("CreateWallet response:",c),alert("Check console for CreateWallet response")}catch(c){u(c instanceof Error?c.message:"Failed to create wallet")}};return n?C.jsx("div",{className:"container",children:C.jsx("div",{className:"loading",children:"Loading Hyperwallet Service..."})}):C.jsxs("div",{className:"container",children:[C.jsx("h1",{children:"🔐 Hyperwallet Service"}),l&&C.jsxs("div",{className:"error",children:[C.jsx("strong",{children:"Error:"})," ",l]}),e&&C.jsxs("div",{className:"card",children:[C.jsx("h2",{children:"Service Status"}),C.jsxs("div",{className:"status-grid",children:[C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Service"}),C.jsx("p",{children:e.service})]}),C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Version"}),C.jsx("p",{children:e.version})]}),C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Status"}),C.jsx("p",{style:{color:e.status==="running"?"#4CAF50":"#FF6B6B"},children:e.status})]}),C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Wallets"}),C.jsx("p",{children:e.wallets_count})]}),C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Permissions"}),C.jsx("p",{children:e.permissions_count})]}),C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Chains"}),C.jsx("p",{children:e.chains_count})]})]}),C.jsxs("p",{children:[C.jsx("strong",{children:"Initialized:"})," ",new Date(e.initialized_at*1e3).toLocaleString()]}),C.jsxs("p",{children:[C.jsx("strong",{children:"Last Updated:"})," ",new Date(e.timestamp).toLocaleString()]})]}),C.jsxs("div",{className:"card",children:[C.jsx("h2",{children:"Test Operations"}),C.jsxs("div",{style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:[C.jsx("button",{onClick:i,children:"Refresh Status"}),C.jsx("button",{onClick:o,children:"Test List Wallets"}),C.jsx("button",{onClick:s,children:"Test Create Wallet"})]})]}),C.jsxs("div",{className:"card",children:[C.jsx("h2",{children:"About Hyperwallet"}),C.jsx("p",{children:"Hyperwallet is a system-level wallet service for Hyperware that provides secure, permission-based wallet operations for all applications."}),C.jsx("h3",{children:"Features:"}),C.jsxs("ul",{children:[C.jsx("li",{children:"🔐 Secure wallet management with encryption"}),C.jsx("li",{children:"🎛️ Fine-grained permission system"}),C.jsx("li",{children:"⛓️ Multi-chain support (Ethereum, Base, etc.)"}),C.jsx("li",{children:"🗺️ Hypermap integration for identity management"}),C.jsx("li",{children:"🎯 Token Bound Account (TBA) operations"}),C.jsx("li",{children:"🔄 Inter-process communication API"})]}),C.jsx("h3",{children:"Permission Levels:"}),C.jsxs("ul",{children:[C.jsxs("li",{children:[C.jsx("strong",{children:"Read:"})," Query balances, transaction history"]}),C.jsxs("li",{children:[C.jsx("strong",{children:"Transact:"})," Send transactions (includes Read)"]}),C.jsxs("li",{children:[C.jsx("strong",{children:"Manage:"})," Create/import wallets (includes Transact)"]}),C.jsxs("li",{children:[C.jsx("strong",{children:"Admin:"})," Full control including wallet deletion"]})]})]})]})}Kl.createRoot(document.getElementById("root")).render(C.jsx(wc.StrictMode,{children:C.jsx(Rd,{})})); diff --git a/hyperdrive/packages/hyperwallet/pkg/ui/index.html b/hyperdrive/packages/hyperwallet/pkg/ui/index.html deleted file mode 100644 index b4c48f838..000000000 --- a/hyperdrive/packages/hyperwallet/pkg/ui/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - Hyperwallet Service - - - - -
- - \ No newline at end of file diff --git a/hyperdrive/packages/hyperwallet/ui/dist/index-B1lsByE2.css b/hyperdrive/packages/hyperwallet/ui/dist/index-B1lsByE2.css deleted file mode 100644 index b04b5de9d..000000000 --- a/hyperdrive/packages/hyperwallet/ui/dist/index-B1lsByE2.css +++ /dev/null @@ -1 +0,0 @@ -#root{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.react:hover{filter:drop-shadow(0 0 2em #61dafbaa)}@keyframes logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion: no-preference){a:nth-of-type(2) .logo{animation:logo-spin infinite 20s linear}}.card{padding:2em}.read-the-docs{color:#888}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;color:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.container{max-width:800px;margin:0 auto;padding:20px}.card{background:#ffffff1a;border-radius:8px;padding:20px;margin:10px 0;border:1px solid rgba(255,255,255,.2)}.status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:15px;margin:20px 0}.status-item{background:#ffffff0d;padding:15px;border-radius:6px;text-align:center}.status-item h3{margin:0 0 10px;font-size:1.1em;color:#646cff}.status-item p{margin:0;font-size:1.5em;font-weight:700}.error{color:#ff6b6b;background:#ff6b6b1a;padding:10px;border-radius:4px;margin:10px 0}.loading{text-align:center;padding:40px;color:#888}.permissions-list{max-height:300px;overflow-y:auto;background:#0003;border-radius:4px;padding:10px}.permission-item{background:#ffffff0d;margin:5px 0;padding:10px;border-radius:4px;font-size:.9em}.permission-item strong{color:#646cff} diff --git a/hyperdrive/packages/hyperwallet/ui/dist/index-BYsSXCSl.js b/hyperdrive/packages/hyperwallet/ui/dist/index-BYsSXCSl.js deleted file mode 100644 index 6174376ea..000000000 --- a/hyperdrive/packages/hyperwallet/ui/dist/index-BYsSXCSl.js +++ /dev/null @@ -1,40 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const i of u.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(l){if(l.ep)return;l.ep=!0;const u=n(l);fetch(l.href,u)}})();function rc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ho={exports:{}},el={},Qo={exports:{}},L={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Xn=Symbol.for("react.element"),lc=Symbol.for("react.portal"),uc=Symbol.for("react.fragment"),ic=Symbol.for("react.strict_mode"),oc=Symbol.for("react.profiler"),sc=Symbol.for("react.provider"),ac=Symbol.for("react.context"),cc=Symbol.for("react.forward_ref"),fc=Symbol.for("react.suspense"),dc=Symbol.for("react.memo"),pc=Symbol.for("react.lazy"),Mi=Symbol.iterator;function mc(e){return e===null||typeof e!="object"?null:(e=Mi&&e[Mi]||e["@@iterator"],typeof e=="function"?e:null)}var Ko={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yo=Object.assign,Xo={};function ln(e,t,n){this.props=e,this.context=t,this.refs=Xo,this.updater=n||Ko}ln.prototype.isReactComponent={};ln.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ln.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Go(){}Go.prototype=ln.prototype;function $u(e,t,n){this.props=e,this.context=t,this.refs=Xo,this.updater=n||Ko}var Au=$u.prototype=new Go;Au.constructor=$u;Yo(Au,ln.prototype);Au.isPureReactComponent=!0;var Di=Array.isArray,Zo=Object.prototype.hasOwnProperty,Vu={current:null},Jo={key:!0,ref:!0,__self:!0,__source:!0};function qo(e,t,n){var r,l={},u=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(u=""+t.key),t)Zo.call(t,r)&&!Jo.hasOwnProperty(r)&&(l[r]=t[r]);var o=arguments.length-2;if(o===1)l.children=n;else if(1>>1,G=x[H];if(0>>1;Hl(gl,T))vtl(er,gl)?(x[H]=er,x[vt]=T,H=vt):(x[H]=gl,x[ht]=T,H=ht);else if(vtl(er,T))x[H]=er,x[vt]=T,H=vt;else break e}}return z}function l(x,z){var T=x.sortIndex-z.sortIndex;return T!==0?T:x.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var s=[],c=[],h=1,m=null,p=3,g=!1,w=!1,S=!1,I=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(x){for(var z=n(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=x)r(c),z.sortIndex=z.expirationTime,t(s,z);else break;z=n(c)}}function v(x){if(S=!1,d(x),!w)if(n(s)!==null)w=!0,vl(E);else{var z=n(c);z!==null&&yl(v,z.startTime-x)}}function E(x,z){w=!1,S&&(S=!1,f(P),P=-1),g=!0;var T=p;try{for(d(z),m=n(s);m!==null&&(!(m.expirationTime>z)||x&&!Ne());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var G=H(m.expirationTime<=z);z=e.unstable_now(),typeof G=="function"?m.callback=G:m===n(s)&&r(s),d(z)}else r(s);m=n(s)}if(m!==null)var bn=!0;else{var ht=n(c);ht!==null&&yl(v,ht.startTime-z),bn=!1}return bn}finally{m=null,p=T,g=!1}}var _=!1,N=null,P=-1,B=5,j=-1;function Ne(){return!(e.unstable_now()-jx||125H?(x.sortIndex=T,t(c,x),n(s)===null&&x===n(c)&&(S?(f(P),P=-1):S=!0,yl(v,T-H))):(x.sortIndex=G,t(s,x),w||g||(w=!0,vl(E))),x},e.unstable_shouldYield=Ne,e.unstable_wrapCallback=function(x){var z=p;return function(){var T=p;p=z;try{return x.apply(this,arguments)}finally{p=T}}}})(rs);ns.exports=rs;var Nc=ns.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Pc=wt,ye=Nc;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yl=Object.prototype.hasOwnProperty,zc=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ii={},Ui={};function Tc(e){return Yl.call(Ui,e)?!0:Yl.call(Ii,e)?!1:zc.test(e)?Ui[e]=!0:(Ii[e]=!0,!1)}function Lc(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jc(e,t,n,r){if(t===null||typeof t>"u"||Lc(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function se(e,t,n,r,l,u,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=i}var ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ee[e]=new se(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ee[t]=new se(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ee[e]=new se(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ee[e]=new se(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ee[e]=new se(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ee[e]=new se(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ee[e]=new se(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ee[e]=new se(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ee[e]=new se(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bu=/[\-:]([a-z])/g;function Hu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Bu,Hu);ee[t]=new se(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Bu,Hu);ee[t]=new se(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Bu,Hu);ee[t]=new se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ee[e]=new se(e,1,!1,e.toLowerCase(),null,!1,!1)});ee.xlinkHref=new se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ee[e]=new se(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qu(e,t,n,r){var l=ee.hasOwnProperty(t)?ee[t]:null;(l!==null?l.type!==0:r||!(2o||l[i]!==u[o]){var s=` -`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=o);break}}}finally{kl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gn(e):""}function Rc(e){switch(e.tag){case 5:return gn(e.type);case 16:return gn("Lazy");case 13:return gn("Suspense");case 19:return gn("SuspenseList");case 0:case 2:case 15:return e=El(e.type,!1),e;case 11:return e=El(e.type.render,!1),e;case 1:return e=El(e.type,!0),e;default:return""}}function Jl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Mt:return"Fragment";case Ot:return"Portal";case Xl:return"Profiler";case Ku:return"StrictMode";case Gl:return"Suspense";case Zl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case is:return(e.displayName||"Context")+".Consumer";case us:return(e._context.displayName||"Context")+".Provider";case Yu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xu:return t=e.displayName||null,t!==null?t:Jl(e.type)||"Memo";case Ze:t=e._payload,e=e._init;try{return Jl(e(t))}catch{}}return null}function Oc(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Jl(t);case 8:return t===Ku?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ct(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ss(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mc(e){var t=ss(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,u.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rr(e){e._valueTracker||(e._valueTracker=Mc(e))}function as(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ss(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ql(e,t){var n=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ai(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ct(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cs(e,t){t=t.checked,t!=null&&Qu(e,"checked",t,!1)}function bl(e,t){cs(e,t);var n=ct(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?eu(e,t.type,n):t.hasOwnProperty("defaultValue")&&eu(e,t.type,ct(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function eu(e,t,n){(t!=="number"||Lr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wn=Array.isArray;function Qt(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=lr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var En={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dc=["Webkit","ms","Moz","O"];Object.keys(En).forEach(function(e){Dc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),En[t]=En[e]})});function ms(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||En.hasOwnProperty(e)&&En[e]?(""+t).trim():t+"px"}function hs(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=ms(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Fc=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ru(e,t){if(t){if(Fc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(y(62))}}function lu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var uu=null;function Gu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var iu=null,Kt=null,Yt=null;function Hi(e){if(e=Jn(e)){if(typeof iu!="function")throw Error(y(280));var t=e.stateNode;t&&(t=ul(t),iu(e.stateNode,e.type,t))}}function vs(e){Kt?Yt?Yt.push(e):Yt=[e]:Kt=e}function ys(){if(Kt){var e=Kt,t=Yt;if(Yt=Kt=null,Hi(e),t)for(e=0;e>>=0,e===0?32:31-(Yc(e)/Xc|0)|0}var ur=64,ir=4194304;function Sn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,u=e.pingedLanes,i=n&268435455;if(i!==0){var o=i&~l;o!==0?r=Sn(o):(u&=i,u!==0&&(r=Sn(u)))}else i=n&~l,i!==0?r=Sn(i):u!==0&&(r=Sn(u));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,u=t&-t,l>=u||l===16&&(u&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Gn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-je(t),e[t]=n}function qc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Cn),bi=" ",eo=!1;function Is(e,t){switch(e){case"keyup":return Pf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Us(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dt=!1;function Tf(e,t){switch(e){case"compositionend":return Us(t);case"keypress":return t.which!==32?null:(eo=!0,bi);case"textInput":return e=t.data,e===bi&&eo?null:e;default:return null}}function Lf(e,t){if(Dt)return e==="compositionend"||!ri&&Is(e,t)?(e=Ds(),kr=ei=et=null,Dt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lo(n)}}function Ws(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ws(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bs(){for(var e=window,t=Lr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lr(e.document)}return t}function li(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $f(e){var t=Bs(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ws(n.ownerDocument.documentElement,n)){if(r!==null&&li(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,u=Math.min(r.start,l);r=r.end===void 0?u:Math.min(r.end,l),!e.extend&&u>r&&(l=r,r=u,u=l),l=uo(n,u);var i=uo(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ft=null,du=null,Nn=null,pu=!1;function io(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;pu||Ft==null||Ft!==Lr(r)||(r=Ft,"selectionStart"in r&&li(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nn&&Un(Nn,r)||(Nn=r,r=Ir(du,"onSelect"),0$t||(e.current=wu[$t],wu[$t]=null,$t--)}function M(e,t){$t++,wu[$t]=e.current,e.current=t}var ft={},le=pt(ft),fe=pt(!1),_t=ft;function qt(e,t){var n=e.type.contextTypes;if(!n)return ft;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},u;for(u in n)l[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function de(e){return e=e.childContextTypes,e!=null}function $r(){F(fe),F(le)}function mo(e,t,n){if(le.current!==ft)throw Error(y(168));M(le,t),M(fe,n)}function qs(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(y(108,Oc(e)||"Unknown",l));return V({},n,r)}function Ar(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ft,_t=le.current,M(le,e),M(fe,fe.current),!0}function ho(e,t,n){var r=e.stateNode;if(!r)throw Error(y(169));n?(e=qs(e,t,_t),r.__reactInternalMemoizedMergedChildContext=e,F(fe),F(le),M(le,e)):F(fe),M(fe,n)}var Ae=null,il=!1,Fl=!1;function bs(e){Ae===null?Ae=[e]:Ae.push(e)}function Jf(e){il=!0,bs(e)}function mt(){if(!Fl&&Ae!==null){Fl=!0;var e=0,t=O;try{var n=Ae;for(O=1;e>=i,l-=i,Ve=1<<32-je(t)+l|n<P?(B=N,N=null):B=N.sibling;var j=p(f,N,d[P],v);if(j===null){N===null&&(N=B);break}e&&N&&j.alternate===null&&t(f,N),a=u(j,a,P),_===null?E=j:_.sibling=j,_=j,N=B}if(P===d.length)return n(f,N),U&&yt(f,P),E;if(N===null){for(;PP?(B=N,N=null):B=N.sibling;var Ne=p(f,N,j.value,v);if(Ne===null){N===null&&(N=B);break}e&&N&&Ne.alternate===null&&t(f,N),a=u(Ne,a,P),_===null?E=Ne:_.sibling=Ne,_=Ne,N=B}if(j.done)return n(f,N),U&&yt(f,P),E;if(N===null){for(;!j.done;P++,j=d.next())j=m(f,j.value,v),j!==null&&(a=u(j,a,P),_===null?E=j:_.sibling=j,_=j);return U&&yt(f,P),E}for(N=r(f,N);!j.done;P++,j=d.next())j=g(N,f,P,j.value,v),j!==null&&(e&&j.alternate!==null&&N.delete(j.key===null?P:j.key),a=u(j,a,P),_===null?E=j:_.sibling=j,_=j);return e&&N.forEach(function(sn){return t(f,sn)}),U&&yt(f,P),E}function I(f,a,d,v){if(typeof d=="object"&&d!==null&&d.type===Mt&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case nr:e:{for(var E=d.key,_=a;_!==null;){if(_.key===E){if(E=d.type,E===Mt){if(_.tag===7){n(f,_.sibling),a=l(_,d.props.children),a.return=f,f=a;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ze&&go(E)===_.type){n(f,_.sibling),a=l(_,d.props),a.ref=hn(f,_,d),a.return=f,f=a;break e}n(f,_);break}else t(f,_);_=_.sibling}d.type===Mt?(a=Ct(d.props.children,f.mode,v,d.key),a.return=f,f=a):(v=Tr(d.type,d.key,d.props,null,f.mode,v),v.ref=hn(f,a,d),v.return=f,f=v)}return i(f);case Ot:e:{for(_=d.key;a!==null;){if(a.key===_)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){n(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{n(f,a);break}else t(f,a);a=a.sibling}a=Hl(d,f.mode,v),a.return=f,f=a}return i(f);case Ze:return _=d._init,I(f,a,_(d._payload),v)}if(wn(d))return w(f,a,d,v);if(cn(d))return S(f,a,d,v);pr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(n(f,a.sibling),a=l(a,d),a.return=f,f=a):(n(f,a),a=Bl(d,f.mode,v),a.return=f,f=a),i(f)):n(f,a)}return I}var en=ra(!0),la=ra(!1),Br=pt(null),Hr=null,Wt=null,si=null;function ai(){si=Wt=Hr=null}function ci(e){var t=Br.current;F(Br),e._currentValue=t}function Eu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Gt(e,t){Hr=e,si=Wt=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ce=!0),e.firstContext=null)}function Ce(e){var t=e._currentValue;if(si!==e)if(e={context:e,memoizedValue:t,next:null},Wt===null){if(Hr===null)throw Error(y(308));Wt=e,Hr.dependencies={lanes:0,firstContext:e}}else Wt=Wt.next=e;return t}var kt=null;function fi(e){kt===null?kt=[e]:kt.push(e)}function ua(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,fi(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ke(e,r)}function Ke(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Je=!1;function di(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ia(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Be(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function it(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,R&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ke(e,n)}return l=r.interleaved,l===null?(t.next=t,fi(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ke(e,n)}function xr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ju(e,n)}}function wo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?l=u=i:u=u.next=i,n=n.next}while(n!==null);u===null?l=u=t:u=u.next=t}else l=u=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qr(e,t,n,r){var l=e.updateQueue;Je=!1;var u=l.firstBaseUpdate,i=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var s=o,c=s.next;s.next=null,i===null?u=c:i.next=c,i=s;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==i&&(o===null?h.firstBaseUpdate=c:o.next=c,h.lastBaseUpdate=s))}if(u!==null){var m=l.baseState;i=0,h=c=s=null,o=u;do{var p=o.lane,g=o.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:g,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var w=e,S=o;switch(p=t,g=n,S.tag){case 1:if(w=S.payload,typeof w=="function"){m=w.call(g,m,p);break e}m=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,p=typeof w=="function"?w.call(g,m,p):w,p==null)break e;m=V({},m,p);break e;case 2:Je=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[o]:p.push(o))}else g={eventTime:g,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(c=h=g,s=m):h=h.next=g,i|=p;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;p=o,o=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(h===null&&(s=m),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=h,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else u===null&&(l.shared.lanes=0);zt|=i,e.lanes=i,e.memoizedState=m}}function So(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ul.transition;Ul.transition={};try{e(!1),t()}finally{O=n,Ul.transition=r}}function xa(){return _e().memoizedState}function td(e,t,n){var r=st(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ca(e))_a(t,n);else if(n=ua(e,t,n,r),n!==null){var l=ie();Re(n,e,r,l),Na(n,t,r)}}function nd(e,t,n){var r=st(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ca(e))_a(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var i=t.lastRenderedState,o=u(i,n);if(l.hasEagerState=!0,l.eagerState=o,Oe(o,i)){var s=t.interleaved;s===null?(l.next=l,fi(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=ua(e,t,l,r),n!==null&&(l=ie(),Re(n,e,r,l),Na(n,t,r))}}function Ca(e){var t=e.alternate;return e===A||t!==null&&t===A}function _a(e,t){Pn=Yr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Na(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ju(e,n)}}var Xr={readContext:Ce,useCallback:te,useContext:te,useEffect:te,useImperativeHandle:te,useInsertionEffect:te,useLayoutEffect:te,useMemo:te,useReducer:te,useRef:te,useState:te,useDebugValue:te,useDeferredValue:te,useTransition:te,useMutableSource:te,useSyncExternalStore:te,useId:te,unstable_isNewReconciler:!1},rd={readContext:Ce,useCallback:function(e,t){return De().memoizedState=[e,t===void 0?null:t],e},useContext:Ce,useEffect:Eo,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_r(4194308,4,ga.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _r(4194308,4,e,t)},useInsertionEffect:function(e,t){return _r(4,2,e,t)},useMemo:function(e,t){var n=De();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=De();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=td.bind(null,A,e),[r.memoizedState,e]},useRef:function(e){var t=De();return e={current:e},t.memoizedState=e},useState:ko,useDebugValue:Si,useDeferredValue:function(e){return De().memoizedState=e},useTransition:function(){var e=ko(!1),t=e[0];return e=ed.bind(null,e[1]),De().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=A,l=De();if(U){if(n===void 0)throw Error(y(407));n=n()}else{if(n=t(),J===null)throw Error(y(349));Pt&30||ca(r,t,n)}l.memoizedState=n;var u={value:n,getSnapshot:t};return l.queue=u,Eo(da.bind(null,r,u,e),[e]),r.flags|=2048,Kn(9,fa.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=De(),t=J.identifierPrefix;if(U){var n=We,r=Ve;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Hn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Fe]=t,e[Vn]=r,Fa(e,t,!1,!1),t.stateNode=e;e:{switch(i=lu(n,r),n){case"dialog":D("cancel",e),D("close",e),l=r;break;case"iframe":case"object":case"embed":D("load",e),l=r;break;case"video":case"audio":for(l=0;lrn&&(t.flags|=128,r=!0,vn(u,!1),t.lanes=4194304)}else{if(!r)if(e=Kr(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vn(u,!0),u.tail===null&&u.tailMode==="hidden"&&!i.alternate&&!U)return ne(t),null}else 2*Q()-u.renderingStartTime>rn&&n!==1073741824&&(t.flags|=128,r=!0,vn(u,!1),t.lanes=4194304);u.isBackwards?(i.sibling=t.child,t.child=i):(n=u.last,n!==null?n.sibling=i:t.child=i,u.last=i)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Q(),t.sibling=null,n=$.current,M($,r?n&1|2:n&1),t):(ne(t),null);case 22:case 23:return Ni(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?me&1073741824&&(ne(t),t.subtreeFlags&6&&(t.flags|=8192)):ne(t),null;case 24:return null;case 25:return null}throw Error(y(156,t.tag))}function fd(e,t){switch(ii(t),t.tag){case 1:return de(t.type)&&$r(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tn(),F(fe),F(le),hi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mi(t),null;case 13:if(F($),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(y(340));bt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F($),null;case 4:return tn(),null;case 10:return ci(t.type._context),null;case 22:case 23:return Ni(),null;case 24:return null;default:return null}}var hr=!1,re=!1,dd=typeof WeakSet=="function"?WeakSet:Set,k=null;function Bt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){W(e,t,r)}else n.current=null}function ju(e,t,n){try{n()}catch(r){W(e,t,r)}}var Oo=!1;function pd(e,t){if(mu=Dr,e=Bs(),li(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var i=0,o=-1,s=-1,c=0,h=0,m=e,p=null;t:for(;;){for(var g;m!==n||l!==0&&m.nodeType!==3||(o=i+l),m!==u||r!==0&&m.nodeType!==3||(s=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break t;if(p===n&&++c===l&&(o=i),p===u&&++h===r&&(s=i),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}n=o===-1||s===-1?null:{start:o,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(hu={focusedElem:e,selectionRange:n},Dr=!1,k=t;k!==null;)if(t=k,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,k=e;else for(;k!==null;){t=k;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,I=w.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?S:ze(t.type,S),I);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){W(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,k=e;break}k=t.return}return w=Oo,Oo=!1,w}function zn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&ju(t,n,u)}l=l.next}while(l!==r)}}function al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ru(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $a(e){var t=e.alternate;t!==null&&(e.alternate=null,$a(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Fe],delete t[Vn],delete t[gu],delete t[Gf],delete t[Zf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Aa(e){return e.tag===5||e.tag===3||e.tag===4}function Mo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Aa(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ou(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ur));else if(r!==4&&(e=e.child,e!==null))for(Ou(e,t,n),e=e.sibling;e!==null;)Ou(e,t,n),e=e.sibling}function Mu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Mu(e,t,n),e=e.sibling;e!==null;)Mu(e,t,n),e=e.sibling}var q=null,Te=!1;function Ge(e,t,n){for(n=n.child;n!==null;)Va(e,t,n),n=n.sibling}function Va(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount=="function")try{Ie.onCommitFiberUnmount(tl,n)}catch{}switch(n.tag){case 5:re||Bt(n,t);case 6:var r=q,l=Te;q=null,Ge(e,t,n),q=r,Te=l,q!==null&&(Te?(e=q,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):q.removeChild(n.stateNode));break;case 18:q!==null&&(Te?(e=q,n=n.stateNode,e.nodeType===8?Dl(e.parentNode,n):e.nodeType===1&&Dl(e,n),Fn(e)):Dl(q,n.stateNode));break;case 4:r=q,l=Te,q=n.stateNode.containerInfo,Te=!0,Ge(e,t,n),q=r,Te=l;break;case 0:case 11:case 14:case 15:if(!re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var u=l,i=u.destroy;u=u.tag,i!==void 0&&(u&2||u&4)&&ju(n,t,i),l=l.next}while(l!==r)}Ge(e,t,n);break;case 1:if(!re&&(Bt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){W(n,t,o)}Ge(e,t,n);break;case 21:Ge(e,t,n);break;case 22:n.mode&1?(re=(r=re)||n.memoizedState!==null,Ge(e,t,n),re=r):Ge(e,t,n);break;default:Ge(e,t,n)}}function Do(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dd),t.forEach(function(r){var l=Ed.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Pe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~u}if(r=l,r=Q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hd(r/1960))-r,10e?16:e,tt===null)var r=!1;else{if(e=tt,tt=null,Jr=0,R&6)throw Error(y(331));var l=R;for(R|=4,k=e.current;k!==null;){var u=k,i=u.child;if(k.flags&16){var o=u.deletions;if(o!==null){for(var s=0;sQ()-Ci?xt(e,0):xi|=n),pe(e,t)}function Ga(e,t){t===0&&(e.mode&1?(t=ir,ir<<=1,!(ir&130023424)&&(ir=4194304)):t=1);var n=ie();e=Ke(e,t),e!==null&&(Gn(e,t,n),pe(e,n))}function kd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ga(e,n)}function Ed(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(t),Ga(e,n)}var Za;Za=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fe.current)ce=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ce=!1,ad(e,t,n);ce=!!(e.flags&131072)}else ce=!1,U&&t.flags&1048576&&ea(t,Wr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Nr(e,t),e=t.pendingProps;var l=qt(t,le.current);Gt(t,n),l=yi(null,t,r,e,l,n);var u=gi();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,de(r)?(u=!0,Ar(t)):u=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,di(t),l.updater=sl,t.stateNode=l,l._reactInternals=t,Cu(t,r,e,n),t=Pu(null,t,r,!0,u,n)):(t.tag=0,U&&u&&ui(t),ue(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Nr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Cd(r),e=ze(r,e),l){case 0:t=Nu(null,t,r,e,n);break e;case 1:t=Lo(null,t,r,e,n);break e;case 11:t=zo(null,t,r,e,n);break e;case 14:t=To(null,t,r,ze(r.type,e),n);break e}throw Error(y(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Nu(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Lo(e,t,r,l,n);case 3:e:{if(Oa(t),e===null)throw Error(y(387));r=t.pendingProps,u=t.memoizedState,l=u.element,ia(e,t),Qr(t,r,null,n);var i=t.memoizedState;if(r=i.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){l=nn(Error(y(423)),t),t=jo(e,t,r,n,l);break e}else if(r!==l){l=nn(Error(y(424)),t),t=jo(e,t,r,n,l);break e}else for(he=ut(t.stateNode.containerInfo.firstChild),ve=t,U=!0,Le=null,n=la(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bt(),r===l){t=Ye(e,t,n);break e}ue(e,t,r,n)}t=t.child}return t;case 5:return oa(t),e===null&&ku(t),r=t.type,l=t.pendingProps,u=e!==null?e.memoizedProps:null,i=l.children,vu(r,l)?i=null:u!==null&&vu(r,u)&&(t.flags|=32),Ra(e,t),ue(e,t,i,n),t.child;case 6:return e===null&&ku(t),null;case 13:return Ma(e,t,n);case 4:return pi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=en(t,null,r,n):ue(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),zo(e,t,r,l,n);case 7:return ue(e,t,t.pendingProps,n),t.child;case 8:return ue(e,t,t.pendingProps.children,n),t.child;case 12:return ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,u=t.memoizedProps,i=l.value,M(Br,r._currentValue),r._currentValue=i,u!==null)if(Oe(u.value,i)){if(u.children===l.children&&!fe.current){t=Ye(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var o=u.dependencies;if(o!==null){i=u.child;for(var s=o.firstContext;s!==null;){if(s.context===r){if(u.tag===1){s=Be(-1,n&-n),s.tag=2;var c=u.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s}}u.lanes|=n,s=u.alternate,s!==null&&(s.lanes|=n),Eu(u.return,n,t),o.lanes|=n;break}s=s.next}}else if(u.tag===10)i=u.type===t.type?null:u.child;else if(u.tag===18){if(i=u.return,i===null)throw Error(y(341));i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),Eu(i,n,t),i=u.sibling}else i=u.child;if(i!==null)i.return=u;else for(i=u;i!==null;){if(i===t){i=null;break}if(u=i.sibling,u!==null){u.return=i.return,i=u;break}i=i.return}u=i}ue(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Gt(t,n),l=Ce(l),r=r(l),t.flags|=1,ue(e,t,r,n),t.child;case 14:return r=t.type,l=ze(r,t.pendingProps),l=ze(r.type,l),To(e,t,r,l,n);case 15:return La(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Nr(e,t),t.tag=1,de(r)?(e=!0,Ar(t)):e=!1,Gt(t,n),Pa(t,r,l),Cu(t,r,l,n),Pu(null,t,r,!0,e,n);case 19:return Da(e,t,n);case 22:return ja(e,t,n)}throw Error(y(156,t.tag))};function Ja(e,t){return Cs(e,t)}function xd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ee(e,t,n,r){return new xd(e,t,n,r)}function zi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cd(e){if(typeof e=="function")return zi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Yu)return 11;if(e===Xu)return 14}return 2}function at(e,t){var n=e.alternate;return n===null?(n=Ee(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tr(e,t,n,r,l,u){var i=2;if(r=e,typeof e=="function")zi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Mt:return Ct(n.children,l,u,t);case Ku:i=8,l|=8;break;case Xl:return e=Ee(12,n,t,l|2),e.elementType=Xl,e.lanes=u,e;case Gl:return e=Ee(13,n,t,l),e.elementType=Gl,e.lanes=u,e;case Zl:return e=Ee(19,n,t,l),e.elementType=Zl,e.lanes=u,e;case os:return fl(n,l,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case us:i=10;break e;case is:i=9;break e;case Yu:i=11;break e;case Xu:i=14;break e;case Ze:i=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return t=Ee(i,n,t,l),t.elementType=e,t.type=r,t.lanes=u,t}function Ct(e,t,n,r){return e=Ee(7,e,r,t),e.lanes=n,e}function fl(e,t,n,r){return e=Ee(22,e,r,t),e.elementType=os,e.lanes=n,e.stateNode={isHidden:!1},e}function Bl(e,t,n){return e=Ee(6,e,null,t),e.lanes=n,e}function Hl(e,t,n){return t=Ee(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _d(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cl(0),this.expirationTimes=Cl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ti(e,t,n,r,l,u,i,o,s){return e=new _d(e,t,n,o,s),t===1?(t=1,u===!0&&(t|=8)):t=0,u=Ee(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},di(u),e}function Nd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tc)}catch(e){console.error(e)}}tc(),ts.exports=ge;var jd=ts.exports,Bo=jd;Kl.createRoot=Bo.createRoot,Kl.hydrateRoot=Bo.hydrateRoot;async function Ql(e,t){var n;try{const r=await fetch(`/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok)throw new Error(`HTTP ${r.status}: ${r.statusText}`);const l=await r.json();if(l.success!==void 0&&!l.success)throw new Error(((n=l.error)==null?void 0:n.message)||"Operation failed");return l}catch(r){throw console.error("API call failed:",r),r}}function Rd(){const[e,t]=wt.useState(null),[n,r]=wt.useState(!0),[l,u]=wt.useState(null);wt.useEffect(()=>{i()},[]);const i=async()=>{try{r(!0),u(null);const c=await Ql("status",{});t(c)}catch(c){u(c instanceof Error?c.message:"Failed to fetch status")}finally{r(!1)}},o=async()=>{try{u(null);const c=await Ql("api",{operation:"ListWallets",params:{},timestamp:Date.now()/1e3});console.log("ListWallets response:",c),alert("Check console for ListWallets response")}catch(c){u(c instanceof Error?c.message:"Failed to test permissions")}},s=async()=>{try{u(null);const c=await Ql("api",{operation:"CreateWallet",params:{name:"Test Wallet",chain_id:8453,encrypt:!1},timestamp:Date.now()/1e3});console.log("CreateWallet response:",c),alert("Check console for CreateWallet response")}catch(c){u(c instanceof Error?c.message:"Failed to create wallet")}};return n?C.jsx("div",{className:"container",children:C.jsx("div",{className:"loading",children:"Loading Hyperwallet Service..."})}):C.jsxs("div",{className:"container",children:[C.jsx("h1",{children:"🔐 Hyperwallet Service"}),l&&C.jsxs("div",{className:"error",children:[C.jsx("strong",{children:"Error:"})," ",l]}),e&&C.jsxs("div",{className:"card",children:[C.jsx("h2",{children:"Service Status"}),C.jsxs("div",{className:"status-grid",children:[C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Service"}),C.jsx("p",{children:e.service})]}),C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Version"}),C.jsx("p",{children:e.version})]}),C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Status"}),C.jsx("p",{style:{color:e.status==="running"?"#4CAF50":"#FF6B6B"},children:e.status})]}),C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Wallets"}),C.jsx("p",{children:e.wallets_count})]}),C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Permissions"}),C.jsx("p",{children:e.permissions_count})]}),C.jsxs("div",{className:"status-item",children:[C.jsx("h3",{children:"Chains"}),C.jsx("p",{children:e.chains_count})]})]}),C.jsxs("p",{children:[C.jsx("strong",{children:"Initialized:"})," ",new Date(e.initialized_at*1e3).toLocaleString()]}),C.jsxs("p",{children:[C.jsx("strong",{children:"Last Updated:"})," ",new Date(e.timestamp).toLocaleString()]})]}),C.jsxs("div",{className:"card",children:[C.jsx("h2",{children:"Test Operations"}),C.jsxs("div",{style:{display:"flex",gap:"10px",flexWrap:"wrap"},children:[C.jsx("button",{onClick:i,children:"Refresh Status"}),C.jsx("button",{onClick:o,children:"Test List Wallets"}),C.jsx("button",{onClick:s,children:"Test Create Wallet"})]})]}),C.jsxs("div",{className:"card",children:[C.jsx("h2",{children:"About Hyperwallet"}),C.jsx("p",{children:"Hyperwallet is a system-level wallet service for Hyperware that provides secure, permission-based wallet operations for all applications."}),C.jsx("h3",{children:"Features:"}),C.jsxs("ul",{children:[C.jsx("li",{children:"🔐 Secure wallet management with encryption"}),C.jsx("li",{children:"🎛️ Fine-grained permission system"}),C.jsx("li",{children:"⛓️ Multi-chain support (Ethereum, Base, etc.)"}),C.jsx("li",{children:"🗺️ Hypermap integration for identity management"}),C.jsx("li",{children:"🎯 Token Bound Account (TBA) operations"}),C.jsx("li",{children:"🔄 Inter-process communication API"})]}),C.jsx("h3",{children:"Permission Levels:"}),C.jsxs("ul",{children:[C.jsxs("li",{children:[C.jsx("strong",{children:"Read:"})," Query balances, transaction history"]}),C.jsxs("li",{children:[C.jsx("strong",{children:"Transact:"})," Send transactions (includes Read)"]}),C.jsxs("li",{children:[C.jsx("strong",{children:"Manage:"})," Create/import wallets (includes Transact)"]}),C.jsxs("li",{children:[C.jsx("strong",{children:"Admin:"})," Full control including wallet deletion"]})]})]})]})}Kl.createRoot(document.getElementById("root")).render(C.jsx(wc.StrictMode,{children:C.jsx(Rd,{})})); diff --git a/hyperdrive/packages/hyperwallet/ui/dist/index.html b/hyperdrive/packages/hyperwallet/ui/dist/index.html deleted file mode 100644 index b4c48f838..000000000 --- a/hyperdrive/packages/hyperwallet/ui/dist/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - Hyperwallet Service - - - - -
- - \ No newline at end of file From 6666b30fb077b375caa432b550727374517afac4 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 5 Aug 2025 16:21:31 -0700 Subject: [PATCH 2/4] hyperwallet: wit-ify --- .../packages/hyperwallet/api/hyperwallet.wit | 631 ++++++++++++++++++ ...lman.hypr-v0.wt => hyperwallet:sys-v0.wit} | 4 +- .../hyperwallet/hyperwallet/Cargo.toml | 14 +- .../hyperwallet/src/api/http_endpoints.rs | 9 +- .../hyperwallet/src/api/messages.rs | 2 +- .../hyperwallet/src/core/session.rs | 54 +- .../hyperwallet/src/core/transactions.rs | 8 +- .../hyperwallet/src/core/wallet_lifecycle.rs | 10 +- .../hyperwallet/src/core/wallet_queries.rs | 31 +- .../src/integrations/erc4337_operations.rs | 344 ++++++---- .../hyperwallet/src/integrations/hypermap.rs | 2 +- .../hyperwallet/src/integrations/mod.rs | 30 +- .../hyperwallet/hyperwallet/src/lib.rs | 55 +- .../hyperwallet/src/permissions/validator.rs | 2 +- 14 files changed, 967 insertions(+), 229 deletions(-) create mode 100644 hyperdrive/packages/hyperwallet/api/hyperwallet.wit rename hyperdrive/packages/hyperwallet/api/{hyperwallet:hallman.hypr-v0.wt => hyperwallet:sys-v0.wit} (53%) diff --git a/hyperdrive/packages/hyperwallet/api/hyperwallet.wit b/hyperdrive/packages/hyperwallet/api/hyperwallet.wit new file mode 100644 index 000000000..1e67bc3e8 --- /dev/null +++ b/hyperdrive/packages/hyperwallet/api/hyperwallet.wit @@ -0,0 +1,631 @@ +interface hyperwallet { + use standard.{address, process-id, node-id}; + + /// JSON is passed over Wasm boundary as a string + type json = string; + + /// Wallet address (Ethereum address) + type wallet-address = string; + + /// Chain ID for blockchain networks + type chain-id = u64; + + /// Session identifier + type session-id = string; + + /// User operation hash + type user-operation-hash = string; + + /// Cryptographic signature as bytes + type signature = list; + + /// Available operations in the Hyperwallet protocol + enum operation { + handshake, + unlock-wallet, + register-process, + update-spending-limits, + create-wallet, + import-wallet, + delete-wallet, + rename-wallet, + export-wallet, + encrypt-wallet, + decrypt-wallet, + get-wallet-info, + list-wallets, + set-wallet-limits, + send-eth, + send-token, + approve-token, + call-contract, + sign-transaction, + sign-message, + execute-via-tba, + check-tba-ownership, + setup-tba-delegation, + build-and-sign-user-operation-for-payment, + submit-user-operation, + build-user-operation, + sign-user-operation, + build-and-sign-user-operation, + estimate-user-operation-gas, + get-user-operation-receipt, + configure-paymaster, + resolve-identity, + create-note, + read-note, + setup-delegation, + verify-delegation, + mint-entry, + get-balance, + get-token-balance, + get-transaction-history, + estimate-gas, + get-gas-price, + get-transaction-receipt, + batch-operations, + schedule-operation, + cancel-operation, + } + + /// Categories of operations + enum operation-category { + system, + process-management, + wallet-management, + ethereum, + token-bound-account, + erc4337, + hypermap, + query, + advanced, + } + + /// Spending limits configuration + record spending-limits { + per-tx-eth: option, + daily-eth: option, + per-tx-usdc: option, + daily-usdc: option, + daily-reset-at: u64, + spent-today-eth: string, + spent-today-usdc: string, + } + + /// Process permissions + record process-permissions { + address: address, + allowed-operations: list, + spending-limits: option, + updatable-settings: list, + registered-at: u64, + } + + /// Settings that can be updated + enum updatable-setting { + spending-limits, + } + + /// Session information + record session-info { + server-version: string, + session-id: session-id, + registered-permissions: process-permissions, + initial-chain-id: chain-id, + } + + /// Handshake protocol steps + variant handshake-step { + client-hello(client-hello), + server-welcome(server-welcome), + register(register-request), + complete(complete-handshake), + } + + record client-hello { + client-version: string, + client-name: string, + } + + record server-welcome { + server-version: string, + supported-operations: list, + supported-chains: list, + features: list, + } + + record register-request { + required-operations: list, + spending-limits: option, + } + + record complete-handshake { + registered-permissions: process-permissions, + session-id: string, + } + + /// Main message structure + record hyperwallet-message { + request: hyperwallet-request, + session-id: session-id, + } + + /// All possible request types + variant hyperwallet-request { + // Session Management + handshake(handshake-step), + unlock-wallet(unlock-wallet-request), + + // Wallet Lifecycle Management + create-wallet(create-wallet-request), + import-wallet(import-wallet-request), + delete-wallet(delete-wallet-request), + rename-wallet(rename-wallet-request), + export-wallet(export-wallet-request), + list-wallets, + get-wallet-info(get-wallet-info-request), + + // Ethereum Operations + send-eth(send-eth-request), + send-token(send-token-request), + approve-token(approve-token-request), + get-balance(get-balance-request), + get-token-balance(get-token-balance-request), + call-contract(call-contract-request), + sign-transaction(sign-transaction-request), + sign-message(sign-message-request), + get-transaction-history(get-transaction-history-request), + estimate-gas(estimate-gas-request), + get-gas-price, + get-transaction-receipt(get-transaction-receipt-request), + + // Token Bound Account Operations + execute-via-tba(execute-via-tba-request), + check-tba-ownership(check-tba-ownership-request), + setup-tba-delegation(setup-tba-delegation-request), + + // Account Abstraction (ERC-4337) + build-and-sign-user-operation-for-payment(build-and-sign-user-operation-for-payment-request), + submit-user-operation(submit-user-operation-request), + get-user-operation-receipt(get-user-operation-receipt-request), + build-user-operation(build-user-operation-request), + sign-user-operation(sign-user-operation-request), + build-and-sign-user-operation(build-and-sign-user-operation-request), + estimate-user-operation-gas(estimate-user-operation-gas-request), + configure-paymaster(configure-paymaster-request), + + // Hypermap Operations + resolve-identity(resolve-identity-request), + create-note(create-note-request), + read-note(read-note-request), + setup-delegation(setup-delegation-request), + verify-delegation(verify-delegation-request), + mint-entry(mint-entry-request), + + // Process Management + update-spending-limits(update-spending-limits-request), + } + + /// Response structure + record hyperwallet-response { + success: bool, + data: option, + error: option, + request-id: option, + } + + /// Error information + record operation-error { + code: error-code, + message: string, + details: option, + } + + /// Error codes + enum error-code { + permission-denied, + wallet-not-found, + insufficient-funds, + invalid-operation, + invalid-params, + spending-limit-exceeded, + chain-not-allowed, + blockchain-error, + internal-error, + authentication-failed, + wallet-locked, + operation-not-supported, + version-mismatch, + } + + /// Response data variants + variant hyperwallet-response-data { + // Session Management + handshake(handshake-step), + unlock-wallet(unlock-wallet-response), + + // Wallet Lifecycle + create-wallet(create-wallet-response), + import-wallet(import-wallet-response), + delete-wallet(delete-wallet-response), + export-wallet(export-wallet-response), + + // Wallet Queries + list-wallets(list-wallets-response), + get-wallet-info(get-wallet-info-response), + get-balance(get-balance-response), + get-token-balance(get-token-balance-response), + + // Transactions + send-eth(send-eth-response), + send-token(send-token-response), + + // ERC4337 Account Abstraction + build-and-sign-user-operation-for-payment(build-and-sign-user-operation-response), + submit-user-operation(submit-user-operation-response), + get-user-operation-receipt(user-operation-receipt-response), + + // Hypermap + create-note(create-note-response), + + // Token Bound Accounts + execute-via-tba(execute-via-tba-response), + check-tba-ownership(check-tba-ownership-response), + } + + // Request types + + record unlock-wallet-request { + session-id: session-id, + wallet-id: string, + password: string, + } + + record create-wallet-request { + name: string, + password: option, + } + + record import-wallet-request { + name: string, + private-key: string, + password: option, + } + + record delete-wallet-request { + wallet-id: string, + } + + record rename-wallet-request { + wallet-id: string, + new-name: string, + } + + record export-wallet-request { + wallet-id: string, + password: option, + } + + record get-wallet-info-request { + wallet-id: string, + } + + record get-balance-request { + wallet-id: string, + } + + record send-eth-request { + wallet-id: string, + to: string, + amount: string, + } + + record send-token-request { + wallet-id: string, + token-address: string, + to: string, + amount: string, + } + + record approve-token-request { + token-address: string, + spender: string, + amount: string, + } + + record get-token-balance-request { + wallet-id: string, + token-address: string, + } + + record call-contract-request { + to: string, + data: string, + value: option, + } + + record sign-transaction-request { + to: string, + value: string, + data: option, + gas-limit: option, + gas-price: option, + nonce: option, + } + + record sign-message-request { + message: string, + message-type: message-type, + } + + variant message-type { + plain-text, + eip191, + eip712(eip712-data), + } + + record eip712-data { + domain: json, + types: json, + } + + record get-transaction-history-request { + limit: option, + offset: option, + from-block: option, + to-block: option, + } + + record estimate-gas-request { + to: string, + data: option, + value: option, + } + + record get-transaction-receipt-request { + tx-hash: string, + } + + record execute-via-tba-request { + tba-address: string, + target: string, + call-data: string, + value: option, + } + + record check-tba-ownership-request { + tba-address: string, + signer-address: string, + } + + record setup-tba-delegation-request { + tba-address: string, + delegate-address: string, + permissions: list, + } + + record build-and-sign-user-operation-for-payment-request { + eoa-wallet-id: string, + tba-address: string, + target: string, + call-data: string, + use-paymaster: bool, + paymaster-config: option, + password: option, + } + + record paymaster-config { + is-circle-paymaster: bool, + paymaster-address: string, + paymaster-verification-gas: string, + paymaster-post-op-gas: string, + } + + record submit-user-operation-request { + signed-user-operation: json, + entry-point: string, + bundler-url: option, + } + + record get-user-operation-receipt-request { + user-op-hash: string, + } + + record build-user-operation-request { + target: string, + call-data: string, + value: option, + } + + record sign-user-operation-request { + unsigned-user-operation: json, + entry-point: string, + } + + record build-and-sign-user-operation-request { + target: string, + call-data: string, + value: option, + entry-point: string, + } + + record estimate-user-operation-gas-request { + user-operation: json, + entry-point: string, + } + + record configure-paymaster-request { + paymaster-address: string, + paymaster-data: option, + verification-gas-limit: string, + post-op-gas-limit: string, + } + + record resolve-identity-request { + entry-name: string, + } + + record create-note-request { + note-data: json, + metadata: option, + } + + record read-note-request { + note-id: string, + } + + record setup-delegation-request { + delegate-address: string, + permissions: list, + expiry: option, + } + + record verify-delegation-request { + delegate-address: string, + signature: string, + message: string, + } + + record mint-entry-request { + entry-name: string, + metadata: json, + } + + record update-spending-limits-request { + new-limits: spending-limits, + } + + // Response types + + record unlock-wallet-response { + success: bool, + wallet-id: string, + message: string, + } + + record create-wallet-response { + wallet-id: string, + address: string, + name: string, + } + + record import-wallet-response { + wallet-id: string, + address: string, + name: string, + } + + record delete-wallet-response { + success: bool, + wallet-id: string, + message: string, + } + + record export-wallet-response { + address: string, + private-key: string, + } + + record get-wallet-info-response { + wallet-id: string, + address: string, + name: string, + chain-id: chain-id, + is-locked: bool, + } + + record list-wallets-response { + process: string, + wallets: list, + total: u64, + } + + record wallet { + address: wallet-address, + name: option, + chain-id: chain-id, + encrypted: bool, + created-at: option, + last-used: option, + spending-limits: option, + } + + record wallet-spending-limits { + max-per-call: option, + max-total: option, + currency: string, + total-spent: string, + set-at: option, + updated-at: option, + } + + record get-balance-response { + balance: balance, + wallet-id: string, + chain-id: chain-id, + } + + record balance { + formatted: string, + raw: string, + } + + record get-token-balance-response { + balance: string, + formatted: option, + decimals: option, + } + + record send-eth-response { + tx-hash: string, + from-address: string, + to-address: string, + amount: string, + chain-id: chain-id, + } + + record send-token-response { + tx-hash: string, + from-address: string, + to-address: string, + token-address: string, + amount: string, + chain-id: chain-id, + } + + record build-and-sign-user-operation-response { + signed-user-operation: json, + entry-point: string, + ready-to-submit: bool, + } + + record submit-user-operation-response { + user-op-hash: string, + } + + record user-operation-receipt-response { + receipt: option, + user-op-hash: string, + status: string, + } + + record create-note-response { + note-id: string, + content-hash: string, + created-at: u64, + } + + record execute-via-tba-response { + tx-hash: string, + tba-address: string, + target-address: string, + success: bool, + } + + record check-tba-ownership-response { + tba-address: string, + owner-address: string, + is-owned: bool, + } +} diff --git a/hyperdrive/packages/hyperwallet/api/hyperwallet:hallman.hypr-v0.wt b/hyperdrive/packages/hyperwallet/api/hyperwallet:sys-v0.wit similarity index 53% rename from hyperdrive/packages/hyperwallet/api/hyperwallet:hallman.hypr-v0.wt rename to hyperdrive/packages/hyperwallet/api/hyperwallet:sys-v0.wit index 0ab573bdf..c4de97479 100644 --- a/hyperdrive/packages/hyperwallet/api/hyperwallet:hallman.hypr-v0.wt +++ b/hyperdrive/packages/hyperwallet/api/hyperwallet:sys-v0.wit @@ -1,4 +1,4 @@ -world hyperwallet-hallman-dot-hypr-v0 { +world hyperwallet-sys-v0 { import hyperwallet; include process-v1; -} \ No newline at end of file +} diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml b/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml index b9ec34cd8..268866175 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml +++ b/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml @@ -5,18 +5,18 @@ edition = "2021" publish = false [dependencies] +alloy-primitives = "0.7" +alloy-sol-types = "0.7" anyhow = "1.0" -hyperware_process_lib = { path = "../../../../../process_lib", features = ["logging"] } -#hyperware_process_lib = { git = "https://github.com/hyperware-ai/process_lib", branch = "hyperwallet-client_lib", features = ["logging"] } +base64ct = "=1.6.0" +chrono = { version = "0.4", features = ["serde"] } +hyperware_process_lib = { path = "../../../../../process_lib", features = ["hyperwallet", "logging"] } +#hyperware_process_lib = { git = "https://github.com/hyperware-ai/process_lib", branch = "hyperwallet-client_lib", features = ["hyperwallet", "logging"] } process_macros = "0.1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -wit-bindgen = "0.36.0" -base64ct = "=1.6.0" -chrono = { version = "0.4", features = ["serde"] } -alloy-primitives = "0.7" -alloy-sol-types = "0.7" url = "2.5" +wit-bindgen = "0.36.0" [lib] crate-type = ["cdylib"] diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/api/http_endpoints.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/api/http_endpoints.rs index c6104fe43..82ce2be2c 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/api/http_endpoints.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/api/http_endpoints.rs @@ -4,14 +4,9 @@ /// with the Hyperwallet service via HTTP requests. use crate::state::HyperwalletState; -use crate::api::messages::execute_message; -use hyperware_process_lib::hyperwallet_client::types::{ - HyperwalletMessage, HyperwalletResponse, OperationError -}; use hyperware_process_lib::http::server::HttpServerRequest; -use hyperware_process_lib::http::Method; -use hyperware_process_lib::logging::{info, error}; -use hyperware_process_lib::{Address, Response}; +use hyperware_process_lib::logging::info; +use hyperware_process_lib::Address; pub fn handle_http_request( server_request: HttpServerRequest, diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/api/messages.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/api/messages.rs index ff0f3500e..0c773841b 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/api/messages.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/api/messages.rs @@ -4,7 +4,7 @@ /// the appropriate core business logic or external integrations. use crate::state::HyperwalletState; use hyperware_process_lib::hyperwallet_client::types::{ - HyperwalletMessage, HyperwalletRequest, HyperwalletResponse, HyperwalletResponseData, + HyperwalletMessage, HyperwalletRequest, HyperwalletResponse, OperationError, }; use hyperware_process_lib::logging::{error, info}; diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/session.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/session.rs index 95724495b..ed616b55e 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/session.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/session.rs @@ -1,4 +1,4 @@ -use crate::permissions::{ProcessPermissions, SpendingLimits, UpdatableSetting}; +use crate::permissions::definitions::{ProcessPermissions, SpendingLimits, UpdatableSetting}; use crate::state::HyperwalletState; use hyperware_process_lib::hyperwallet_client::types::{ HandshakeStep, HyperwalletResponse, HyperwalletResponseData, Operation, @@ -17,16 +17,12 @@ pub fn handle_handshake_step( info!("Received handshake request {:?} from {:?}", step, source); match &step { - HandshakeStep::ClientHello { - client_version, - client_name, - } => handle_client_hello(client_version.clone(), client_name.clone(), state), - HandshakeStep::Register { - required_operations, - spending_limits, - } => handle_register( - required_operations.clone(), - spending_limits.clone(), + HandshakeStep::ClientHello(hello) => { + handle_client_hello(hello.client_version.clone(), hello.client_name.clone(), state) + } + HandshakeStep::Register(reg) => handle_register( + reg.required_operations.clone(), + reg.spending_limits.clone(), source, state, ), @@ -70,17 +66,19 @@ fn handle_client_hello( 1 ); - HyperwalletResponse::success(HyperwalletResponseData::Handshake(HandshakeStep::ServerWelcome { - server_version: env!("CARGO_PKG_VERSION").to_string(), - supported_operations, - supported_chains: vec![8453], // Base - features: vec![ - "spending_limits".to_string(), - "session_management".to_string(), - "erc4337".to_string(), - "gasless_payments".to_string(), - ], - })) + HyperwalletResponse::success(HyperwalletResponseData::Handshake(HandshakeStep::ServerWelcome( + hyperware_process_lib::hyperwallet_client::types::ServerWelcome { + server_version: env!("CARGO_PKG_VERSION").to_string(), + supported_operations, + supported_chains: vec![8453], // Base + features: vec![ + "spending_limits".to_string(), + "session_management".to_string(), + "erc4337".to_string(), + "gasless_payments".to_string(), + ], + } + ))) } fn handle_register( @@ -126,15 +124,17 @@ fn handle_register( session_id ); - HyperwalletResponse::success(HyperwalletResponseData::Handshake(HandshakeStep::Complete { - session_id, - registered_permissions: permissions, - })) + HyperwalletResponse::success(HyperwalletResponseData::Handshake(HandshakeStep::Complete( + hyperware_process_lib::hyperwallet_client::types::CompleteHandshake { + session_id, + registered_permissions: permissions, + } + ))) } pub fn handle_unlock_wallet( req: UnlockWalletRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &mut HyperwalletState, ) -> HyperwalletResponse { diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/transactions.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/transactions.rs index cd0c70a51..fef513820 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/transactions.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/transactions.rs @@ -10,14 +10,14 @@ use crate::config::DEFAULT_CHAIN_ID; use crate::state::{HyperwalletState, KeyStorage, Wallet}; use hyperware_process_lib::hyperwallet_client::types::{ HyperwalletResponse, HyperwalletResponseData, OperationError, SessionId, - SendEthRequest, SendEthResponse, SendTokenRequest, SendTokenResponse, ExecuteViaTbaRequest, ExecuteViaTbaResponse, + SendEthRequest, SendEthResponse, SendTokenRequest, SendTokenResponse, }; use hyperware_process_lib::eth::Provider; use hyperware_process_lib::wallet::{self, EthAmount, erc20_transfer}; use hyperware_process_lib::signer::{LocalSigner, Signer}; use hyperware_process_lib::logging::info; use hyperware_process_lib::Address; -use serde_json::{json, Value}; +use serde_json::Value; use alloy_primitives::U256; pub fn get_signer_from_wallet( @@ -65,7 +65,7 @@ pub fn sign_hash( pub fn send_eth( req: SendEthRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &mut HyperwalletState, ) -> HyperwalletResponse { @@ -135,7 +135,7 @@ pub fn send_eth( pub fn send_token( req: SendTokenRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &mut HyperwalletState, ) -> HyperwalletResponse { diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_lifecycle.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_lifecycle.rs index 726f40578..22b4e7925 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_lifecycle.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_lifecycle.rs @@ -16,7 +16,7 @@ use hyperware_process_lib::Address; pub fn create_wallet( req: CreateWalletRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &mut HyperwalletState, ) -> HyperwalletResponse { @@ -70,7 +70,7 @@ pub fn create_wallet( pub fn import_wallet( req: ImportWalletRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &mut HyperwalletState, ) -> HyperwalletResponse { @@ -131,7 +131,7 @@ pub fn import_wallet( pub fn delete_wallet( req: DeleteWalletRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &mut HyperwalletState, ) -> HyperwalletResponse { @@ -161,7 +161,7 @@ pub fn delete_wallet( pub fn rename_wallet( req: RenameWalletRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &mut HyperwalletState, ) -> HyperwalletResponse { @@ -194,7 +194,7 @@ pub fn rename_wallet( pub fn export_wallet( req: ExportWalletRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &mut HyperwalletState, ) -> HyperwalletResponse { diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_queries.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_queries.rs index 56d58a2fa..b29beca40 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_queries.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/core/wallet_queries.rs @@ -16,11 +16,10 @@ use hyperware_process_lib::hyperwallet_client::types::{ use hyperware_process_lib::eth::Provider; use hyperware_process_lib::wallet; use hyperware_process_lib::Address; -use serde_json::json; pub fn get_balance( req: GetBalanceRequest, - session_id: &SessionId, + _session_id: &SessionId, source: &Address, state: &HyperwalletState, ) -> HyperwalletResponse { @@ -54,35 +53,37 @@ pub fn get_balance( } pub fn list_wallets( - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &HyperwalletState, ) -> HyperwalletResponse { - let wallets: Vec<_> = state + let wallets: Vec = state .list_wallets(address) .into_iter() .map(|wallet| { - json!({ - "address": wallet.address, - "name": wallet.name, - "chain_id": wallet.chain_id, - "created_at": wallet.created_at, - "encrypted": matches!(wallet.key_storage, crate::state::KeyStorage::Encrypted(_)) - }) + Wallet { + address: wallet.address.clone(), + name: wallet.name.clone(), + chain_id: wallet.chain_id, + encrypted: matches!(wallet.key_storage, crate::state::KeyStorage::Encrypted(_)), + created_at: Some(wallet.created_at.to_rfc3339()), + last_used: wallet.last_used.map(|dt| dt.to_rfc3339()), + spending_limits: None, + } }) .collect(); let wallet_count = wallets.len(); HyperwalletResponse::success(HyperwalletResponseData::ListWallets(ListWalletsResponse { process: address.to_string(), - wallets: wallets.into_iter().map(|w| serde_json::from_value(w).unwrap()).collect(), - total: wallet_count, + wallets, + total: wallet_count as u64, })) } pub fn get_wallet_info( req: GetWalletInfoRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &HyperwalletState, ) -> HyperwalletResponse { @@ -104,7 +105,7 @@ pub fn get_wallet_info( pub fn get_token_balance( req: GetTokenBalanceRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &HyperwalletState, ) -> HyperwalletResponse { diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/erc4337_operations.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/erc4337_operations.rs index 8936511b4..4a97a05c1 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/erc4337_operations.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/erc4337_operations.rs @@ -1,9 +1,9 @@ use hyperware_process_lib::hyperwallet_client::types::{ - HyperwalletResponse, HyperwalletResponseData, OperationError, SessionId, BuildAndSignUserOperationForPaymentRequest, BuildAndSignUserOperationResponse, - SubmitUserOperationRequest, SubmitUserOperationResponse, - GetUserOperationReceiptRequest, UserOperationReceiptResponse, - PaymasterConfig}; + GetUserOperationReceiptRequest, HyperwalletResponse, HyperwalletResponseData, OperationError, + PaymasterConfig, SessionId, SubmitUserOperationRequest, SubmitUserOperationResponse, + UserOperationReceiptResponse, +}; use hyperware_process_lib::Address; // TODO: These are legacy types - need to be migrated to new typed approach #[derive(serde::Serialize, serde::Deserialize)] @@ -28,7 +28,7 @@ impl OperationResponse { error: None, } } - + pub fn error(error: OperationError) -> Self { Self { success: false, @@ -36,48 +36,51 @@ impl OperationResponse { error: Some(error), } } - + // Helper to convert from HyperwalletResponse to OperationResponse - pub fn from_hyperwallet_response(response: hyperware_process_lib::hyperwallet_client::types::HyperwalletResponse) -> Self { + pub fn from_hyperwallet_response( + response: hyperware_process_lib::hyperwallet_client::types::HyperwalletResponse, + ) -> Self { if response.success { if let Some(data) = response.data { match serde_json::to_value(data) { Ok(json_data) => Self::success(json_data), - Err(_) => Self::error(OperationError::internal_error("Failed to serialize response data")) + Err(_) => Self::error(OperationError::internal_error( + "Failed to serialize response data", + )), } } else { Self::success(serde_json::Value::Null) } } else { - Self::error(response.error.unwrap_or_else(|| - OperationError::internal_error("Unknown error") - )) + Self::error( + response + .error + .unwrap_or_else(|| OperationError::internal_error("Unknown error")), + ) } } } +use crate::core::transactions::get_signer_from_wallet; +use crate::integrations::erc4337_bundler as bundler; use crate::state::HyperwalletState; -use crate::core::transactions::{get_signer_from_wallet, sign_hash}; -use hyperware_process_lib::wallet::{ - UserOperationBuilder, UserOperation, PackedUserOperation, - get_known_paymaster, get_entry_point_address, - encode_usdc_paymaster_data, create_tba_userop_calldata, - resolve_token_symbol, +use alloy_primitives::{hex, Bytes as AlloyBytes, FixedBytes}; +use hyperware_process_lib::eth::Provider; +use hyperware_process_lib::eth::{ + Address as EthAddress, TransactionInput, TransactionRequest, U256, }; -use hyperware_process_lib::eth::{Address as EthAddress, U256, TransactionRequest, TransactionInput}; -use hyperware_process_lib::logging::{info, error, warn}; +use hyperware_process_lib::logging::{error, info}; use hyperware_process_lib::signer::Signer; -use alloy_primitives::{hex, Bytes as AlloyBytes, FixedBytes}; +use hyperware_process_lib::wallet::{get_entry_point_address, PackedUserOperation}; use serde::Deserialize; -use serde_json::{json, Value}; +use serde_json::json; use std::str::FromStr; -use hyperware_process_lib::eth::Provider; -use crate::integrations::erc4337_bundler as bundler; use crate::config::DEFAULT_CHAIN_ID; pub fn build_and_sign_user_operation_for_payment( request: BuildAndSignUserOperationForPaymentRequest, - session_id: &SessionId, + _session_id: &SessionId, address: &Address, state: &HyperwalletState, ) -> HyperwalletResponse { @@ -93,11 +96,27 @@ pub fn build_and_sign_user_operation_for_payment( let nonce = match fetch_nonce(&provider, sender, entry_point) { Ok(n) => n, - Err(e) => return HyperwalletResponse::error(OperationError::internal_error(&format!("Failed to fetch nonce: {}", e.error.as_ref().map(|e| &e.message).unwrap_or(&"Unknown error".to_string())))), + Err(e) => { + return HyperwalletResponse::error(OperationError::internal_error(&format!( + "Failed to fetch nonce: {}", + e.error + .as_ref() + .map(|e| &e.message) + .unwrap_or(&"Unknown error".to_string()) + ))) + } }; let (max_fee_per_gas, max_priority_fee_per_gas) = match fetch_gas_prices(&provider) { Ok(fees) => fees, - Err(e) => return HyperwalletResponse::error(OperationError::internal_error(&format!("Failed to fetch gas prices: {}", e.error.as_ref().map(|e| &e.message).unwrap_or(&"Unknown error".to_string())))), + Err(e) => { + return HyperwalletResponse::error(OperationError::internal_error(&format!( + "Failed to fetch gas prices: {}", + e.error + .as_ref() + .map(|e| &e.message) + .unwrap_or(&"Unknown error".to_string()) + ))) + } }; let mut call_gas_limit = U256::from(300_000); @@ -106,7 +125,12 @@ pub fn build_and_sign_user_operation_for_payment( let call_data_bytes = match parse_hex(&request.call_data) { Ok(bytes) => bytes, - Err(e) => return HyperwalletResponse::error(e.error.unwrap_or_else(|| OperationError::invalid_params("Failed to parse call data"))), + Err(e) => { + return HyperwalletResponse::error( + e.error + .unwrap_or_else(|| OperationError::invalid_params("Failed to parse call data")), + ) + } }; // Capture paymaster config early to avoid moving it @@ -118,7 +142,11 @@ pub fn build_and_sign_user_operation_for_payment( let config = paymaster_config.as_ref().unwrap_or(&default_config); match build_circle_paymaster_data(config) { Ok(data) => data, - Err(e) => return HyperwalletResponse::error(e.error.unwrap_or_else(|| OperationError::invalid_params("Failed to build paymaster data"))), + Err(e) => { + return HyperwalletResponse::error(e.error.unwrap_or_else(|| { + OperationError::invalid_params("Failed to build paymaster data") + })) + } } } else { Vec::new() @@ -126,13 +154,23 @@ pub fn build_and_sign_user_operation_for_payment( let wallet_info = match state.get_wallet(address, &request.eoa_wallet_id) { Some(info) => info, - None => return HyperwalletResponse::error(OperationError::invalid_params("Wallet not found")), + None => { + return HyperwalletResponse::error(OperationError::invalid_params("Wallet not found")) + } }; - let password_value = request.password.as_ref().map(|s| serde_json::Value::String(s.clone())); + let password_value = request + .password + .as_ref() + .map(|s| serde_json::Value::String(s.clone())); let signer = match get_signer_from_wallet(wallet_info, password_value.as_ref()) { Ok(s) => s, - Err(e) => return HyperwalletResponse::error(e.error.unwrap_or_else(|| OperationError::internal_error("Failed to get signer"))), + Err(e) => { + return HyperwalletResponse::error( + e.error + .unwrap_or_else(|| OperationError::internal_error("Failed to get signer")), + ) + } }; let estimation_request = match build_estimation_request( @@ -151,24 +189,32 @@ pub fn build_and_sign_user_operation_for_payment( &paymaster_config, ) { Ok(req) => req, - Err(e) => return HyperwalletResponse::error(e.error.unwrap_or_else(|| OperationError::invalid_params("Failed to build estimation request"))), + Err(e) => { + return HyperwalletResponse::error(e.error.unwrap_or_else(|| { + OperationError::invalid_params("Failed to build estimation request") + })) + } }; - - let gas_estimates = bundler::estimate_user_operation_gas(estimation_request, entry_point.to_string()) - .unwrap_or_default(); + + let gas_estimates = + bundler::estimate_user_operation_gas(estimation_request, entry_point.to_string()) + .unwrap_or_default(); // Update gas limits - call_gas_limit = gas_estimates.get("callGasLimit") + call_gas_limit = gas_estimates + .get("callGasLimit") .and_then(|v| v.as_str()) .and_then(|s| parse_u256(s).ok()) .map(|gas| gas + U256::from(10000)) .unwrap_or(call_gas_limit); - verification_gas_limit = gas_estimates.get("verificationGasLimit") + verification_gas_limit = gas_estimates + .get("verificationGasLimit") .and_then(|v| v.as_str()) .and_then(|s| parse_u256(s).ok()) - .map(|gas| gas + U256::from(25000)) // Increased buffer for Candide requirements + .map(|gas| gas + U256::from(25000)) // Increased buffer for Candide requirements .unwrap_or(verification_gas_limit); - pre_verification_gas = gas_estimates.get("preVerificationGas") + pre_verification_gas = gas_estimates + .get("preVerificationGas") .and_then(|v| v.as_str()) .and_then(|s| parse_u256(s).ok()) .map(|gas| gas + U256::from(5000)) @@ -188,7 +234,12 @@ pub fn build_and_sign_user_operation_for_payment( ); let signature = match sign_user_op(&provider, &user_op, entry_point, &signer) { Ok(sig) => sig, - Err(e) => return HyperwalletResponse::error(e.error.unwrap_or_else(|| OperationError::internal_error("Failed to sign UserOp"))), + Err(e) => { + return HyperwalletResponse::error( + e.error + .unwrap_or_else(|| OperationError::internal_error("Failed to sign UserOp")), + ) + } }; let signed_user_op = PackedUserOperation { @@ -196,14 +247,17 @@ pub fn build_and_sign_user_operation_for_payment( ..user_op }; - info!("Built and signed UserOperation for payment from TBA {}", signed_user_op.sender); + info!( + "Built and signed UserOperation for payment from TBA {}", + signed_user_op.sender + ); // Return response - unpack the gas limits for Candide compatibility let verification_gas_limit = U256::from_be_slice(&signed_user_op.accountGasLimits[0..16]); let call_gas_limit = U256::from_be_slice(&signed_user_op.accountGasLimits[16..32]); let max_priority_fee_per_gas = U256::from_be_slice(&signed_user_op.gasFees[0..16]); let max_fee_per_gas = U256::from_be_slice(&signed_user_op.gasFees[16..32]); - + let signed_user_op_json = serde_json::json!({ "sender": signed_user_op.sender.to_string(), "nonce": format!("0x{:x}", signed_user_op.nonce), @@ -218,38 +272,56 @@ pub fn build_and_sign_user_operation_for_payment( "factoryData": serde_json::Value::Null, "paymaster": "0x0578cFB241215b77442a541325d6A4E6dFE700Ec", "paymasterVerificationGasLimit": "0x7a120", - "paymasterPostOpGasLimit": "0x493e0", + "paymasterPostOpGasLimit": "0x493e0", "paymasterData": "0x" }); - + let response_data = BuildAndSignUserOperationResponse { - signed_user_operation: signed_user_op_json, + signed_user_operation: signed_user_op_json.to_string(), entry_point: entry_point.to_string(), ready_to_submit: true, }; - - HyperwalletResponse::success(HyperwalletResponseData::BuildAndSignUserOperationForPayment(response_data)) + + HyperwalletResponse::success( + HyperwalletResponseData::BuildAndSignUserOperationForPayment(response_data), + ) } fn parse_hex(hex: &str) -> Result, OperationResponse> { - hex::decode(hex.trim_start_matches("0x")).map_err(|_| OperationResponse::error(OperationError::invalid_params("Invalid hex string"))) + hex::decode(hex.trim_start_matches("0x")) + .map_err(|_| OperationResponse::error(OperationError::invalid_params("Invalid hex string"))) } -fn fetch_nonce(provider: &Provider, sender: EthAddress, entry_point: EthAddress) -> Result { - fetch_nonce_from_entry_point(provider, sender, entry_point) - .map_err(|e| OperationResponse::error(OperationError::internal_error(&format!("Failed to fetch nonce: {}", e)))) +fn fetch_nonce( + provider: &Provider, + sender: EthAddress, + entry_point: EthAddress, +) -> Result { + fetch_nonce_from_entry_point(provider, sender, entry_point).map_err(|e| { + OperationResponse::error(OperationError::internal_error(&format!( + "Failed to fetch nonce: {}", + e + ))) + }) } fn fetch_gas_prices(provider: &Provider) -> Result<(U256, U256), OperationResponse> { fetch_dynamic_gas_prices(provider) .map(|(max_fee, priority_fee)| (U256::from(max_fee), U256::from(priority_fee))) - .map_err(|e| OperationResponse::error(OperationError::internal_error(&format!("Failed to fetch gas prices: {}", e)))) + .map_err(|e| { + OperationResponse::error(OperationError::internal_error(&format!( + "Failed to fetch gas prices: {}", + e + ))) + }) } fn build_circle_paymaster_data(config: &PaymasterConfig) -> Result, OperationResponse> { let paymaster_bytes = parse_hex(&config.paymaster_address)?; if paymaster_bytes.len() != 20 { - return Err(OperationResponse::error(OperationError::invalid_params("Paymaster address must be 20 bytes"))); + return Err(OperationResponse::error(OperationError::invalid_params( + "Paymaster address must be 20 bytes", + ))); } let verif_gas = parse_u256(&config.paymaster_verification_gas)?; let post_op_gas = parse_u256(&config.paymaster_post_op_gas)?; @@ -261,8 +333,9 @@ fn build_circle_paymaster_data(config: &PaymasterConfig) -> Result, Oper } fn parse_u256(hex: &str) -> Result { - U256::from_str_radix(hex.trim_start_matches("0x"), 16) - .map_err(|_| OperationResponse::error(OperationError::invalid_params("Invalid U256 hex string"))) + U256::from_str_radix(hex.trim_start_matches("0x"), 16).map_err(|_| { + OperationResponse::error(OperationError::invalid_params("Invalid U256 hex string")) + }) } fn build_estimation_request( @@ -296,12 +369,16 @@ fn build_estimation_request( Ok(h) => h, Err(e) => return Err(OperationResponse::error(OperationError::internal_error(&e))), }; - + let signature = match signer.sign_hash(&hash) { Ok(sig) => sig, - Err(e) => return Err(OperationResponse::error(OperationError::internal_error(&format!("Failed to sign: {}", e)))), + Err(e) => { + return Err(OperationResponse::error(OperationError::internal_error( + &format!("Failed to sign: {}", e), + ))) + } }; - + let default_config = PaymasterConfig::default(); let config = paymaster_config.as_ref().unwrap_or(&default_config); Ok(serde_json::json!({ @@ -359,10 +436,18 @@ fn sign_user_op( entry_point: EthAddress, signer: &impl Signer, ) -> Result, OperationResponse> { - let hash = get_user_op_hash(provider, user_op, entry_point) - .map_err(|e| OperationResponse::error(OperationError::internal_error(&format!("Failed to get UserOp hash: {}", e))))?; - signer.sign_hash(&hash) - .map_err(|e| OperationResponse::error(OperationError::internal_error(&format!("Failed to sign UserOp: {}", e)))) + let hash = get_user_op_hash(provider, user_op, entry_point).map_err(|e| { + OperationResponse::error(OperationError::internal_error(&format!( + "Failed to get UserOp hash: {}", + e + ))) + })?; + signer.sign_hash(&hash).map_err(|e| { + OperationResponse::error(OperationError::internal_error(&format!( + "Failed to sign UserOp: {}", + e + ))) + }) } fn build_response( @@ -375,13 +460,13 @@ fn build_response( if use_paymaster { let default_config = PaymasterConfig::default(); let config = paymaster_config.as_ref().unwrap_or(&default_config); - + // Extract gas limits from packed format let verification_gas_limit = U256::from_be_slice(&signed_user_op.accountGasLimits[0..16]); let call_gas_limit = U256::from_be_slice(&signed_user_op.accountGasLimits[16..32]); let max_priority_fee_per_gas = U256::from_be_slice(&signed_user_op.gasFees[0..16]); let max_fee_per_gas = U256::from_be_slice(&signed_user_op.gasFees[16..32]); - + OperationResponse::success(json!({ "signed_user_operation": { "sender": signed_user_op.sender.to_string(), @@ -433,19 +518,27 @@ pub struct SubmitUserOpParams { pub fn submit_user_operation( req: SubmitUserOperationRequest, - session_id: &SessionId, + _session_id: &SessionId, ) -> HyperwalletResponse { info!("Submitting UserOperation to bundler ^^"); - - match bundler::submit_user_operation( - req.signed_user_operation.clone(), - req.entry_point.clone(), - ) { + + // Parse the signed user operation from string to JSON Value + let user_op_json = match serde_json::from_str(&req.signed_user_operation) { + Ok(json) => json, + Err(e) => { + return HyperwalletResponse::error(OperationError::invalid_params(&format!( + "Invalid JSON in signed_user_operation: {}", + e + ))); + } + }; + + match bundler::submit_user_operation(user_op_json, req.entry_point.clone()) { Ok(user_op_hash) => { info!("UserOperation submitted successfully: {}", user_op_hash); - HyperwalletResponse::success(HyperwalletResponseData::SubmitUserOperation(SubmitUserOperationResponse { - user_op_hash, - })) + HyperwalletResponse::success(HyperwalletResponseData::SubmitUserOperation( + SubmitUserOperationResponse { user_op_hash }, + )) } Err(e) => { error!("Failed to submit UserOperation: {:?}", e); @@ -456,18 +549,20 @@ pub fn submit_user_operation( pub fn get_user_operation_receipt( req: GetUserOperationReceiptRequest, - session_id: &SessionId, + _session_id: &SessionId, ) -> HyperwalletResponse { info!("Getting UserOperation receipt"); - + match bundler::get_user_operation_receipt(req.user_op_hash.clone()) { Ok(receipt_data) => { info!("UserOperation receipt retrieved successfully"); - HyperwalletResponse::success(HyperwalletResponseData::GetUserOperationReceipt(UserOperationReceiptResponse { - user_op_hash: req.user_op_hash.clone(), - status: "success".to_string(), - receipt: Some(receipt_data), - })) + HyperwalletResponse::success(HyperwalletResponseData::GetUserOperationReceipt( + UserOperationReceiptResponse { + user_op_hash: req.user_op_hash.clone(), + status: "success".to_string(), + receipt: Some(receipt_data.to_string()), + }, + )) } Err(e) => { error!("Failed to get UserOperation receipt: {:?}", e); @@ -482,59 +577,53 @@ fn fetch_nonce_from_entry_point( entry_point: EthAddress, ) -> Result { use alloy_sol_types::*; - use hyperware_process_lib::eth::{TransactionRequest, TransactionInput}; - + use hyperware_process_lib::eth::{TransactionInput, TransactionRequest}; + sol! { function getNonce(address sender, uint192 key) external view returns (uint256 nonce); } - + let get_nonce_call = getNonceCall { sender: sender.to_string().parse().map_err(|_| "Invalid address")?, key: alloy_primitives::U256::ZERO, // Nonce key 0 }; - + let nonce_call_data = get_nonce_call.abi_encode(); let nonce_tx_req = TransactionRequest::default() .input(TransactionInput::new(nonce_call_data.into())) .to(entry_point); - + match provider.call(nonce_tx_req, None) { Ok(bytes) => { let decoded = U256::from_be_slice(&bytes); Ok(decoded) } - Err(e) => { - Err(format!("Failed to fetch nonce: {}", e)) - } + Err(e) => Err(format!("Failed to fetch nonce: {}", e)), } } fn fetch_dynamic_gas_prices(provider: &Provider) -> Result<(u128, u128), String> { use hyperware_process_lib::eth::BlockNumberOrTag; - + match provider.get_block_by_number(BlockNumberOrTag::Latest, false) { Ok(Some(block)) => { let base_fee = block.header.inner.base_fee_per_gas.unwrap_or(1_000_000_000) as u128; - + // Calculate priority fee first (at least 0.1 gwei, or 10% of base fee) let priority_fee = std::cmp::max(100_000_000u128, base_fee / 10); - + // Calculate max fee to ensure: maxFeePerGas >= maxPriorityFeePerGas + baseFee + buffer // Formula: maxFee = baseFee + priorityFee + buffer let buffer = std::cmp::max(base_fee / 4, 50_000_000u128); // At least 25% of base fee or 0.05 gwei buffer let max_fee = base_fee + priority_fee + buffer; - + // Ensure max_fee is reasonable (cap at 100 gwei to avoid extreme gas spikes) let max_fee = std::cmp::min(max_fee, 100_000_000_000u128); - + Ok((max_fee, priority_fee)) } - Ok(None) => { - Err("No latest block found".to_string()) - } - Err(e) => { - Err(format!("Failed to get latest block: {}", e)) - } + Ok(None) => Err("No latest block found".to_string()), + Err(e) => Err(format!("Failed to get latest block: {}", e)), } } @@ -552,17 +641,17 @@ fn get_user_op_hash_for_estimation( entry_point: EthAddress, ) -> Result, String> { use alloy_sol_types::*; - + // Pack gas limits into accountGasLimits (verificationGasLimit << 128 | callGasLimit) let mut account_gas_limits = [0u8; 32]; account_gas_limits[..16].copy_from_slice(&verification_gas_limit.to_be_bytes::<32>()[16..]); account_gas_limits[16..].copy_from_slice(&call_gas_limit.to_be_bytes::<32>()[16..]); - + // Pack gas fees (maxPriorityFeePerGas << 128 | maxFeePerGas) let mut gas_fees = [0u8; 32]; gas_fees[..16].copy_from_slice(&max_priority_fee_per_gas.to_be_bytes::<32>()[16..]); gas_fees[16..].copy_from_slice(&max_fee_per_gas.to_be_bytes::<32>()[16..]); - + // Define the PackedUserOperation type and getUserOpHash function sol! { struct PackedUserOperation { @@ -576,10 +665,10 @@ fn get_user_op_hash_for_estimation( bytes paymasterAndData; bytes signature; } - + function getUserOpHash(PackedUserOperation userOp) external view returns (bytes32); } - + // Create the PackedUserOperation instance for the ABI call let packed_user_op = PackedUserOperation { sender: sender.to_string().parse().map_err(|_| "Invalid address")?, @@ -592,25 +681,28 @@ fn get_user_op_hash_for_estimation( paymasterAndData: AlloyBytes::from(paymaster_data.to_vec()), signature: AlloyBytes::new(), // Empty for hash calculation }; - + // Create the function call let get_hash_call = getUserOpHashCall { userOp: packed_user_op, }; - + // Encode the call let call_data = get_hash_call.abi_encode(); - + // Create transaction request to call EntryPoint.getUserOpHash() let tx_req = TransactionRequest::default() .input(TransactionInput::new(call_data.into())) .to(entry_point); - + // Make the call to get the hash match provider.call(tx_req, None) { Ok(bytes) => { - info!("Got UserOp hash from EntryPoint for estimation: 0x{}", hex::encode(&bytes)); - + info!( + "Got UserOp hash from EntryPoint for estimation: 0x{}", + hex::encode(&bytes) + ); + // Decode the result (should be 32 bytes - the hash) if bytes.len() == 32 { Ok(bytes.to_vec()) @@ -625,9 +717,7 @@ fn get_user_op_hash_for_estimation( } } } - Err(e) => { - Err(format!("Failed to call EntryPoint.getUserOpHash(): {}", e)) - } + Err(e) => Err(format!("Failed to call EntryPoint.getUserOpHash(): {}", e)), } } @@ -638,7 +728,7 @@ fn get_user_op_hash( entry_point: EthAddress, ) -> Result, String> { use alloy_sol_types::*; - + // Define the PackedUserOperation type and getUserOpHash function sol! { struct PackedUserOperation { @@ -652,13 +742,17 @@ fn get_user_op_hash( bytes paymasterAndData; bytes signature; } - + function getUserOpHash(PackedUserOperation userOp) external view returns (bytes32); } - + // Create the PackedUserOperation instance for the ABI call let packed_user_op = PackedUserOperation { - sender: user_op.sender.to_string().parse().map_err(|_| "Invalid address")?, + sender: user_op + .sender + .to_string() + .parse() + .map_err(|_| "Invalid address")?, nonce: user_op.nonce, initCode: AlloyBytes::from(user_op.initCode.to_vec()), callData: AlloyBytes::from(user_op.callData.to_vec()), @@ -668,25 +762,25 @@ fn get_user_op_hash( paymasterAndData: AlloyBytes::from(user_op.paymasterAndData.to_vec()), signature: AlloyBytes::new(), // Empty for hash calculation }; - + // Create the function call let get_hash_call = getUserOpHashCall { userOp: packed_user_op, }; - + // Encode the call let call_data = get_hash_call.abi_encode(); - + // Create transaction request to call EntryPoint.getUserOpHash() let tx_req = TransactionRequest::default() .input(TransactionInput::new(call_data.into())) .to(entry_point); - + // Make the call to get the hash match provider.call(tx_req, None) { Ok(bytes) => { info!("Got UserOp hash from EntryPoint: 0x{}", hex::encode(&bytes)); - + // Decode the result (should be 32 bytes - the hash) if bytes.len() == 32 { Ok(bytes.to_vec()) @@ -701,8 +795,6 @@ fn get_user_op_hash( } } } - Err(e) => { - Err(format!("Failed to call EntryPoint.getUserOpHash(): {}", e)) - } + Err(e) => Err(format!("Failed to call EntryPoint.getUserOpHash(): {}", e)), } -} \ No newline at end of file +} diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/hypermap.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/hypermap.rs index 57034e8f8..c2a209c06 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/hypermap.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/hypermap.rs @@ -1,7 +1,7 @@ /// Hypermap and TBA operations using process_lib's high-level functions use crate::config::DEFAULT_CHAIN_ID; -use hyperware_process_lib::hyperwallet_client::types::{OperationError, HyperwalletRequest,CheckTbaOwnershipRequest, CheckTbaOwnershipResponse}; +use hyperware_process_lib::hyperwallet_client::types::OperationError; // TODO: These are legacy types - need to be migrated to new typed approach #[derive(serde::Serialize, serde::Deserialize)] diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/mod.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/mod.rs index 23f551f6a..a8aa54c5f 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/mod.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/integrations/mod.rs @@ -6,7 +6,29 @@ pub mod erc4337_bundler; pub mod erc4337_operations; pub mod hypermap; -// Re-export for convenience -pub use erc4337_bundler::*; -pub use erc4337_operations::*; -pub use hypermap::*; +// Re-export specific items to avoid conflicts +// From erc4337_bundler +pub use erc4337_bundler::{ + submit_user_operation as bundler_submit_user_operation, + get_user_operation_receipt as bundler_get_user_operation_receipt, +}; + +// From erc4337_operations +pub use erc4337_operations::{ + build_and_sign_user_operation_for_payment, + submit_user_operation, + get_user_operation_receipt, + OperationRequest as Erc4337OperationRequest, +}; + +// From hypermap +pub use hypermap::{ + OperationRequest as HypermapOperationRequest, + OperationResponse as HypermapOperationResponse, + resolve_identity, + create_note, + execute_via_tba, +}; + +// Re-export PaymasterConfig from hyperwallet_client::types +pub use hyperware_process_lib::hyperwallet_client::types::PaymasterConfig; diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/lib.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/lib.rs index aa6aafce8..c099fcb66 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/lib.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/lib.rs @@ -2,23 +2,23 @@ pub mod config; pub mod permissions; pub mod state; +pub mod api; pub mod core; pub mod integrations; -pub mod api; -use config::*; use api::terminal_commands::{MessageHandler, TerminalHandler}; -use permissions::PermissionValidator; +use config::*; use hyperware_process_lib::homepage::add_to_homepage; use hyperware_process_lib::http::server::{HttpBindingConfig, HttpServer}; +use hyperware_process_lib::hyperwallet_client::types::HyperwalletMessage; use hyperware_process_lib::logging::{error, info, init_logging, Level}; use hyperware_process_lib::{await_message, call_init, Address, Message, Response}; -use hyperware_process_lib::hyperwallet_client::types::HyperwalletMessage; +use permissions::PermissionValidator; use state::HyperwalletState; wit_bindgen::generate!({ path: "../target/wit", - world: "process-v1", + world: "hyperwallet-sys-v0", generate_unused_types: true, additional_derives: [serde::Deserialize, serde::Serialize, process_macros::SerdeJsonInto], }); @@ -26,7 +26,10 @@ wit_bindgen::generate!({ call_init!(init); fn init(our: Address) { init_logging(Level::DEBUG, Level::INFO, None, None, None).unwrap(); - info!("Initializing {} v{} for: {}", SERVICE_NAME, SERVICE_VERSION, our.node); + info!( + "Initializing {} v{} for: {}", + SERVICE_NAME, SERVICE_VERSION, our.node + ); let mut state = HyperwalletState::initialize(); let mut http_server = match init_http() { @@ -39,13 +42,13 @@ fn init(our: Address) { return; } }; - + let terminal_handler = TerminalHandler::new(); let permission_validator = PermissionValidator::new(); info!("{} Service initialized successfully!", SERVICE_NAME); info!("Entering main message loop..."); - + loop { if let Err(e) = handle_message( &our, @@ -71,16 +74,14 @@ fn handle_message( let message = await_message()?; match message { - Message::Request { source, body, .. } => { - route_request( - our, - &source, - body, - state, - terminal_handler, - permission_validator, - ) - } + Message::Request { source, body, .. } => route_request( + our, + &source, + body, + state, + terminal_handler, + permission_validator, + ), Message::Response { source, body, @@ -103,25 +104,21 @@ fn route_request( match process.as_str() { "http-server:distro:sys" => { - let server_request: hyperware_process_lib::http::server::HttpServerRequest = + let server_request: hyperware_process_lib::http::server::HttpServerRequest = serde_json::from_slice(&body)?; api::http_endpoints::handle_http_request(server_request, source, state) - }, + } _ if pkg == "terminal:sys" => terminal_handler.handle(source, body, state), _ => { let message: HyperwalletMessage = serde_json::from_slice(&body)?; - let response = permission_validator.execute_with_permissions( - message, - source, - state, - ); - + let response = permission_validator.execute_with_permissions(message, source, state); + Response::new() .body(serde_json::to_vec(&response)?) .send()?; - + Ok(()) - }, + } } } @@ -142,7 +139,7 @@ fn init_http() -> anyhow::Result { add_to_homepage(SERVICE_NAME, Some(ICON), Some("/"), None); http_server.serve_ui("ui", vec!["/"], http_config.clone())?; - + let endpoints = vec![ "/api/operation".to_string(), "/api/status".to_string(), diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/src/permissions/validator.rs b/hyperdrive/packages/hyperwallet/hyperwallet/src/permissions/validator.rs index 7403b580c..e8c3a7783 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/src/permissions/validator.rs +++ b/hyperdrive/packages/hyperwallet/hyperwallet/src/permissions/validator.rs @@ -1,6 +1,6 @@ /// Permission validation logic -use hyperware_process_lib::hyperwallet_client::types::{OperationError, HyperwalletMessage, HyperwalletRequest, HyperwalletResponse, HyperwalletResponseData}; +use hyperware_process_lib::hyperwallet_client::types::{OperationError, HyperwalletMessage, HyperwalletRequest, HyperwalletResponse}; use hyperware_process_lib::hyperwallet_client::types::Operation; use hyperware_process_lib::Address; use crate::permissions::operation_requires_wallet; From 89e15781dd8e8fb7fc57ef087a865e8a8533dc8f Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 5 Aug 2025 16:22:57 -0700 Subject: [PATCH 3/4] hyperwallet: use proper deps --- hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml b/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml index 268866175..da7e47d52 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml +++ b/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml @@ -10,13 +10,12 @@ alloy-sol-types = "0.7" anyhow = "1.0" base64ct = "=1.6.0" chrono = { version = "0.4", features = ["serde"] } -hyperware_process_lib = { path = "../../../../../process_lib", features = ["hyperwallet", "logging"] } -#hyperware_process_lib = { git = "https://github.com/hyperware-ai/process_lib", branch = "hyperwallet-client_lib", features = ["hyperwallet", "logging"] } +hyperware_process_lib = { git = "https://github.com/hyperware-ai/process_lib", rev = "ac4d308", features = ["hyperwallet", "logging"] } process_macros = "0.1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" url = "2.5" -wit-bindgen = "0.36.0" +wit-bindgen = "0.42.1" [lib] crate-type = ["cdylib"] From 56d238a64d44dbadd11a433936692e598bfde83e Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 5 Aug 2025 16:36:16 -0700 Subject: [PATCH 4/4] hyperwallet: consolidate wit --- hyperdrive/packages/hyperwallet/Cargo.lock | 175 ++++- .../packages/hyperwallet/api/hyperwallet.wit | 631 ----------------- .../hyperwallet/api/hyperwallet:sys-v0.wit | 632 ++++++++++++++++++ .../hyperwallet/hyperwallet/Cargo.toml | 2 +- 4 files changed, 791 insertions(+), 649 deletions(-) delete mode 100644 hyperdrive/packages/hyperwallet/api/hyperwallet.wit diff --git a/hyperdrive/packages/hyperwallet/Cargo.lock b/hyperdrive/packages/hyperwallet/Cargo.lock index 734dc66d3..815549124 100644 --- a/hyperdrive/packages/hyperwallet/Cargo.lock +++ b/hyperdrive/packages/hyperwallet/Cargo.lock @@ -1768,12 +1768,13 @@ dependencies = [ "serde", "serde_json", "url", - "wit-bindgen", + "wit-bindgen 0.42.1", ] [[package]] name = "hyperware_process_lib" version = "1.2.0" +source = "git+https://github.com/hyperware-ai/process_lib?rev=4764ce3#4764ce3dd090d3e7de7a43cd479001c26f450cd4" dependencies = [ "alloy", "alloy-primitives 0.8.25", @@ -1797,7 +1798,7 @@ dependencies = [ "tracing-error", "tracing-subscriber", "url", - "wit-bindgen", + "wit-bindgen 0.36.0", ] [[package]] @@ -2079,6 +2080,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "libc" version = "0.2.174" @@ -3800,7 +3807,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e913f9242315ca39eff82aee0e19ee7a372155717ff0eb082c741e435ce25ed1" dependencies = [ "leb128", - "wasmparser", + "wasmparser 0.220.1", +] + +[[package]] +name = "wasm-encoder" +version = "0.230.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4349d0943718e6e434b51b9639e876293093dca4b96384fb136ab5bd5ce6660" +dependencies = [ + "leb128fmt", + "wasmparser 0.230.0", ] [[package]] @@ -3815,8 +3832,20 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.220.1", + "wasmparser 0.220.1", +] + +[[package]] +name = "wasm-metadata" +version = "0.230.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a52e010df5494f4289ccc68ce0c2a8c17555225a5e55cc41b98f5ea28d0844b" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder 0.230.0", + "wasmparser 0.230.0", ] [[package]] @@ -3832,6 +3861,18 @@ dependencies = [ "semver 1.0.26", ] +[[package]] +name = "wasmparser" +version = "0.230.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808198a69b5a0535583370a51d459baa14261dfab04800c4864ee9e1a14346ed" +dependencies = [ + "bitflags", + "hashbrown 0.15.4", + "indexmap", + "semver 1.0.26", +] + [[package]] name = "wasmtimer" version = "0.4.2" @@ -4100,7 +4141,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" dependencies = [ "wit-bindgen-rt 0.36.0", - "wit-bindgen-rust-macro", + "wit-bindgen-rust-macro 0.36.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa5b79cd8cb4b27a9be3619090c03cbb87fe7b1c6de254b4c9b4477188828af8" +dependencies = [ + "wit-bindgen-rt 0.42.1", + "wit-bindgen-rust-macro 0.42.1", ] [[package]] @@ -4111,7 +4162,18 @@ checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" dependencies = [ "anyhow", "heck", - "wit-parser", + "wit-parser 0.220.1", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35e550f614e16db196e051d22b0d4c94dd6f52c90cb1016240f71b9db332631" +dependencies = [ + "anyhow", + "heck", + "wit-parser 0.230.0", ] [[package]] @@ -4132,6 +4194,17 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051105bab12bc78e161f8dfb3596e772dd6a01ebf9c4840988e00347e744966a" +dependencies = [ + "bitflags", + "futures", + "once_cell", +] + [[package]] name = "wit-bindgen-rust" version = "0.36.0" @@ -4143,9 +4216,25 @@ dependencies = [ "indexmap", "prettyplease", "syn 2.0.104", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "wasm-metadata 0.220.1", + "wit-bindgen-core 0.36.0", + "wit-component 0.220.1", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb1e0a91fc85f4ef70e0b81cd86c2b49539d3cd14766fd82396184aadf8cb7d7" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn 2.0.104", + "wasm-metadata 0.230.0", + "wit-bindgen-core 0.42.1", + "wit-component 0.230.0", ] [[package]] @@ -4159,8 +4248,23 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.104", - "wit-bindgen-core", - "wit-bindgen-rust", + "wit-bindgen-core 0.36.0", + "wit-bindgen-rust 0.36.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce69f52c5737705881d5da5a1dd06f47f8098d094a8d65a3e44292942edb571f" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.104", + "wit-bindgen-core 0.42.1", + "wit-bindgen-rust 0.42.1", ] [[package]] @@ -4176,10 +4280,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", + "wasm-encoder 0.220.1", + "wasm-metadata 0.220.1", + "wasmparser 0.220.1", + "wit-parser 0.220.1", +] + +[[package]] +name = "wit-component" +version = "0.230.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b607b15ead6d0e87f5d1613b4f18c04d4e80ceeada5ffa608d8360e6909881df" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.230.0", + "wasm-metadata 0.230.0", + "wasmparser 0.230.0", + "wit-parser 0.230.0", ] [[package]] @@ -4197,7 +4320,25 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.220.1", +] + +[[package]] +name = "wit-parser" +version = "0.230.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "679fde5556495f98079a8e6b9ef8c887f731addaffa3d48194075c1dd5cd611b" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver 1.0.26", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.230.0", ] [[package]] diff --git a/hyperdrive/packages/hyperwallet/api/hyperwallet.wit b/hyperdrive/packages/hyperwallet/api/hyperwallet.wit deleted file mode 100644 index 1e67bc3e8..000000000 --- a/hyperdrive/packages/hyperwallet/api/hyperwallet.wit +++ /dev/null @@ -1,631 +0,0 @@ -interface hyperwallet { - use standard.{address, process-id, node-id}; - - /// JSON is passed over Wasm boundary as a string - type json = string; - - /// Wallet address (Ethereum address) - type wallet-address = string; - - /// Chain ID for blockchain networks - type chain-id = u64; - - /// Session identifier - type session-id = string; - - /// User operation hash - type user-operation-hash = string; - - /// Cryptographic signature as bytes - type signature = list; - - /// Available operations in the Hyperwallet protocol - enum operation { - handshake, - unlock-wallet, - register-process, - update-spending-limits, - create-wallet, - import-wallet, - delete-wallet, - rename-wallet, - export-wallet, - encrypt-wallet, - decrypt-wallet, - get-wallet-info, - list-wallets, - set-wallet-limits, - send-eth, - send-token, - approve-token, - call-contract, - sign-transaction, - sign-message, - execute-via-tba, - check-tba-ownership, - setup-tba-delegation, - build-and-sign-user-operation-for-payment, - submit-user-operation, - build-user-operation, - sign-user-operation, - build-and-sign-user-operation, - estimate-user-operation-gas, - get-user-operation-receipt, - configure-paymaster, - resolve-identity, - create-note, - read-note, - setup-delegation, - verify-delegation, - mint-entry, - get-balance, - get-token-balance, - get-transaction-history, - estimate-gas, - get-gas-price, - get-transaction-receipt, - batch-operations, - schedule-operation, - cancel-operation, - } - - /// Categories of operations - enum operation-category { - system, - process-management, - wallet-management, - ethereum, - token-bound-account, - erc4337, - hypermap, - query, - advanced, - } - - /// Spending limits configuration - record spending-limits { - per-tx-eth: option, - daily-eth: option, - per-tx-usdc: option, - daily-usdc: option, - daily-reset-at: u64, - spent-today-eth: string, - spent-today-usdc: string, - } - - /// Process permissions - record process-permissions { - address: address, - allowed-operations: list, - spending-limits: option, - updatable-settings: list, - registered-at: u64, - } - - /// Settings that can be updated - enum updatable-setting { - spending-limits, - } - - /// Session information - record session-info { - server-version: string, - session-id: session-id, - registered-permissions: process-permissions, - initial-chain-id: chain-id, - } - - /// Handshake protocol steps - variant handshake-step { - client-hello(client-hello), - server-welcome(server-welcome), - register(register-request), - complete(complete-handshake), - } - - record client-hello { - client-version: string, - client-name: string, - } - - record server-welcome { - server-version: string, - supported-operations: list, - supported-chains: list, - features: list, - } - - record register-request { - required-operations: list, - spending-limits: option, - } - - record complete-handshake { - registered-permissions: process-permissions, - session-id: string, - } - - /// Main message structure - record hyperwallet-message { - request: hyperwallet-request, - session-id: session-id, - } - - /// All possible request types - variant hyperwallet-request { - // Session Management - handshake(handshake-step), - unlock-wallet(unlock-wallet-request), - - // Wallet Lifecycle Management - create-wallet(create-wallet-request), - import-wallet(import-wallet-request), - delete-wallet(delete-wallet-request), - rename-wallet(rename-wallet-request), - export-wallet(export-wallet-request), - list-wallets, - get-wallet-info(get-wallet-info-request), - - // Ethereum Operations - send-eth(send-eth-request), - send-token(send-token-request), - approve-token(approve-token-request), - get-balance(get-balance-request), - get-token-balance(get-token-balance-request), - call-contract(call-contract-request), - sign-transaction(sign-transaction-request), - sign-message(sign-message-request), - get-transaction-history(get-transaction-history-request), - estimate-gas(estimate-gas-request), - get-gas-price, - get-transaction-receipt(get-transaction-receipt-request), - - // Token Bound Account Operations - execute-via-tba(execute-via-tba-request), - check-tba-ownership(check-tba-ownership-request), - setup-tba-delegation(setup-tba-delegation-request), - - // Account Abstraction (ERC-4337) - build-and-sign-user-operation-for-payment(build-and-sign-user-operation-for-payment-request), - submit-user-operation(submit-user-operation-request), - get-user-operation-receipt(get-user-operation-receipt-request), - build-user-operation(build-user-operation-request), - sign-user-operation(sign-user-operation-request), - build-and-sign-user-operation(build-and-sign-user-operation-request), - estimate-user-operation-gas(estimate-user-operation-gas-request), - configure-paymaster(configure-paymaster-request), - - // Hypermap Operations - resolve-identity(resolve-identity-request), - create-note(create-note-request), - read-note(read-note-request), - setup-delegation(setup-delegation-request), - verify-delegation(verify-delegation-request), - mint-entry(mint-entry-request), - - // Process Management - update-spending-limits(update-spending-limits-request), - } - - /// Response structure - record hyperwallet-response { - success: bool, - data: option, - error: option, - request-id: option, - } - - /// Error information - record operation-error { - code: error-code, - message: string, - details: option, - } - - /// Error codes - enum error-code { - permission-denied, - wallet-not-found, - insufficient-funds, - invalid-operation, - invalid-params, - spending-limit-exceeded, - chain-not-allowed, - blockchain-error, - internal-error, - authentication-failed, - wallet-locked, - operation-not-supported, - version-mismatch, - } - - /// Response data variants - variant hyperwallet-response-data { - // Session Management - handshake(handshake-step), - unlock-wallet(unlock-wallet-response), - - // Wallet Lifecycle - create-wallet(create-wallet-response), - import-wallet(import-wallet-response), - delete-wallet(delete-wallet-response), - export-wallet(export-wallet-response), - - // Wallet Queries - list-wallets(list-wallets-response), - get-wallet-info(get-wallet-info-response), - get-balance(get-balance-response), - get-token-balance(get-token-balance-response), - - // Transactions - send-eth(send-eth-response), - send-token(send-token-response), - - // ERC4337 Account Abstraction - build-and-sign-user-operation-for-payment(build-and-sign-user-operation-response), - submit-user-operation(submit-user-operation-response), - get-user-operation-receipt(user-operation-receipt-response), - - // Hypermap - create-note(create-note-response), - - // Token Bound Accounts - execute-via-tba(execute-via-tba-response), - check-tba-ownership(check-tba-ownership-response), - } - - // Request types - - record unlock-wallet-request { - session-id: session-id, - wallet-id: string, - password: string, - } - - record create-wallet-request { - name: string, - password: option, - } - - record import-wallet-request { - name: string, - private-key: string, - password: option, - } - - record delete-wallet-request { - wallet-id: string, - } - - record rename-wallet-request { - wallet-id: string, - new-name: string, - } - - record export-wallet-request { - wallet-id: string, - password: option, - } - - record get-wallet-info-request { - wallet-id: string, - } - - record get-balance-request { - wallet-id: string, - } - - record send-eth-request { - wallet-id: string, - to: string, - amount: string, - } - - record send-token-request { - wallet-id: string, - token-address: string, - to: string, - amount: string, - } - - record approve-token-request { - token-address: string, - spender: string, - amount: string, - } - - record get-token-balance-request { - wallet-id: string, - token-address: string, - } - - record call-contract-request { - to: string, - data: string, - value: option, - } - - record sign-transaction-request { - to: string, - value: string, - data: option, - gas-limit: option, - gas-price: option, - nonce: option, - } - - record sign-message-request { - message: string, - message-type: message-type, - } - - variant message-type { - plain-text, - eip191, - eip712(eip712-data), - } - - record eip712-data { - domain: json, - types: json, - } - - record get-transaction-history-request { - limit: option, - offset: option, - from-block: option, - to-block: option, - } - - record estimate-gas-request { - to: string, - data: option, - value: option, - } - - record get-transaction-receipt-request { - tx-hash: string, - } - - record execute-via-tba-request { - tba-address: string, - target: string, - call-data: string, - value: option, - } - - record check-tba-ownership-request { - tba-address: string, - signer-address: string, - } - - record setup-tba-delegation-request { - tba-address: string, - delegate-address: string, - permissions: list, - } - - record build-and-sign-user-operation-for-payment-request { - eoa-wallet-id: string, - tba-address: string, - target: string, - call-data: string, - use-paymaster: bool, - paymaster-config: option, - password: option, - } - - record paymaster-config { - is-circle-paymaster: bool, - paymaster-address: string, - paymaster-verification-gas: string, - paymaster-post-op-gas: string, - } - - record submit-user-operation-request { - signed-user-operation: json, - entry-point: string, - bundler-url: option, - } - - record get-user-operation-receipt-request { - user-op-hash: string, - } - - record build-user-operation-request { - target: string, - call-data: string, - value: option, - } - - record sign-user-operation-request { - unsigned-user-operation: json, - entry-point: string, - } - - record build-and-sign-user-operation-request { - target: string, - call-data: string, - value: option, - entry-point: string, - } - - record estimate-user-operation-gas-request { - user-operation: json, - entry-point: string, - } - - record configure-paymaster-request { - paymaster-address: string, - paymaster-data: option, - verification-gas-limit: string, - post-op-gas-limit: string, - } - - record resolve-identity-request { - entry-name: string, - } - - record create-note-request { - note-data: json, - metadata: option, - } - - record read-note-request { - note-id: string, - } - - record setup-delegation-request { - delegate-address: string, - permissions: list, - expiry: option, - } - - record verify-delegation-request { - delegate-address: string, - signature: string, - message: string, - } - - record mint-entry-request { - entry-name: string, - metadata: json, - } - - record update-spending-limits-request { - new-limits: spending-limits, - } - - // Response types - - record unlock-wallet-response { - success: bool, - wallet-id: string, - message: string, - } - - record create-wallet-response { - wallet-id: string, - address: string, - name: string, - } - - record import-wallet-response { - wallet-id: string, - address: string, - name: string, - } - - record delete-wallet-response { - success: bool, - wallet-id: string, - message: string, - } - - record export-wallet-response { - address: string, - private-key: string, - } - - record get-wallet-info-response { - wallet-id: string, - address: string, - name: string, - chain-id: chain-id, - is-locked: bool, - } - - record list-wallets-response { - process: string, - wallets: list, - total: u64, - } - - record wallet { - address: wallet-address, - name: option, - chain-id: chain-id, - encrypted: bool, - created-at: option, - last-used: option, - spending-limits: option, - } - - record wallet-spending-limits { - max-per-call: option, - max-total: option, - currency: string, - total-spent: string, - set-at: option, - updated-at: option, - } - - record get-balance-response { - balance: balance, - wallet-id: string, - chain-id: chain-id, - } - - record balance { - formatted: string, - raw: string, - } - - record get-token-balance-response { - balance: string, - formatted: option, - decimals: option, - } - - record send-eth-response { - tx-hash: string, - from-address: string, - to-address: string, - amount: string, - chain-id: chain-id, - } - - record send-token-response { - tx-hash: string, - from-address: string, - to-address: string, - token-address: string, - amount: string, - chain-id: chain-id, - } - - record build-and-sign-user-operation-response { - signed-user-operation: json, - entry-point: string, - ready-to-submit: bool, - } - - record submit-user-operation-response { - user-op-hash: string, - } - - record user-operation-receipt-response { - receipt: option, - user-op-hash: string, - status: string, - } - - record create-note-response { - note-id: string, - content-hash: string, - created-at: u64, - } - - record execute-via-tba-response { - tx-hash: string, - tba-address: string, - target-address: string, - success: bool, - } - - record check-tba-ownership-response { - tba-address: string, - owner-address: string, - is-owned: bool, - } -} diff --git a/hyperdrive/packages/hyperwallet/api/hyperwallet:sys-v0.wit b/hyperdrive/packages/hyperwallet/api/hyperwallet:sys-v0.wit index c4de97479..a65942e77 100644 --- a/hyperdrive/packages/hyperwallet/api/hyperwallet:sys-v0.wit +++ b/hyperdrive/packages/hyperwallet/api/hyperwallet:sys-v0.wit @@ -1,3 +1,635 @@ +interface hyperwallet { + use standard.{address, process-id, node-id}; + + /// JSON is passed over Wasm boundary as a string + type json = string; + + /// Wallet address (Ethereum address) + type wallet-address = string; + + /// Chain ID for blockchain networks + type chain-id = u64; + + /// Session identifier + type session-id = string; + + /// User operation hash + type user-operation-hash = string; + + /// Cryptographic signature as bytes + type signature = list; + + /// Available operations in the Hyperwallet protocol + enum operation { + handshake, + unlock-wallet, + register-process, + update-spending-limits, + create-wallet, + import-wallet, + delete-wallet, + rename-wallet, + export-wallet, + encrypt-wallet, + decrypt-wallet, + get-wallet-info, + list-wallets, + set-wallet-limits, + send-eth, + send-token, + approve-token, + call-contract, + sign-transaction, + sign-message, + execute-via-tba, + check-tba-ownership, + setup-tba-delegation, + build-and-sign-user-operation-for-payment, + submit-user-operation, + build-user-operation, + sign-user-operation, + build-and-sign-user-operation, + estimate-user-operation-gas, + get-user-operation-receipt, + configure-paymaster, + resolve-identity, + create-note, + read-note, + setup-delegation, + verify-delegation, + mint-entry, + get-balance, + get-token-balance, + get-transaction-history, + estimate-gas, + get-gas-price, + get-transaction-receipt, + batch-operations, + schedule-operation, + cancel-operation, + } + + /// Categories of operations + enum operation-category { + system, + process-management, + wallet-management, + ethereum, + token-bound-account, + erc4337, + hypermap, + query, + advanced, + } + + /// Spending limits configuration + record spending-limits { + per-tx-eth: option, + daily-eth: option, + per-tx-usdc: option, + daily-usdc: option, + daily-reset-at: u64, + spent-today-eth: string, + spent-today-usdc: string, + } + + /// Process permissions + record process-permissions { + address: address, + allowed-operations: list, + spending-limits: option, + updatable-settings: list, + registered-at: u64, + } + + /// Settings that can be updated + enum updatable-setting { + spending-limits, + } + + /// Session information + record session-info { + server-version: string, + session-id: session-id, + registered-permissions: process-permissions, + initial-chain-id: chain-id, + } + + /// Handshake protocol steps + variant handshake-step { + client-hello(client-hello), + server-welcome(server-welcome), + register(register-request), + complete(complete-handshake), + } + + record client-hello { + client-version: string, + client-name: string, + } + + record server-welcome { + server-version: string, + supported-operations: list, + supported-chains: list, + features: list, + } + + record register-request { + required-operations: list, + spending-limits: option, + } + + record complete-handshake { + registered-permissions: process-permissions, + session-id: string, + } + + /// Main message structure + record hyperwallet-message { + request: hyperwallet-request, + session-id: session-id, + } + + /// All possible request types + variant hyperwallet-request { + // Session Management + handshake(handshake-step), + unlock-wallet(unlock-wallet-request), + + // Wallet Lifecycle Management + create-wallet(create-wallet-request), + import-wallet(import-wallet-request), + delete-wallet(delete-wallet-request), + rename-wallet(rename-wallet-request), + export-wallet(export-wallet-request), + list-wallets, + get-wallet-info(get-wallet-info-request), + + // Ethereum Operations + send-eth(send-eth-request), + send-token(send-token-request), + approve-token(approve-token-request), + get-balance(get-balance-request), + get-token-balance(get-token-balance-request), + call-contract(call-contract-request), + sign-transaction(sign-transaction-request), + sign-message(sign-message-request), + get-transaction-history(get-transaction-history-request), + estimate-gas(estimate-gas-request), + get-gas-price, + get-transaction-receipt(get-transaction-receipt-request), + + // Token Bound Account Operations + execute-via-tba(execute-via-tba-request), + check-tba-ownership(check-tba-ownership-request), + setup-tba-delegation(setup-tba-delegation-request), + + // Account Abstraction (ERC-4337) + build-and-sign-user-operation-for-payment(build-and-sign-user-operation-for-payment-request), + submit-user-operation(submit-user-operation-request), + get-user-operation-receipt(get-user-operation-receipt-request), + build-user-operation(build-user-operation-request), + sign-user-operation(sign-user-operation-request), + build-and-sign-user-operation(build-and-sign-user-operation-request), + estimate-user-operation-gas(estimate-user-operation-gas-request), + configure-paymaster(configure-paymaster-request), + + // Hypermap Operations + resolve-identity(resolve-identity-request), + create-note(create-note-request), + read-note(read-note-request), + setup-delegation(setup-delegation-request), + verify-delegation(verify-delegation-request), + mint-entry(mint-entry-request), + + // Process Management + update-spending-limits(update-spending-limits-request), + } + + /// Response structure + record hyperwallet-response { + success: bool, + data: option, + error: option, + request-id: option, + } + + /// Error information + record operation-error { + code: error-code, + message: string, + details: option, + } + + /// Error codes + enum error-code { + permission-denied, + wallet-not-found, + insufficient-funds, + invalid-operation, + invalid-params, + spending-limit-exceeded, + chain-not-allowed, + blockchain-error, + internal-error, + authentication-failed, + wallet-locked, + operation-not-supported, + version-mismatch, + } + + /// Response data variants + variant hyperwallet-response-data { + // Session Management + handshake(handshake-step), + unlock-wallet(unlock-wallet-response), + + // Wallet Lifecycle + create-wallet(create-wallet-response), + import-wallet(import-wallet-response), + delete-wallet(delete-wallet-response), + export-wallet(export-wallet-response), + + // Wallet Queries + list-wallets(list-wallets-response), + get-wallet-info(get-wallet-info-response), + get-balance(get-balance-response), + get-token-balance(get-token-balance-response), + + // Transactions + send-eth(send-eth-response), + send-token(send-token-response), + + // ERC4337 Account Abstraction + build-and-sign-user-operation-for-payment(build-and-sign-user-operation-response), + submit-user-operation(submit-user-operation-response), + get-user-operation-receipt(user-operation-receipt-response), + + // Hypermap + create-note(create-note-response), + + // Token Bound Accounts + execute-via-tba(execute-via-tba-response), + check-tba-ownership(check-tba-ownership-response), + } + + // Request types + + record unlock-wallet-request { + session-id: session-id, + wallet-id: string, + password: string, + } + + record create-wallet-request { + name: string, + password: option, + } + + record import-wallet-request { + name: string, + private-key: string, + password: option, + } + + record delete-wallet-request { + wallet-id: string, + } + + record rename-wallet-request { + wallet-id: string, + new-name: string, + } + + record export-wallet-request { + wallet-id: string, + password: option, + } + + record get-wallet-info-request { + wallet-id: string, + } + + record get-balance-request { + wallet-id: string, + } + + record send-eth-request { + wallet-id: string, + to: string, + amount: string, + } + + record send-token-request { + wallet-id: string, + token-address: string, + to: string, + amount: string, + } + + record approve-token-request { + token-address: string, + spender: string, + amount: string, + } + + record get-token-balance-request { + wallet-id: string, + token-address: string, + } + + record call-contract-request { + to: string, + data: string, + value: option, + } + + record sign-transaction-request { + to: string, + value: string, + data: option, + gas-limit: option, + gas-price: option, + nonce: option, + } + + record sign-message-request { + message: string, + message-type: message-type, + } + + variant message-type { + plain-text, + eip191, + eip712(eip712-data), + } + + record eip712-data { + domain: json, + types: json, + } + + record get-transaction-history-request { + limit: option, + offset: option, + from-block: option, + to-block: option, + } + + record estimate-gas-request { + to: string, + data: option, + value: option, + } + + record get-transaction-receipt-request { + tx-hash: string, + } + + record execute-via-tba-request { + tba-address: string, + target: string, + call-data: string, + value: option, + } + + record check-tba-ownership-request { + tba-address: string, + signer-address: string, + } + + record setup-tba-delegation-request { + tba-address: string, + delegate-address: string, + permissions: list, + } + + record build-and-sign-user-operation-for-payment-request { + eoa-wallet-id: string, + tba-address: string, + target: string, + call-data: string, + use-paymaster: bool, + paymaster-config: option, + password: option, + } + + record paymaster-config { + is-circle-paymaster: bool, + paymaster-address: string, + paymaster-verification-gas: string, + paymaster-post-op-gas: string, + } + + record submit-user-operation-request { + signed-user-operation: json, + entry-point: string, + bundler-url: option, + } + + record get-user-operation-receipt-request { + user-op-hash: string, + } + + record build-user-operation-request { + target: string, + call-data: string, + value: option, + } + + record sign-user-operation-request { + unsigned-user-operation: json, + entry-point: string, + } + + record build-and-sign-user-operation-request { + target: string, + call-data: string, + value: option, + entry-point: string, + } + + record estimate-user-operation-gas-request { + user-operation: json, + entry-point: string, + } + + record configure-paymaster-request { + paymaster-address: string, + paymaster-data: option, + verification-gas-limit: string, + post-op-gas-limit: string, + } + + record resolve-identity-request { + entry-name: string, + } + + record create-note-request { + note-data: json, + metadata: option, + } + + record read-note-request { + note-id: string, + } + + record setup-delegation-request { + delegate-address: string, + permissions: list, + expiry: option, + } + + record verify-delegation-request { + delegate-address: string, + signature: string, + message: string, + } + + record mint-entry-request { + entry-name: string, + metadata: json, + } + + record update-spending-limits-request { + new-limits: spending-limits, + } + + // Response types + + record unlock-wallet-response { + success: bool, + wallet-id: string, + message: string, + } + + record create-wallet-response { + wallet-id: string, + address: string, + name: string, + } + + record import-wallet-response { + wallet-id: string, + address: string, + name: string, + } + + record delete-wallet-response { + success: bool, + wallet-id: string, + message: string, + } + + record export-wallet-response { + address: string, + private-key: string, + } + + record get-wallet-info-response { + wallet-id: string, + address: string, + name: string, + chain-id: chain-id, + is-locked: bool, + } + + record list-wallets-response { + process: string, + wallets: list, + total: u64, + } + + record wallet { + address: wallet-address, + name: option, + chain-id: chain-id, + encrypted: bool, + created-at: option, + last-used: option, + spending-limits: option, + } + + record wallet-spending-limits { + max-per-call: option, + max-total: option, + currency: string, + total-spent: string, + set-at: option, + updated-at: option, + } + + record get-balance-response { + balance: balance, + wallet-id: string, + chain-id: chain-id, + } + + record balance { + formatted: string, + raw: string, + } + + record get-token-balance-response { + balance: string, + formatted: option, + decimals: option, + } + + record send-eth-response { + tx-hash: string, + from-address: string, + to-address: string, + amount: string, + chain-id: chain-id, + } + + record send-token-response { + tx-hash: string, + from-address: string, + to-address: string, + token-address: string, + amount: string, + chain-id: chain-id, + } + + record build-and-sign-user-operation-response { + signed-user-operation: json, + entry-point: string, + ready-to-submit: bool, + } + + record submit-user-operation-response { + user-op-hash: string, + } + + record user-operation-receipt-response { + receipt: option, + user-op-hash: string, + status: string, + } + + record create-note-response { + note-id: string, + content-hash: string, + created-at: u64, + } + + record execute-via-tba-response { + tx-hash: string, + tba-address: string, + target-address: string, + success: bool, + } + + record check-tba-ownership-response { + tba-address: string, + owner-address: string, + is-owned: bool, + } +} + world hyperwallet-sys-v0 { import hyperwallet; include process-v1; diff --git a/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml b/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml index da7e47d52..14dc7230e 100644 --- a/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml +++ b/hyperdrive/packages/hyperwallet/hyperwallet/Cargo.toml @@ -10,7 +10,7 @@ alloy-sol-types = "0.7" anyhow = "1.0" base64ct = "=1.6.0" chrono = { version = "0.4", features = ["serde"] } -hyperware_process_lib = { git = "https://github.com/hyperware-ai/process_lib", rev = "ac4d308", features = ["hyperwallet", "logging"] } +hyperware_process_lib = { git = "https://github.com/hyperware-ai/process_lib", rev = "4764ce3", features = ["hyperwallet", "logging"] } process_macros = "0.1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0"