diff --git a/package.json b/package.json index d1c0269..6b2de7f 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,10 @@ "semi": false }, "dependencies": { + "@acala-network/chopsticks-core": "^1.0.5", "@noble/hashes": "^1.8.0", "@polkadot-api/descriptors": "file:.papi/descriptors", + "@polkadot-api/json-rpc-provider-proxy": "^0.2.4", "@polkadot-api/metadata-builders": "^0.12.0", "@polkadot-api/observable-client": "^0.10.0", "@polkadot-api/react-builder": "0.2.7", @@ -30,6 +32,7 @@ "@radix-ui/react-scroll-area": "^1.2.8", "@radix-ui/react-select": "^2.2.4", "@radix-ui/react-slot": "^1.2.2", + "@radix-ui/react-switch": "^1.2.4", "@radix-ui/react-tabs": "^1.1.11", "@radix-ui/react-toggle": "^1.1.8", "@radix-ui/react-toggle-group": "^1.1.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f598dfd..538834a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,12 +13,18 @@ importers: .: dependencies: + '@acala-network/chopsticks-core': + specifier: ^1.0.5 + version: 1.0.5 '@noble/hashes': specifier: ^1.8.0 version: 1.8.0 '@polkadot-api/descriptors': specifier: file:.papi/descriptors version: file:.papi/descriptors(polkadot-api@1.11.0(jiti@2.4.2)(postcss@8.5.3)(rxjs@7.8.2)(yaml@2.6.1)) + '@polkadot-api/json-rpc-provider-proxy': + specifier: ^0.2.4 + version: 0.2.4 '@polkadot-api/metadata-builders': specifier: ^0.12.0 version: 0.12.0 @@ -61,6 +67,9 @@ importers: '@radix-ui/react-slot': specifier: ^1.2.2 version: 1.2.2(@types/react@19.1.4)(react@19.1.0) + '@radix-ui/react-switch': + specifier: ^1.2.4 + version: 1.2.4(@types/react-dom@19.1.5(@types/react@19.1.4))(@types/react@19.1.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) '@radix-ui/react-tabs': specifier: ^1.1.11 version: 1.1.11(@types/react-dom@19.1.5(@types/react@19.1.4))(@types/react@19.1.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -200,6 +209,13 @@ importers: packages: + '@acala-network/chopsticks-core@1.0.5': + resolution: {integrity: sha512-erAbVwteGK/AFu65UYTUcmrQTe25xmCygTDrs2GfeZkOzcctE5/X2BpyY5KtbVWk66lRcivuGVE+XvNkJig3jQ==} + engines: {node: '>=v20'} + + '@acala-network/chopsticks-executor@1.0.5': + resolution: {integrity: sha512-Twowg3/UCTnFxUvyOrFBWVoAwCAocoGGwDE5IJhmUdb5DrKKgCzOhcgSutUgrkSFFgF8qgbTwtKYr1GCUqdQvg==} + '@adraffy/ens-normalize@1.11.0': resolution: {integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==} @@ -634,9 +650,15 @@ packages: '@polkadot-api/ink-contracts@0.3.1': resolution: {integrity: sha512-zcbd7JIGHD1FClusRCnQ6mqlannQIlCgIxEhTOXzBqEh5JRW6rIJcoat+edKjPEWFndXcDTXTpNRqg0YWBvRoQ==} + '@polkadot-api/json-rpc-provider-proxy@0.1.0': + resolution: {integrity: sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg==} + '@polkadot-api/json-rpc-provider-proxy@0.2.4': resolution: {integrity: sha512-nuGoY9QpBAiRU7xmXN3nugFvPcnSu3IxTLm1OWcNTGlZ1LW5bvdQHz3JLk56+Jlyb3GJ971hqdg2DJsMXkKCOg==} + '@polkadot-api/json-rpc-provider@0.0.1': + resolution: {integrity: sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA==} + '@polkadot-api/json-rpc-provider@0.0.4': resolution: {integrity: sha512-9cDijLIxzHOBuq6yHqpqjJ9jBmXrctjc1OFqU+tQrS96adQze3mTIH6DTgfb/0LMrqxzxffz1HQGrIlEH00WrA==} @@ -652,6 +674,9 @@ packages: '@polkadot-api/metadata-builders@0.12.0': resolution: {integrity: sha512-4SLU0Khipci3TNslrZZXf16zJVivOwwHn3Dx8GnMmtNaqftKwLylvB0oDhZesb9X+/Q0715g9ERqt06iwOSojw==} + '@polkadot-api/metadata-builders@0.3.2': + resolution: {integrity: sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg==} + '@polkadot-api/metadata-compatibility@0.2.2': resolution: {integrity: sha512-nWzIXgVsRDafgzWpcV8D6dWy+7qLq2/g89ZyvTR5MpBaVQeYwbh5QIBQa5iLluNrBnZ5Nl8KORn4f09jlsWPhg==} @@ -661,6 +686,12 @@ packages: '@polkadot-api/substrate-client': 0.3.0 rxjs: '>=7.8.0' + '@polkadot-api/observable-client@0.3.2': + resolution: {integrity: sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug==} + peerDependencies: + '@polkadot-api/substrate-client': 0.1.4 + rxjs: '>=7.8.0' + '@polkadot-api/pjs-signer@0.6.7': resolution: {integrity: sha512-Yo5f16C/QSnbVdVa58eb5Tb8/KHcElgv598PROvy2IqTsxE/oSi4TzgZkWEzVkP39HWraqF/RAL2dGoRh83uLA==} @@ -692,9 +723,18 @@ packages: '@polkadot-api/substrate-bindings@0.13.0': resolution: {integrity: sha512-M/60lXtHr4flwx4K7L4xv2jLk44EhD8UB4jvah+jbZM195I89nZGXKo2JOkgyR5DHoLj//TAoBkLedZmaaAiaQ==} + '@polkadot-api/substrate-bindings@0.6.0': + resolution: {integrity: sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw==} + + '@polkadot-api/substrate-client@0.1.4': + resolution: {integrity: sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A==} + '@polkadot-api/substrate-client@0.3.0': resolution: {integrity: sha512-0hEvQLKH2zhaFzE8DPkWehvJilec8u2O2wbIEUStm0OJ8jIFtJ40MFjXQfB01dXBWUz1KaVBqS6xd3sZA90Dpw==} + '@polkadot-api/utils@0.1.0': + resolution: {integrity: sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA==} + '@polkadot-api/utils@0.1.2': resolution: {integrity: sha512-yhs5k2a8N1SBJcz7EthZoazzLQUkZxbf+0271Xzu42C5AEM9K9uFLbsB+ojzHEM72O5X8lPtSwGKNmS7WQyDyg==} @@ -704,6 +744,125 @@ packages: '@polkadot-api/ws-provider@0.4.0': resolution: {integrity: sha512-ZurjUHHAlQ1Ux8HiZz7mtkg1qjq6LmqxcHljcZxne0U7foCZrXdWHsohwlV8kUQUir5kXuDsNvdZN/MFCUMaVw==} + '@polkadot/keyring@13.4.4': + resolution: {integrity: sha512-pIm+u1lat+mGUABsCZyTm1/qgwL3NS94SC7TPtSzhzFZq6faUFNMyq1gBfTicrb7MjGFc8FlrKlGxFtudnQC9Q==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.4.4 + '@polkadot/util-crypto': 13.4.4 + + '@polkadot/networks@13.4.4': + resolution: {integrity: sha512-I3g9OX3CpZbFKa1C4xQPYOJ2Y209oEb5x9lzgHuAzg64m5vr2y4azWDSQnoOrlFK5ztSrijkWe1gSME1lzy8iA==} + engines: {node: '>=18'} + + '@polkadot/rpc-provider@15.10.2': + resolution: {integrity: sha512-kqpPW8U0stVW+uOZP8g5d87Xb8rbXJR5PUub6xgGG6AOMbbvvuCU3GSohu/iozo4p9uD7TGH90jvbxj1rjJVMA==} + engines: {node: '>=18'} + + '@polkadot/types-augment@15.10.2': + resolution: {integrity: sha512-X/xh+Dzud6OIyr7q8xttAwn+Fb5hKImIWEO1oG8WcInqv+P0vRyu7Tds+2ut9t64sJi3ydJ7I+T+WxZYheCU7g==} + engines: {node: '>=18'} + + '@polkadot/types-codec@15.10.2': + resolution: {integrity: sha512-dhwbaukUZiYDW3QAAnLAFThYE5hQGdwBMWOVTt9+aBWxEKovLK93j0V30tEzMUtrZy8xaRWdhdDeQ3DSmxEP6w==} + engines: {node: '>=18'} + + '@polkadot/types-create@15.10.2': + resolution: {integrity: sha512-vqXwPUSgx/By31qSkhOR5GN6zMbF1MkiX3F1g5KKHaRE8p/DdTry4LhufxhtK1mr9eBWvVGXxCOZdwjQco2M1A==} + engines: {node: '>=18'} + + '@polkadot/types-known@15.10.2': + resolution: {integrity: sha512-vs02WiIlLualrrh/EuA5qzK6QzatVPqBBNqa66dUtmyhJy48OEelBK+QLfOIQvZKU0ModEunoVrnxuY+O1DCmA==} + engines: {node: '>=18'} + + '@polkadot/types-support@15.10.2': + resolution: {integrity: sha512-sHamH6MehJa7aGZ/DHTB6vJAhSN5VrJx5lpDpb3xgBFTr0cVc5IsociqgJ/mgvyEIdLF3laraPxREqxCmuxTaQ==} + engines: {node: '>=18'} + + '@polkadot/types@15.10.2': + resolution: {integrity: sha512-/wDwKdDijxSXyNk5YezhVitdFxoQaTSSG9KXa7dEWujtmS/51UHmt9+P3W8b8D8kKaCvumahf/ww3GJI6s0Eqw==} + engines: {node: '>=18'} + + '@polkadot/util-crypto@13.4.4': + resolution: {integrity: sha512-xuXBNdK3Axlj1ItR6n1kH9zgaDNWri9pb/w1HDFx89bHvw6Bl79wA/oHtVGLbHZ1y/bunpsuapznyswhnsaVog==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.4.4 + + '@polkadot/util@13.4.4': + resolution: {integrity: sha512-Lveu+8pZLBoAyyv+8X7FI4aTOwLaNXRc9gz1wVaUoGzk5VgmKp/qbPg0a+mfJD8usjf748OVbShhjXvhV3MLiA==} + engines: {node: '>=18'} + + '@polkadot/wasm-bridge@7.4.1': + resolution: {integrity: sha512-tdkJaV453tezBxhF39r4oeG0A39sPKGDJmN81LYLf+Fihb7astzwju+u75BRmDrHZjZIv00un3razJEWCxze6g==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + + '@polkadot/wasm-crypto-asmjs@7.4.1': + resolution: {integrity: sha512-pwU8QXhUW7IberyHJIQr37IhbB6DPkCG5FhozCiNTq4vFBsFPjm9q8aZh7oX1QHQaiAZa2m2/VjIVE+FHGbvHQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + + '@polkadot/wasm-crypto-init@7.4.1': + resolution: {integrity: sha512-AVka33+f7MvXEEIGq5U0dhaA2SaXMXnxVCQyhJTaCnJ5bRDj0Xlm3ijwDEQUiaDql7EikbkkRtmlvs95eSUWYQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + + '@polkadot/wasm-crypto-wasm@7.4.1': + resolution: {integrity: sha512-PE1OAoupFR0ZOV2O8tr7D1FEUAwaggzxtfs3Aa5gr+yxlSOaWUKeqsOYe1KdrcjmZVV3iINEAXxgrbzCmiuONg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + + '@polkadot/wasm-crypto@7.4.1': + resolution: {integrity: sha512-kHN/kF7hYxm1y0WeFLWeWir6oTzvcFmR4N8fJJokR+ajYbdmrafPN+6iLgQVbhZnDdxyv9jWDuRRsDnBx8tPMQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + + '@polkadot/wasm-util@7.4.1': + resolution: {integrity: sha512-RAcxNFf3zzpkr+LX/ItAsvj+QyM56TomJ0xjUMo4wKkHjwsxkz4dWJtx5knIgQz/OthqSDMR59VNEycQeNuXzA==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + + '@polkadot/x-bigint@13.4.4': + resolution: {integrity: sha512-XjChwagc8TbIoWx9N1JwCMOyte417ngobin6vTmLQsgaOlK84LU0/3uc0ea9qUurPopc/Spf1mSMOFp7lRBrIA==} + engines: {node: '>=18'} + + '@polkadot/x-fetch@13.4.4': + resolution: {integrity: sha512-F7awPlvMgu7kW7p4/TWTH18l14zS/8Og71lVO2WZ7HD1ofGG9SQiiNDmNbXl28L1ECOBGcOD1qjVAGEEXPva0Q==} + engines: {node: '>=18'} + + '@polkadot/x-global@13.4.4': + resolution: {integrity: sha512-kwXpzTXOgL2GdMWMzynj9ZpZdjfNvDlpQdlWzDNqTBeIeuklhmhDCA7ZFj3p5OkNUnZoTxNj4zgArYO3VKmQ1g==} + engines: {node: '>=18'} + + '@polkadot/x-randomvalues@13.4.4': + resolution: {integrity: sha512-y6sMx2VrXi+V6SLTsd21DJ2Un9s2S7/G1MLDu6IiDBSKcnmOHPV6X43+Y8g+r8B7d9+1+ee/hn1JV+VY+SKSdg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.4.4 + '@polkadot/wasm-util': '*' + + '@polkadot/x-textdecoder@13.4.4': + resolution: {integrity: sha512-fXvM2ts0IUx6F/Fd1Yg4ypHCffmUtTSwOtFpqBPvWghKYnmvTbGVrSidGizu6as7KAp4dsum9mYKdRmScBHHzg==} + engines: {node: '>=18'} + + '@polkadot/x-textencoder@13.4.4': + resolution: {integrity: sha512-WpPR2vMAiXS2AN8MfolzWbo5WPEmy5FVZFgwZraJZP8RKfzEuntbY5Nb25p/PIjsPJ1zKU0DE8uVvDcGjxIo7A==} + engines: {node: '>=18'} + + '@polkadot/x-ws@13.4.4': + resolution: {integrity: sha512-qfbFb0Tdjsx5QawICduPTc3326SP+lEdggfyT4HmfrM50nvmCR/82TRAtEWKK7EPhXjoE/cBL/i5VO4d68DBQQ==} + engines: {node: '>=18'} + '@radix-ui/number@1.1.1': resolution: {integrity: sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==} @@ -985,6 +1144,19 @@ packages: '@types/react': optional: true + '@radix-ui/react-switch@1.2.4': + resolution: {integrity: sha512-yZCky6XZFnR7pcGonJkr9VyNRu46KcYAbyg1v/gVVCZUr8UJ4x+RpncC27hHtiZ15jC+3WS8Yg/JSgyIHnYYsQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-tabs@1.1.11': resolution: {integrity: sha512-4FiKSVoXqPP/KfzlB7lwwqoFV6EPwkrrqGp9cUYXjwDYHhvpnqq79P+EPHKcdoTE7Rl8w/+6s9rTlsfXHES9GA==} peerDependencies: @@ -1259,6 +1431,24 @@ packages: resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} + '@substrate/connect-extension-protocol@2.2.2': + resolution: {integrity: sha512-t66jwrXA0s5Goq82ZtjagLNd7DPGCNjHeehRlE/gcJmJ+G56C0W+2plqOMRicJ8XGR1/YFnUSEqUFiSNbjGrAA==} + + '@substrate/connect-known-chains@1.10.1': + resolution: {integrity: sha512-NY+Pi6jd0WKq873dX5Ufo0h/jJ6RNpnDBsUWxCgOHkNpvmdnslKZW0pfKeUDlP412uaz2twPIDTzDw+LbTvvYQ==} + + '@substrate/connect@0.8.11': + resolution: {integrity: sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw==} + deprecated: versions below 1.x are no longer maintained + + '@substrate/light-client-extension-helpers@1.0.0': + resolution: {integrity: sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg==} + peerDependencies: + smoldot: 2.x + + '@substrate/ss58-registry@1.51.0': + resolution: {integrity: sha512-TWDurLiPxndFgKjVavCniytBIw+t4ViOi7TYp9h/D0NMmkEc9klFTo+827eyEJ0lELpqO207Ey7uGxUa+BS1jQ==} + '@tailwindcss/node@4.1.7': resolution: {integrity: sha512-9rsOpdY9idRI2NH6CL4wORFY0+Q6fnx9XP9Ju+iq/0wJwGD5IByIgFmwVbyy4ymuyprj8Qh4ErxMKTUL4uNh3g==} @@ -1364,6 +1554,9 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/bn.js@5.1.6': + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} + '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} @@ -1603,6 +1796,9 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + bn.js@5.2.2: + resolution: {integrity: sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==} + body-parser@2.2.0: resolution: {integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==} engines: {node: '>=18'} @@ -1716,6 +1912,12 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + + comlink@4.4.2: + resolution: {integrity: sha512-OxGdvBmJuNKSCMO4NTl1L47VRp6xn2wG4F/2hYzB6tiCb709otOxtEYCSvK80PtjODfXXZu8ds+Nw5kVCjqd2g==} + commander@13.1.0: resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==} engines: {node: '>=18'} @@ -1777,6 +1979,13 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} + + dateformat@4.6.3: + resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} + debug@4.4.1: resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} engines: {node: '>=6.0'} @@ -1988,6 +2197,9 @@ packages: resolution: {integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==} engines: {node: '>= 18'} + fast-copy@3.0.2: + resolution: {integrity: sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -2005,6 +2217,9 @@ packages: resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==} engines: {node: '>=6'} + fast-safe-stringify@2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + fastq@1.19.1: resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} @@ -2016,6 +2231,10 @@ packages: picomatch: optional: true + fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} + figures@6.1.0: resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} engines: {node: '>=18'} @@ -2055,6 +2274,10 @@ packages: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} + formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} + forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -2151,6 +2374,9 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} + help-me@5.0.0: + resolution: {integrity: sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==} + hey-listen@1.0.8: resolution: {integrity: sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==} @@ -2285,6 +2511,9 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json-stringify-safe@5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -2398,6 +2627,9 @@ packages: lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + log-symbols@6.0.0: resolution: {integrity: sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==} engines: {node: '>=18'} @@ -2412,6 +2644,10 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + lru-cache@11.1.0: + resolution: {integrity: sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==} + engines: {node: 20 || >=22} + lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -2462,6 +2698,9 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} @@ -2475,6 +2714,10 @@ packages: engines: {node: '>=10'} hasBin: true + mock-socket@9.3.1: + resolution: {integrity: sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw==} + engines: {node: '>= 8'} + motion@10.16.2: resolution: {integrity: sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ==} @@ -2499,6 +2742,15 @@ packages: resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} engines: {node: '>= 0.6'} + nock@13.5.6: + resolution: {integrity: sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==} + engines: {node: '>= 10.13'} + + node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + deprecated: Use your platform's native DOMException instead + node-fetch-native@1.6.6: resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} @@ -2511,6 +2763,10 @@ packages: encoding: optional: true + node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + node-mock-http@1.0.0: resolution: {integrity: sha512-0uGYQ1WQL1M5kKvGRXWQ3uZCHtLTO8hln3oBjIusM75WoesZ909uQJs/Hb946i2SS+Gsrhkaa6iAO17jRIv6DQ==} @@ -2543,6 +2799,10 @@ packages: on-exit-leak-free@0.2.0: resolution: {integrity: sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==} + on-exit-leak-free@2.1.2: + resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} + engines: {node: '>=14.0.0'} + on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} @@ -2647,13 +2907,27 @@ packages: pino-abstract-transport@0.5.0: resolution: {integrity: sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==} + pino-abstract-transport@2.0.0: + resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==} + + pino-pretty@13.0.0: + resolution: {integrity: sha512-cQBBIVG3YajgoUjo1FdKVRX6t9XPxwB9lcNJVD5GCnNM4Y6T12YYx8c6zEejxQsU0wrg9TwmDulcE9LR7qcJqA==} + hasBin: true + pino-std-serializers@4.0.0: resolution: {integrity: sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==} + pino-std-serializers@7.0.0: + resolution: {integrity: sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==} + pino@7.11.0: resolution: {integrity: sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==} hasBin: true + pino@9.6.0: + resolution: {integrity: sha512-i85pKRCt4qMjZ1+L7sy2Ag4t1atFcdbEt76+7iRJn1g2BvsnRMGu9p8pivl9fs63M2kF/A0OacFZhTub+m/qMg==} + hasBin: true + pirates@4.0.7: resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} engines: {node: '>= 6'} @@ -2710,9 +2984,16 @@ packages: process-warning@1.0.0: resolution: {integrity: sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==} + process-warning@4.0.1: + resolution: {integrity: sha512-3c2LzQ3rY9d0hc1emcsHhfT9Jwz0cChib/QN89oME2R451w5fy3f0afAhERFZAwrbDU43wk12d0ORBpDVME50Q==} + prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + propagate@2.0.1: + resolution: {integrity: sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==} + engines: {node: '>= 8'} + proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -2720,6 +3001,9 @@ packages: proxy-compare@2.5.1: resolution: {integrity: sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA==} + pump@3.0.2: + resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -2856,6 +3140,10 @@ packages: resolution: {integrity: sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==} engines: {node: '>= 12.13.0'} + real-require@0.2.0: + resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} + engines: {node: '>= 12.13.0'} + regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} @@ -2916,6 +3204,9 @@ packages: scheduler@0.26.0: resolution: {integrity: sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==} + secure-json-parse@2.7.0: + resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -2970,12 +3261,18 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} + smoldot@2.0.26: + resolution: {integrity: sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig==} + smoldot@2.0.34: resolution: {integrity: sha512-mw9tCbGEhEp0koMqLL0jBEixVY1MIN/xI3pE6ZY1TuOPU+LnYy8FloODVyzkvzQPaBYrETXJdRlmA/+k6g3gow==} sonic-boom@2.8.0: resolution: {integrity: sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==} + sonic-boom@4.2.0: + resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==} + sort-keys@5.1.0: resolution: {integrity: sha512-aSbHV0DaBcr7u0PVHXzM6NbZNAtrr9sF6+Qfs9UUVG7Ll3jQ6hHi8F/xqIIcn2rvIVbr0v/2zyjSdwSV47AgLQ==} engines: {node: '>=12'} @@ -3092,6 +3389,9 @@ packages: thread-stream@0.15.2: resolution: {integrity: sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==} + thread-stream@3.1.0: + resolution: {integrity: sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==} + tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} @@ -3380,6 +3680,10 @@ packages: yaml: optional: true + web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -3508,6 +3812,33 @@ packages: snapshots: + '@acala-network/chopsticks-core@1.0.5': + dependencies: + '@acala-network/chopsticks-executor': 1.0.5 + '@polkadot/rpc-provider': 15.10.2 + '@polkadot/types': 15.10.2 + '@polkadot/types-codec': 15.10.2 + '@polkadot/types-known': 15.10.2 + '@polkadot/util': 13.4.4 + '@polkadot/util-crypto': 13.4.4(@polkadot/util@13.4.4) + comlink: 4.4.2 + eventemitter3: 5.0.1 + lodash: 4.17.21 + lru-cache: 11.1.0 + pino: 9.6.0 + pino-pretty: 13.0.0 + rxjs: 7.8.2 + zod: 3.24.4 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@acala-network/chopsticks-executor@1.0.5': + dependencies: + '@polkadot/util': 13.4.4 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.4.4) + '@adraffy/ens-normalize@1.11.0': {} '@ampproject/remapping@2.3.0': @@ -3966,8 +4297,14 @@ snapshots: '@polkadot-api/substrate-bindings': 0.13.0 '@polkadot-api/utils': 0.1.2 + '@polkadot-api/json-rpc-provider-proxy@0.1.0': + optional: true + '@polkadot-api/json-rpc-provider-proxy@0.2.4': {} + '@polkadot-api/json-rpc-provider@0.0.1': + optional: true + '@polkadot-api/json-rpc-provider@0.0.4': {} '@polkadot-api/known-chains@0.7.5': {} @@ -3987,6 +4324,12 @@ snapshots: '@polkadot-api/substrate-bindings': 0.13.0 '@polkadot-api/utils': 0.1.2 + '@polkadot-api/metadata-builders@0.3.2': + dependencies: + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/utils': 0.1.0 + optional: true + '@polkadot-api/metadata-compatibility@0.2.2': dependencies: '@polkadot-api/metadata-builders': 0.12.0 @@ -4000,6 +4343,15 @@ snapshots: '@polkadot-api/utils': 0.1.2 rxjs: 7.8.2 + '@polkadot-api/observable-client@0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.2)': + dependencies: + '@polkadot-api/metadata-builders': 0.3.2 + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/substrate-client': 0.1.4 + '@polkadot-api/utils': 0.1.0 + rxjs: 7.8.2 + optional: true + '@polkadot-api/pjs-signer@0.6.7': dependencies: '@polkadot-api/metadata-builders': 0.12.0 @@ -4058,11 +4410,28 @@ snapshots: '@scure/base': 1.2.5 scale-ts: 1.6.1 + '@polkadot-api/substrate-bindings@0.6.0': + dependencies: + '@noble/hashes': 1.8.0 + '@polkadot-api/utils': 0.1.0 + '@scure/base': 1.2.5 + scale-ts: 1.6.1 + optional: true + + '@polkadot-api/substrate-client@0.1.4': + dependencies: + '@polkadot-api/json-rpc-provider': 0.0.1 + '@polkadot-api/utils': 0.1.0 + optional: true + '@polkadot-api/substrate-client@0.3.0': dependencies: '@polkadot-api/json-rpc-provider': 0.0.4 '@polkadot-api/utils': 0.1.2 + '@polkadot-api/utils@0.1.0': + optional: true + '@polkadot-api/utils@0.1.2': {} '@polkadot-api/wasm-executor@0.1.2': {} @@ -4076,6 +4445,191 @@ snapshots: - bufferutil - utf-8-validate + '@polkadot/keyring@13.4.4(@polkadot/util-crypto@13.4.4(@polkadot/util@13.4.4))(@polkadot/util@13.4.4)': + dependencies: + '@polkadot/util': 13.4.4 + '@polkadot/util-crypto': 13.4.4(@polkadot/util@13.4.4) + tslib: 2.8.1 + + '@polkadot/networks@13.4.4': + dependencies: + '@polkadot/util': 13.4.4 + '@substrate/ss58-registry': 1.51.0 + tslib: 2.8.1 + + '@polkadot/rpc-provider@15.10.2': + dependencies: + '@polkadot/keyring': 13.4.4(@polkadot/util-crypto@13.4.4(@polkadot/util@13.4.4))(@polkadot/util@13.4.4) + '@polkadot/types': 15.10.2 + '@polkadot/types-support': 15.10.2 + '@polkadot/util': 13.4.4 + '@polkadot/util-crypto': 13.4.4(@polkadot/util@13.4.4) + '@polkadot/x-fetch': 13.4.4 + '@polkadot/x-global': 13.4.4 + '@polkadot/x-ws': 13.4.4 + eventemitter3: 5.0.1 + mock-socket: 9.3.1 + nock: 13.5.6 + tslib: 2.8.1 + optionalDependencies: + '@substrate/connect': 0.8.11 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/types-augment@15.10.2': + dependencies: + '@polkadot/types': 15.10.2 + '@polkadot/types-codec': 15.10.2 + '@polkadot/util': 13.4.4 + tslib: 2.8.1 + + '@polkadot/types-codec@15.10.2': + dependencies: + '@polkadot/util': 13.4.4 + '@polkadot/x-bigint': 13.4.4 + tslib: 2.8.1 + + '@polkadot/types-create@15.10.2': + dependencies: + '@polkadot/types-codec': 15.10.2 + '@polkadot/util': 13.4.4 + tslib: 2.8.1 + + '@polkadot/types-known@15.10.2': + dependencies: + '@polkadot/networks': 13.4.4 + '@polkadot/types': 15.10.2 + '@polkadot/types-codec': 15.10.2 + '@polkadot/types-create': 15.10.2 + '@polkadot/util': 13.4.4 + tslib: 2.8.1 + + '@polkadot/types-support@15.10.2': + dependencies: + '@polkadot/util': 13.4.4 + tslib: 2.8.1 + + '@polkadot/types@15.10.2': + dependencies: + '@polkadot/keyring': 13.4.4(@polkadot/util-crypto@13.4.4(@polkadot/util@13.4.4))(@polkadot/util@13.4.4) + '@polkadot/types-augment': 15.10.2 + '@polkadot/types-codec': 15.10.2 + '@polkadot/types-create': 15.10.2 + '@polkadot/util': 13.4.4 + '@polkadot/util-crypto': 13.4.4(@polkadot/util@13.4.4) + rxjs: 7.8.2 + tslib: 2.8.1 + + '@polkadot/util-crypto@13.4.4(@polkadot/util@13.4.4)': + dependencies: + '@noble/curves': 1.8.1 + '@noble/hashes': 1.8.0 + '@polkadot/networks': 13.4.4 + '@polkadot/util': 13.4.4 + '@polkadot/wasm-crypto': 7.4.1(@polkadot/util@13.4.4)(@polkadot/x-randomvalues@13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4))) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.4.4) + '@polkadot/x-bigint': 13.4.4 + '@polkadot/x-randomvalues': 13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4)) + '@scure/base': 1.2.5 + tslib: 2.8.1 + + '@polkadot/util@13.4.4': + dependencies: + '@polkadot/x-bigint': 13.4.4 + '@polkadot/x-global': 13.4.4 + '@polkadot/x-textdecoder': 13.4.4 + '@polkadot/x-textencoder': 13.4.4 + '@types/bn.js': 5.1.6 + bn.js: 5.2.2 + tslib: 2.8.1 + + '@polkadot/wasm-bridge@7.4.1(@polkadot/util@13.4.4)(@polkadot/x-randomvalues@13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4)))': + dependencies: + '@polkadot/util': 13.4.4 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.4.4) + '@polkadot/x-randomvalues': 13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4)) + tslib: 2.8.1 + + '@polkadot/wasm-crypto-asmjs@7.4.1(@polkadot/util@13.4.4)': + dependencies: + '@polkadot/util': 13.4.4 + tslib: 2.8.1 + + '@polkadot/wasm-crypto-init@7.4.1(@polkadot/util@13.4.4)(@polkadot/x-randomvalues@13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4)))': + dependencies: + '@polkadot/util': 13.4.4 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.4.4)(@polkadot/x-randomvalues@13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4))) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.4.4) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.4.4) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.4.4) + '@polkadot/x-randomvalues': 13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4)) + tslib: 2.8.1 + + '@polkadot/wasm-crypto-wasm@7.4.1(@polkadot/util@13.4.4)': + dependencies: + '@polkadot/util': 13.4.4 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.4.4) + tslib: 2.8.1 + + '@polkadot/wasm-crypto@7.4.1(@polkadot/util@13.4.4)(@polkadot/x-randomvalues@13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4)))': + dependencies: + '@polkadot/util': 13.4.4 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.4.4)(@polkadot/x-randomvalues@13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4))) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.4.4) + '@polkadot/wasm-crypto-init': 7.4.1(@polkadot/util@13.4.4)(@polkadot/x-randomvalues@13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4))) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.4.4) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.4.4) + '@polkadot/x-randomvalues': 13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4)) + tslib: 2.8.1 + + '@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4)': + dependencies: + '@polkadot/util': 13.4.4 + tslib: 2.8.1 + + '@polkadot/x-bigint@13.4.4': + dependencies: + '@polkadot/x-global': 13.4.4 + tslib: 2.8.1 + + '@polkadot/x-fetch@13.4.4': + dependencies: + '@polkadot/x-global': 13.4.4 + node-fetch: 3.3.2 + tslib: 2.8.1 + + '@polkadot/x-global@13.4.4': + dependencies: + tslib: 2.8.1 + + '@polkadot/x-randomvalues@13.4.4(@polkadot/util@13.4.4)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.4.4))': + dependencies: + '@polkadot/util': 13.4.4 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.4.4) + '@polkadot/x-global': 13.4.4 + tslib: 2.8.1 + + '@polkadot/x-textdecoder@13.4.4': + dependencies: + '@polkadot/x-global': 13.4.4 + tslib: 2.8.1 + + '@polkadot/x-textencoder@13.4.4': + dependencies: + '@polkadot/x-global': 13.4.4 + tslib: 2.8.1 + + '@polkadot/x-ws@13.4.4': + dependencies: + '@polkadot/x-global': 13.4.4 + tslib: 2.8.1 + ws: 8.18.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + '@radix-ui/number@1.1.1': {} '@radix-ui/primitive@1.1.2': {} @@ -4378,6 +4932,21 @@ snapshots: optionalDependencies: '@types/react': 19.1.4 + '@radix-ui/react-switch@1.2.4(@types/react-dom@19.1.5(@types/react@19.1.4))(@types/react@19.1.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': + dependencies: + '@radix-ui/primitive': 1.1.2 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.1.4)(react@19.1.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.1.4)(react@19.1.0) + '@radix-ui/react-primitive': 2.1.2(@types/react-dom@19.1.5(@types/react@19.1.4))(@types/react@19.1.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.1.4)(react@19.1.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.1.4)(react@19.1.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.1.4)(react@19.1.0) + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + optionalDependencies: + '@types/react': 19.1.4 + '@types/react-dom': 19.1.5(@types/react@19.1.4) + '@radix-ui/react-tabs@1.1.11(@types/react-dom@19.1.5(@types/react@19.1.4))(@types/react@19.1.4)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)': dependencies: '@radix-ui/primitive': 1.1.2 @@ -4599,6 +5168,37 @@ snapshots: '@sindresorhus/merge-streams@4.0.0': {} + '@substrate/connect-extension-protocol@2.2.2': + optional: true + + '@substrate/connect-known-chains@1.10.1': + optional: true + + '@substrate/connect@0.8.11': + dependencies: + '@substrate/connect-extension-protocol': 2.2.2 + '@substrate/connect-known-chains': 1.10.1 + '@substrate/light-client-extension-helpers': 1.0.0(smoldot@2.0.26) + smoldot: 2.0.26 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + optional: true + + '@substrate/light-client-extension-helpers@1.0.0(smoldot@2.0.26)': + dependencies: + '@polkadot-api/json-rpc-provider': 0.0.1 + '@polkadot-api/json-rpc-provider-proxy': 0.1.0 + '@polkadot-api/observable-client': 0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.2) + '@polkadot-api/substrate-client': 0.1.4 + '@substrate/connect-extension-protocol': 2.2.2 + '@substrate/connect-known-chains': 1.10.1 + rxjs: 7.8.2 + smoldot: 2.0.26 + optional: true + + '@substrate/ss58-registry@1.51.0': {} + '@tailwindcss/node@4.1.7': dependencies: '@ampproject/remapping': 2.3.0 @@ -4697,6 +5297,10 @@ snapshots: dependencies: '@babel/types': 7.27.0 + '@types/bn.js@5.1.6': + dependencies: + '@types/node': 22.15.18 + '@types/estree@1.0.7': {} '@types/json-schema@7.0.15': {} @@ -5191,6 +5795,8 @@ snapshots: base64-js@1.5.1: {} + bn.js@5.2.2: {} + body-parser@2.2.0: dependencies: bytes: 3.1.2 @@ -5318,6 +5924,10 @@ snapshots: color-name@1.1.4: {} + colorette@2.0.20: {} + + comlink@4.4.2: {} + commander@13.1.0: {} commander@4.1.1: {} @@ -5369,6 +5979,10 @@ snapshots: csstype@3.1.3: {} + data-uri-to-buffer@4.0.1: {} + + dateformat@4.6.3: {} + debug@4.4.1: dependencies: ms: 2.1.3 @@ -5623,6 +6237,8 @@ snapshots: transitivePeerDependencies: - supports-color + fast-copy@3.0.2: {} + fast-deep-equal@3.1.3: {} fast-glob@3.3.3: @@ -5639,6 +6255,8 @@ snapshots: fast-redact@3.5.0: {} + fast-safe-stringify@2.1.1: {} + fastq@1.19.1: dependencies: reusify: 1.1.0 @@ -5647,6 +6265,11 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + fetch-blob@3.2.0: + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.3.3 + figures@6.1.0: dependencies: is-unicode-supported: 2.1.0 @@ -5694,6 +6317,10 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 + formdata-polyfill@4.0.10: + dependencies: + fetch-blob: 3.2.0 + forwarded@0.2.0: {} fresh@2.0.0: {} @@ -5785,6 +6412,8 @@ snapshots: dependencies: function-bind: 1.1.2 + help-me@5.0.0: {} + hey-listen@1.0.8: {} hosted-git-info@7.0.2: @@ -5880,6 +6509,8 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} + json-stringify-safe@5.0.1: {} + json5@2.2.3: {} keyv@4.5.4: @@ -5972,6 +6603,8 @@ snapshots: lodash.sortby@4.7.0: {} + lodash@4.17.21: {} + log-symbols@6.0.0: dependencies: chalk: 5.4.1 @@ -5985,6 +6618,8 @@ snapshots: lru-cache@10.4.3: {} + lru-cache@11.1.0: {} + lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -6026,6 +6661,8 @@ snapshots: dependencies: brace-expansion: 2.0.1 + minimist@1.2.8: {} + minipass@7.1.2: {} minizlib@3.0.2: @@ -6034,6 +6671,8 @@ snapshots: mkdirp@3.0.1: {} + mock-socket@9.3.1: {} + motion@10.16.2: dependencies: '@motionone/animation': 10.18.0 @@ -6059,12 +6698,28 @@ snapshots: negotiator@1.0.0: {} + nock@13.5.6: + dependencies: + debug: 4.4.1 + json-stringify-safe: 5.0.1 + propagate: 2.0.1 + transitivePeerDependencies: + - supports-color + + node-domexception@1.0.0: {} + node-fetch-native@1.6.6: {} node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 + node-fetch@3.3.2: + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 + node-mock-http@1.0.0: {} node-releases@2.0.19: {} @@ -6094,6 +6749,8 @@ snapshots: on-exit-leak-free@0.2.0: {} + on-exit-leak-free@2.1.2: {} + on-finished@2.4.1: dependencies: ee-first: 1.1.1 @@ -6201,8 +6858,30 @@ snapshots: duplexify: 4.1.3 split2: 4.2.0 + pino-abstract-transport@2.0.0: + dependencies: + split2: 4.2.0 + + pino-pretty@13.0.0: + dependencies: + colorette: 2.0.20 + dateformat: 4.6.3 + fast-copy: 3.0.2 + fast-safe-stringify: 2.1.1 + help-me: 5.0.0 + joycon: 3.1.1 + minimist: 1.2.8 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 2.0.0 + pump: 3.0.2 + secure-json-parse: 2.7.0 + sonic-boom: 4.2.0 + strip-json-comments: 3.1.1 + pino-std-serializers@4.0.0: {} + pino-std-serializers@7.0.0: {} + pino@7.11.0: dependencies: atomic-sleep: 1.0.0 @@ -6217,6 +6896,20 @@ snapshots: sonic-boom: 2.8.0 thread-stream: 0.15.2 + pino@9.6.0: + dependencies: + atomic-sleep: 1.0.0 + fast-redact: 3.5.0 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 2.0.0 + pino-std-serializers: 7.0.0 + process-warning: 4.0.1 + quick-format-unescaped: 4.0.4 + real-require: 0.2.0 + safe-stable-stringify: 2.5.0 + sonic-boom: 4.2.0 + thread-stream: 3.1.0 + pirates@4.0.7: {} pkce-challenge@5.0.0: {} @@ -6280,12 +6973,16 @@ snapshots: process-warning@1.0.0: {} + process-warning@4.0.1: {} + prop-types@15.8.1: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 react-is: 16.13.1 + propagate@2.0.1: {} + proxy-addr@2.0.7: dependencies: forwarded: 0.2.0 @@ -6293,6 +6990,11 @@ snapshots: proxy-compare@2.5.1: {} + pump@3.0.2: + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + punycode@2.3.1: {} qrcode@1.5.3: @@ -6423,6 +7125,8 @@ snapshots: real-require@0.1.0: {} + real-require@0.2.0: {} + regenerator-runtime@0.14.1: {} require-directory@2.1.1: {} @@ -6498,6 +7202,8 @@ snapshots: scheduler@0.26.0: {} + secure-json-parse@2.7.0: {} + semver@6.3.1: {} semver@7.7.2: {} @@ -6569,6 +7275,14 @@ snapshots: signal-exit@4.1.0: {} + smoldot@2.0.26: + dependencies: + ws: 8.18.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + optional: true + smoldot@2.0.34: dependencies: ws: 8.18.2 @@ -6580,6 +7294,10 @@ snapshots: dependencies: atomic-sleep: 1.0.0 + sonic-boom@4.2.0: + dependencies: + atomic-sleep: 1.0.0 + sort-keys@5.1.0: dependencies: is-plain-obj: 4.1.0 @@ -6695,6 +7413,10 @@ snapshots: dependencies: real-require: 0.1.0 + thread-stream@3.1.0: + dependencies: + real-require: 0.2.0 + tinyexec@0.3.2: {} tinyglobby@0.2.13: @@ -6896,6 +7618,8 @@ snapshots: lightningcss: 1.30.1 yaml: 2.6.1 + web-streams-polyfill@3.3.3: {} + webidl-conversions@3.0.1: {} webidl-conversions@4.0.2: {} diff --git a/src/chopsticks/chopsticks.ts b/src/chopsticks/chopsticks.ts new file mode 100644 index 0000000..44ffaa1 --- /dev/null +++ b/src/chopsticks/chopsticks.ts @@ -0,0 +1,5 @@ +import { + ChopsticksProvider, + setStorage, + setup, +} from "@acala-network/chopsticks-core" diff --git a/src/chopsticks/chopsticksProviderInterface.ts b/src/chopsticks/chopsticksProviderInterface.ts new file mode 100644 index 0000000..0a09e50 --- /dev/null +++ b/src/chopsticks/chopsticksProviderInterface.ts @@ -0,0 +1,121 @@ +import { + JsonRpcConnection, + JsonRpcProvider, +} from "@polkadot-api/substrate-client" +import { + connectable, + filter, + firstValueFrom, + Observable, + Subject, + Subscription, +} from "rxjs" +// import { Provider } from "@acala-network/chopsticks-core" + +type ProviderInterfaceCallback = (error: Error | null, result: any) => void +type ProviderInterfaceEmitted = "connected" | "disconnected" | "error" +type ProviderInterfaceEmitCb = (value?: any) => any +interface ProviderInterface { + /** true if the provider supports subscriptions (not available for HTTP) */ + readonly hasSubscriptions: boolean + /** true if the clone() functionality is available on the provider */ + readonly isClonable: boolean + /** true if the provider is currently connected (ws/sc has connection logic) */ + readonly isConnected: boolean + clone(): ProviderInterface + connect(): Promise + disconnect(): Promise + on(type: ProviderInterfaceEmitted, sub: ProviderInterfaceEmitCb): () => void + send( + method: string, + params: unknown[], + isCacheable?: boolean, + ): Promise + subscribe( + type: string, + method: string, + params: unknown[], + cb: ProviderInterfaceCallback, + ): Promise + unsubscribe( + type: string, + method: string, + id: number | string, + ): Promise +} + +type JsonRpcResponse = { + jsonrpc: "2.0" + id: number + result?: unknown + error?: unknown +} +type JsonRpcRequest = { + jsonrpc: "2.0" + method: string + params: unknown[] + id?: number +} + +export const chopsticksProviderInterfaceFromJsonRPC = ( + provider: JsonRpcProvider, +): ProviderInterface => { + let connection: JsonRpcConnection | null = null + const connectionEvt$ = new Subject() + const shared$ = connectable( + new Observable((obs) => { + connection = provider((v) => obs.next(JSON.parse(v))) + connectionEvt$.next("connected") + + return () => { + connection?.disconnect() + connection = null + connectionEvt$.next("disconnected") + } + }), + ) + let topSubscription: Subscription | null = null + + let nextId = 0 + + return { + hasSubscriptions: true, + isClonable: false, + get isConnected() { + return !!connection + }, + clone() { + throw new Error("Not clonable") + }, + async connect() { + if (connection) return + topSubscription = shared$.connect() + }, + async disconnect() { + topSubscription?.unsubscribe() + }, + on(type, cb) { + const sub = connectionEvt$.pipe(filter((v) => v === type)).subscribe(cb) + return () => sub.unsubscribe() + }, + async send(method: string, params: unknown[]) { + const id = nextId++ + const responsePromise = firstValueFrom( + shared$.pipe(filter((v) => v.id === id)), + ) + + connection?.send( + JSON.stringify({ + jsonrpc: "2.0", + method, + params, + id, + } satisfies JsonRpcRequest), + ) + + const response = await responsePromise + if (response.result) return response.result as T + throw response.error + }, + } +} diff --git a/src/components/CommandPopover.tsx b/src/components/CommandPopover.tsx new file mode 100644 index 0000000..859fa38 --- /dev/null +++ b/src/components/CommandPopover.tsx @@ -0,0 +1,94 @@ +import * as React from "react" +import { Command, CommandInput } from "./ui/command" +import { useEffect } from "react" + +type CommandPopoverProps = React.PropsWithChildren<{ + placeholder?: string + value?: string + selectedValue?: unknown + onValueChange?: (value: string) => void +}> + +export function CommandPopover({ + placeholder, + value, + onValueChange, + selectedValue, + children, +}: CommandPopoverProps) { + const [open, setOpen] = React.useState(false) + const inputRef = React.useRef(null) + const commandRef = React.useRef(null) + + const handleInputChange = (value: string) => { + onValueChange?.(value) + if (!open) setOpen(true) + } + + // Handle click outside + useEffect(() => { + const handleClickOutside = (event: MouseEvent) => { + if ( + commandRef.current && + !commandRef.current.contains(event.target as Node) && + inputRef.current && + !inputRef.current.contains(event.target as Node) + ) { + setOpen(false) + } + } + + document.addEventListener("mousedown", handleClickOutside) + return () => { + document.removeEventListener("mousedown", handleClickOutside) + } + }, []) + + useEffect(() => { + setOpen(false) + onValueChange?.("") + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [selectedValue]) + + // Handle keyboard events for showing/hiding the command menu + const handleKeyDown = (e: React.KeyboardEvent) => { + // Show the command menu on arrow down when it's closed + if (e.key === "ArrowDown" && !open) { + e.preventDefault() + setOpen(true) + } + + // Hide the command menu on escape + if (e.key === "Escape" && open) { + e.preventDefault() + setOpen(false) + } + } + + return ( +
+ + setOpen(true)} + placeholder={placeholder} + className="border-none focus:ring-0" + /> + + {open && ( +
+ {children} +
+ )} +
+
+ ) +} diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx new file mode 100644 index 0000000..3e5015b --- /dev/null +++ b/src/components/ui/badge.tsx @@ -0,0 +1,46 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const badgeVariants = cva( + "inline-flex items-center justify-center rounded-md border border-neutral-200 px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 transition-[color,box-shadow] overflow-hidden dark:border-neutral-800 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900", + { + variants: { + variant: { + default: + "border-transparent bg-neutral-900 text-neutral-50 [a&]:hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:[a&]:hover:bg-neutral-50/90", + secondary: + "border-transparent bg-neutral-100 text-neutral-900 [a&]:hover:bg-neutral-100/90 dark:bg-neutral-800 dark:text-neutral-50 dark:[a&]:hover:bg-neutral-800/90", + destructive: + "border-transparent bg-red-500 text-white [a&]:hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-500/60 dark:bg-red-900 dark:[a&]:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40 dark:dark:bg-red-900/60", + outline: + "text-neutral-950 [a&]:hover:bg-neutral-100 [a&]:hover:text-neutral-900 dark:text-neutral-50 dark:[a&]:hover:bg-neutral-800 dark:[a&]:hover:text-neutral-50", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Badge({ + className, + variant, + asChild = false, + ...props +}: React.ComponentProps<"span"> & + VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot : "span" + + return ( + + ) +} + +export { Badge, badgeVariants } diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx new file mode 100644 index 0000000..5bfc5c7 --- /dev/null +++ b/src/components/ui/input.tsx @@ -0,0 +1,21 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +function Input({ className, type, ...props }: React.ComponentProps<"input">) { + return ( + + ) +} + +export { Input } diff --git a/src/components/ui/switch.tsx b/src/components/ui/switch.tsx new file mode 100644 index 0000000..3b12fbe --- /dev/null +++ b/src/components/ui/switch.tsx @@ -0,0 +1,29 @@ +import * as React from "react" +import * as SwitchPrimitive from "@radix-ui/react-switch" + +import { cn } from "@/lib/utils" + +function Switch({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +export { Switch } diff --git a/src/pages/Network/Network.tsx b/src/pages/Network/Network.tsx index 37a7ac1..85958ca 100644 --- a/src/pages/Network/Network.tsx +++ b/src/pages/Network/Network.tsx @@ -1,15 +1,10 @@ -import { - Accordion, - AccordionContent, - AccordionItem, - AccordionTrigger, -} from "@/components/ui/accordion" +import { CommandPopover } from "@/components/CommandPopover" +import { CopyText } from "@/components/Copy" +import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { - Command, CommandEmpty, CommandGroup, - CommandInput, CommandItem, CommandList, } from "@/components/ui/command" @@ -23,6 +18,7 @@ import { import { Label } from "@/components/ui/label" import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group" import { ScrollArea } from "@/components/ui/scroll-area" +import { Switch } from "@/components/ui/switch" import { isValidUri, Network, @@ -33,61 +29,8 @@ import { } from "@/state/chains/chain.state" import { addCustomNetwork, getCustomNetwork } from "@/state/chains/networks" import { useStateObservable } from "@react-rxjs/core" -import { useCommandState } from "cmdk" -import { Check, ChevronDown } from "lucide-react" -import { FC, useEffect, useRef, useState } from "react" - -const EmptyOption: React.FC<{ - enteredText: string - selectedNetwork: Network - selectedRpc: string - setSelectedNetwork: React.Dispatch> - setSelectedRpc: React.Dispatch> -}> = (props) => - useCommandState((x) => x.filtered.count) ? null : - -const Empty: React.FC<{ - enteredText: string - selectedNetwork: Network - selectedRpc: string - setSelectedNetwork: React.Dispatch> - setSelectedRpc: React.Dispatch> -}> = ({ - enteredText, - selectedNetwork, - selectedRpc, - setSelectedNetwork, - setSelectedRpc, -}) => { - const initialValue = useRef({ - selectedNetwork, - selectedRpc, - }) - const isValid = isValidUri(enteredText) - useEffect(() => { - setSelectedNetwork({ - id: "custom-network", - lightclient: false, - endpoints: { custom: enteredText }, - display: enteredText, - }) - setSelectedRpc(isValid ? enteredText : "") - return () => { - if (!isValid) { - setSelectedNetwork(initialValue.current.selectedNetwork) - setSelectedRpc(initialValue.current.selectedRpc) - } - } - }, [enteredText, isValid]) - return isValid ? ( -
- - {enteredText} -
- ) : ( - No networks found. - ) -} +import { Check, ChevronDown, Server } from "lucide-react" +import { FC, useState } from "react" export function NetworkSwitcher() { const [open, setOpen] = useState(false) @@ -156,93 +99,132 @@ const NetworkSwitchDialogContent: FC<{ } return ( - + { + if ( + evt.target instanceof HTMLElement && + (evt.target.tagName === "INPUT" || + evt.target.attributes.getNamedItem("cmdk-list")) + ) { + evt.preventDefault() + } + }} + > Switch Network - - + - - - - {networkCategories.map((category) => ( - - {category.networks.map((network) => ( - handleNetworkSelect(network)} - value={ - network.display.includes(category.name) - ? network.display - : `${category.name} ${network.display}` - } - > - - {network.display} - - ))} - - ))} - - - - {selectedNetwork && selectedNetwork.id !== "custom-network" && ( - - - Connection Options - - - - {selectedNetwork.lightclient ? ( -
- setSelectedRpc("light-client")} + selectedValue={selectedNetwork.id} + > + + +
No networks found.
+
+ + {networkCategories.map((category) => ( + + {category.networks.map((network) => ( + handleNetworkSelect(network)} + value={ + network.display.includes(category.name) + ? network.display + : `${category.name} ${network.display}` + } + > + - -
+ {network.display} + + ))} + {category.name === "Custom" && isValidUri(enteredText) ? ( + { + handleNetworkSelect({ + id: "custom-network", + lightclient: false, + endpoints: { custom: enteredText }, + display: enteredText, + }) + }} + > + + {enteredText} + + ) : null} + + ))} +
+ + +
+ {selectedNetwork ? ( +
+

Network: {selectedNetwork.display}

+
+ + {selectedNetwork.lightclient ? ( + ) : null} {Object.entries(selectedNetwork.endpoints).map( ([rpcName, url]) => ( -
- setSelectedRpc(url)} - /> - -
+ ), )}
- - - - - )} +
+
+ ) : null} + {selectedRpc && selectedRpc !== "light-client" && ( +
+
+
+ + +
+ +
+

+ Create a local development fork of this chain +

+
+ )} +
+