diff --git a/.env.example b/.env.example index 2fa1fa5..e88d87c 100644 --- a/.env.example +++ b/.env.example @@ -2,3 +2,4 @@ ETHERLINK_TESTNET_USER_PRIVATE_KEY=*** MONAD_TESTNET_USER_PRIVATE_KEY=*** BASE_SEPOLIA_USER_PRIVATE_KEY=*** SEPOLIA_USER_PRIVATE_KEY=*** +NILE_USER_PRIVATE_KEY=*** diff --git a/.gitignore b/.gitignore index e72b4d6..19b8221 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,5 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +.idea diff --git a/README.md b/README.md index d80b825..6170822 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 21inches Webapp -A cross-chain decentralized exchange web application built with Next.js, supporting multiple EVM networks including Ethereum Sepolia, Base Sepolia, Etherlink Testnet, Tron Nile, and Monad Testnet. +A cross-chain decentralized exchange web application built with Next.js, supporting multiple EVM networks including Ethereum Sepolia, Tron, Base Sepolia, Etherlink Testnet, Tron Testnet (Nile), and Monad Testnet. ## Installation @@ -36,6 +36,7 @@ ETHERLINK_TESTNET_USER_PRIVATE_KEY=*** MONAD_TESTNET_USER_PRIVATE_KEY=*** BASE_SEPOLIA_USER_PRIVATE_KEY=*** SEPOLIA_USER_PRIVATE_KEY=*** +NILE_USER_PRIVATE_KEY=*** ``` ## Available Scripts diff --git a/package.json b/package.json index e7bbdb7..8110251 100644 --- a/package.json +++ b/package.json @@ -15,12 +15,17 @@ "@heroicons/react": "^2.2.0", "@rainbow-me/rainbowkit": "^2.2.8", "@tanstack/react-query": "^5.84.1", + "@tronweb3/tronwallet-abstract-adapter": "^1.1.9", + "@tronweb3/tronwallet-adapter-react-hooks": "^1.1.10", + "@tronweb3/tronwallet-adapter-react-ui": "^1.1.11", + "@tronweb3/tronwallet-adapters": "^1.2.12", "dotenv": "^17.2.1", "ethers": "^6.15.0", "next": "15.4.4", "pino-pretty": "^13.1.1", "react": "19.1.0", "react-dom": "19.1.0", + "tronweb": "^6.0.4", "viem": "~2.33.2", "wagmi": "^2.16.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5861b05..729df09 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,18 @@ importers: '@tanstack/react-query': specifier: ^5.84.1 version: 5.84.1(react@19.1.0) + '@tronweb3/tronwallet-abstract-adapter': + specifier: ^1.1.9 + version: 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-react-hooks': + specifier: ^1.1.10 + version: 1.1.10(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-react-ui': + specifier: ^1.1.11 + version: 1.1.11(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapters': + specifier: ^1.2.12 + version: 1.2.12(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) dotenv: specifier: ^17.2.1 version: 17.2.1 @@ -38,6 +50,9 @@ importers: react-dom: specifier: 19.1.0 version: 19.1.0(react@19.1.0) + tronweb: + specifier: ^6.0.4 + version: 6.0.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) viem: specifier: ~2.33.2 version: 2.33.2(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) @@ -133,12 +148,18 @@ packages: axios: optional: true + '@adraffy/ens-normalize@1.10.0': + resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} + '@adraffy/ens-normalize@1.10.1': resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} '@adraffy/ens-normalize@1.11.0': resolution: {integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==} + '@adraffy/ens-normalize@1.9.0': + resolution: {integrity: sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==} + '@alloc/quick-lru@5.2.0': resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -147,6 +168,10 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@babel/runtime@7.26.10': + resolution: {integrity: sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==} + engines: {node: '>=6.9.0'} + '@babel/runtime@7.28.2': resolution: {integrity: sha512-KHp2IflsnGywDjBWDkR9iEqiWSpc8GIi0lgTT3mOElT0PP1tG26P4tmFI2YvAdzgq9RGyoHZQEIEdZy6Ec5xCA==} engines: {node: '>=6.9.0'} @@ -154,6 +179,12 @@ packages: '@base-org/account@1.1.1': resolution: {integrity: sha512-IfVJPrDPhHfqXRDb89472hXkpvJuQQR7FDI9isLPHEqSYt/45whIoBxSPgZ0ssTt379VhQo4+87PWI1DoLSfAQ==} + '@binance/w3w-types@1.1.4': + resolution: {integrity: sha512-CCnneapNTVY1+RseZNIhExVp3ux8LihcXRkGwmvJtZTTJJIC7xQlTWy9olkAsz+opqWK+heAcyYGmt4RUt1M5g==} + + '@binance/w3w-utils@1.1.7': + resolution: {integrity: sha512-dAP/Rh/kYH3D5hwJDvbeD7Zt0lysKyEulmFjCmfN0vcXsoaSFeo3tYQ97bkiJURzhatFRYYGxr7rhw5lr7foWA==} + '@coinbase/wallet-sdk@3.9.3': resolution: {integrity: sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==} @@ -337,92 +368,78 @@ packages: resolution: {integrity: sha512-RXwd0CgG+uPRX5YYrkzKyalt2OJYRiJQ8ED/fi1tq9WQW2jsQIn0tqrlR5l5dr/rjqq6AHAxURhj2DVjyQWSOA==} cpu: [arm64] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-arm@1.2.0': resolution: {integrity: sha512-mWd2uWvDtL/nvIzThLq3fr2nnGfyr/XMXlq8ZJ9WMR6PXijHlC3ksp0IpuhK6bougvQrchUAfzRLnbsen0Cqvw==} cpu: [arm] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-ppc64@1.2.0': resolution: {integrity: sha512-Xod/7KaDDHkYu2phxxfeEPXfVXFKx70EAFZ0qyUdOjCcxbjqyJOEUpDe6RIyaunGxT34Anf9ue/wuWOqBW2WcQ==} cpu: [ppc64] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-s390x@1.2.0': resolution: {integrity: sha512-eMKfzDxLGT8mnmPJTNMcjfO33fLiTDsrMlUVcp6b96ETbnJmd4uvZxVJSKPQfS+odwfVaGifhsB07J1LynFehw==} cpu: [s390x] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-x64@1.2.0': resolution: {integrity: sha512-ZW3FPWIc7K1sH9E3nxIGB3y3dZkpJlMnkk7z5tu1nSkBoCgw2nSRTFHI5pB/3CQaJM0pdzMF3paf9ckKMSE9Tg==} cpu: [x64] os: [linux] - libc: [glibc] '@img/sharp-libvips-linuxmusl-arm64@1.2.0': resolution: {integrity: sha512-UG+LqQJbf5VJ8NWJ5Z3tdIe/HXjuIdo4JeVNADXBFuG7z9zjoegpzzGIyV5zQKi4zaJjnAd2+g2nna8TZvuW9Q==} cpu: [arm64] os: [linux] - libc: [musl] '@img/sharp-libvips-linuxmusl-x64@1.2.0': resolution: {integrity: sha512-SRYOLR7CXPgNze8akZwjoGBoN1ThNZoqpOgfnOxmWsklTGVfJiGJoC/Lod7aNMGA1jSsKWM1+HRX43OP6p9+6Q==} cpu: [x64] os: [linux] - libc: [musl] '@img/sharp-linux-arm64@0.34.3': resolution: {integrity: sha512-QdrKe3EvQrqwkDrtuTIjI0bu6YEJHTgEeqdzI3uWJOH6G1O8Nl1iEeVYRGdj1h5I21CqxSvQp1Yv7xeU3ZewbA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - libc: [glibc] '@img/sharp-linux-arm@0.34.3': resolution: {integrity: sha512-oBK9l+h6KBN0i3dC8rYntLiVfW8D8wH+NPNT3O/WBHeW0OQWCjfWksLUaPidsrDKpJgXp3G3/hkmhptAW0I3+A==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm] os: [linux] - libc: [glibc] '@img/sharp-linux-ppc64@0.34.3': resolution: {integrity: sha512-GLtbLQMCNC5nxuImPR2+RgrviwKwVql28FWZIW1zWruy6zLgA5/x2ZXk3mxj58X/tszVF69KK0Is83V8YgWhLA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [ppc64] os: [linux] - libc: [glibc] '@img/sharp-linux-s390x@0.34.3': resolution: {integrity: sha512-3gahT+A6c4cdc2edhsLHmIOXMb17ltffJlxR0aC2VPZfwKoTGZec6u5GrFgdR7ciJSsHT27BD3TIuGcuRT0KmQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [s390x] os: [linux] - libc: [glibc] '@img/sharp-linux-x64@0.34.3': resolution: {integrity: sha512-8kYso8d806ypnSq3/Ly0QEw90V5ZoHh10yH0HnrzOCr6DKAPI6QVHvwleqMkVQ0m+fc7EH8ah0BB0QPuWY6zJQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - libc: [glibc] '@img/sharp-linuxmusl-arm64@0.34.3': resolution: {integrity: sha512-vAjbHDlr4izEiXM1OTggpCcPg9tn4YriK5vAjowJsHwdBIdx0fYRsURkxLG2RLm9gyBq66gwtWI8Gx0/ov+JKQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - libc: [musl] '@img/sharp-linuxmusl-x64@0.34.3': resolution: {integrity: sha512-gCWUn9547K5bwvOn9l5XGAEjVTTRji4aPTqLzGXHvIr6bIDZKNTA34seMPgM0WmSf+RYBH411VavCejp3PkOeQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - libc: [musl] '@img/sharp-wasm32@0.34.3': resolution: {integrity: sha512-+CyRcpagHMGteySaWos8IbnXcHgfDn7pO2fiC2slJxvNq9gDipYBN42/RagzctVRKgxATmfqOSulgZv5e1RdMg==} @@ -464,9 +481,36 @@ packages: '@jridgewell/trace-mapping@0.3.29': resolution: {integrity: sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==} + '@ledgerhq/devices@6.27.1': + resolution: {integrity: sha512-jX++oy89jtv7Dp2X6gwt3MMkoajel80JFWcdc0HCouwDsV1mVJ3SQdwl/bQU0zd8HI6KebvUP95QTwbQLLK/RQ==} + + '@ledgerhq/devices@8.4.8': + resolution: {integrity: sha512-joodpi1lTIoPswpH6DBtlAieEfP0xB1NlM8RY3xj82EtO8eU1IRqTQz7wtsbstXJ1FdLRg/CJ5OL41omdBsrZQ==} + + '@ledgerhq/errors@6.23.0': + resolution: {integrity: sha512-bM7tPYShPThtBy1Y+9D28iquOeP5W5s4p7KKD/cUQoaVaPibrtC7Mm4u+IeSlH4WGvFJkTmv0vmZJajuZtM79A==} + + '@ledgerhq/hw-app-trx@6.31.4': + resolution: {integrity: sha512-JUoBxCOCKVlPx3Ilb+mChcRBp1mnKy4z9zqwIxq21HEQIPA+c8TFcYDBYPlC9xUTawuUM82waSAmAcanqekarw==} + + '@ledgerhq/hw-transport-webhid@6.27.1': + resolution: {integrity: sha512-u74rBYlibpbyGblSn74fRs2pMM19gEAkYhfVibq0RE1GNFjxDMFC1n7Sb+93Jqmz8flyfB4UFJsxs8/l1tm2Kw==} + + '@ledgerhq/hw-transport@6.27.1': + resolution: {integrity: sha512-hnE4/Fq1YzQI4PA1W0H8tCkI99R3UWDb3pJeZd6/Xs4Qw/q1uiQO+vNLC6KIPPhK0IajUfuI/P2jk0qWcMsuAQ==} + + '@ledgerhq/hw-transport@6.31.8': + resolution: {integrity: sha512-iH74gILq8BkkLX1Il0wNhcYp1BJ3tjR18fdok4KEdU86i9dOXRKfLbWNhDDFf1px/pMrsGlDS4SpaO74janeEA==} + + '@ledgerhq/logs@6.13.0': + resolution: {integrity: sha512-4+qRW2Pc8V+btL0QEmdB2X+uyx0kOWMWE1/LWsq5sZy3Q5tpi4eItJS6mB0XL3wGW59RQ+8bchNQQ1OW/va8Og==} + '@lit-labs/ssr-dom-shim@1.4.0': resolution: {integrity: sha512-ficsEARKnmmW5njugNYKipTm4SFnbik7CXtoencDZzmzo/dQ+2Q0bgkzJuoJP20Aj0F+izzJjOqsnkd6F/o1bw==} + '@lit/reactive-element@1.6.3': + resolution: {integrity: sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==} + '@lit/reactive-element@2.1.1': resolution: {integrity: sha512-N+dm5PAYdQ8e6UlywyyrgI2t++wFGXfHx+dSJ1oBrg6FAxUj40jId++EaRm80MKX5JnlH1sBsyZ5h0bcZKemCg==} @@ -539,6 +583,31 @@ packages: resolution: {integrity: sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g==} engines: {node: '>=16.0.0'} + '@motionone/animation@10.18.0': + resolution: {integrity: sha512-9z2p5GFGCm0gBsZbi8rVMOAJCtw1WqBTIPw3ozk06gDvZInBPIsQcHgYogEJ4yuHJ+akuW8g1SEIOpTOvYs8hw==} + + '@motionone/dom@10.18.0': + resolution: {integrity: sha512-bKLP7E0eyO4B2UaHBBN55tnppwRnaE3KFfh3Ps9HhnAkar3Cb69kUCJY9as8LrccVYKgHA+JY5dOQqJLOPhF5A==} + + '@motionone/easing@10.18.0': + resolution: {integrity: sha512-VcjByo7XpdLS4o9T8t99JtgxkdMcNWD3yHU/n6CLEz3bkmKDRZyYQ/wmSf6daum8ZXqfUAgFeCZSpJZIMxaCzg==} + + '@motionone/generators@10.18.0': + resolution: {integrity: sha512-+qfkC2DtkDj4tHPu+AFKVfR/C30O1vYdvsGYaR13W/1cczPrrcjdvYCj0VLFuRMN+lP1xvpNZHCRNM4fBzn1jg==} + + '@motionone/svelte@10.16.4': + resolution: {integrity: sha512-zRVqk20lD1xqe+yEDZhMYgftsuHc25+9JSo+r0a0OWUJFocjSV9D/+UGhX4xgJsuwB9acPzXLr20w40VnY2PQA==} + + '@motionone/types@10.17.1': + resolution: {integrity: sha512-KaC4kgiODDz8hswCrS0btrVrzyU2CSQKO7Ps90ibBVSQmjkrt2teqta6/sOG59v7+dPnKMAg13jyqtMKV2yJ7A==} + + '@motionone/utils@10.18.0': + resolution: {integrity: sha512-3XVF7sgyTSI2KWvTf6uLlBJ5iAgRgmvp3bpuOiQJvInd4nZ19ET8lX5unn30SlmRH7hXbBbH+Gxd0m0klJ3Xtw==} + + '@motionone/vue@10.16.4': + resolution: {integrity: sha512-z10PF9JV6SbjFq+/rYabM+8CVlMokgl8RFGvieSGNTmrkQanfHn+15XBrhG3BgUfvmTeSeyShfOHpG0i9zEdcg==} + deprecated: Motion One for Vue is deprecated. Use Oku Motion instead https://oku-ui.com/motion + '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} @@ -565,28 +634,24 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] '@next/swc-linux-arm64-musl@15.4.4': resolution: {integrity: sha512-LsGUCTvuZ0690fFWerA4lnQvjkYg9gHo12A3wiPUR4kCxbx/d+SlwmonuTH2SWZI+RVGA9VL3N0S03WTYv6bYg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [musl] '@next/swc-linux-x64-gnu@15.4.4': resolution: {integrity: sha512-aOy5yNRpLL3wNiJVkFYl6w22hdREERNjvegE6vvtix8LHRdsTHhWTpgvcYdCK7AIDCQW5ATmzr9XkPHvSoAnvg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] '@next/swc-linux-x64-musl@15.4.4': resolution: {integrity: sha512-FL7OAn4UkR8hKQRGBmlHiHinzOb07tsfARdGh7v0Z0jEJ3sz8/7L5bR23ble9E6DZMabSStqlATHlSxv1fuzAg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [musl] '@next/swc-win32-arm64-msvc@15.4.4': resolution: {integrity: sha512-eEdNW/TXwjYhOulQh0pffTMMItWVwKCQpbziSBmgBNFZIIRn2GTXrhrewevs8wP8KXWYMx8Z+mNU0X+AfvtrRg==} @@ -600,6 +665,10 @@ packages: cpu: [x64] os: [win32] + '@noble/ciphers@1.2.0': + resolution: {integrity: sha512-YGdEUzYEd+82jeaVbSKKVp1jFZb8LwaNMIIzHFkihGvYdd/KKAr7KaJHdEdSYGredE3ssSravXIa0Jxg28Sv5w==} + engines: {node: ^14.21.3 || >=16} + '@noble/ciphers@1.2.1': resolution: {integrity: sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA==} engines: {node: ^14.21.3 || >=16} @@ -608,6 +677,9 @@ packages: resolution: {integrity: sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==} engines: {node: ^14.21.3 || >=16} + '@noble/curves@1.0.0': + resolution: {integrity: sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw==} + '@noble/curves@1.2.0': resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} @@ -630,6 +702,9 @@ packages: resolution: {integrity: sha512-GIKz/j99FRthB8icyJQA51E8Uk5hXmdyThjgQXRKiv9h0zeRlzSCLIzFw6K1LotZ3XuB7yzlf76qk7uBmTdFqA==} engines: {node: ^14.21.3 || >=16} + '@noble/hashes@1.3.0': + resolution: {integrity: sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==} + '@noble/hashes@1.3.2': resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} @@ -730,6 +805,9 @@ packages: '@safe-global/safe-apps-provider@0.18.6': resolution: {integrity: sha512-4LhMmjPWlIO8TTDC2AwLk44XKXaK6hfBTWyljDm0HQ6TWlOEijVWNrt2s3OCVMSxlXAcEzYfqyu1daHZooTC2Q==} + '@safe-global/safe-apps-sdk@8.1.0': + resolution: {integrity: sha512-XJbEPuaVc7b9n23MqlF6c+ToYIS3f7P2Sel8f3cSBQ9WORE4xrSuvhMpK9fDSFqJ7by/brc+rmJR/5HViRr0/w==} + '@safe-global/safe-apps-sdk@9.1.0': resolution: {integrity: sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q==} @@ -743,6 +821,12 @@ packages: '@scure/base@1.2.6': resolution: {integrity: sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==} + '@scure/bip32@1.3.0': + resolution: {integrity: sha512-bcKpo1oj54hGholplGLpqPHRbIsnbixFtc06nwuNM5/dwSXOq/AAYoIBRsBmnZJSdfeNW5rnff7NTAz3ZCqR9Q==} + + '@scure/bip32@1.3.2': + resolution: {integrity: sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==} + '@scure/bip32@1.4.0': resolution: {integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==} @@ -752,6 +836,12 @@ packages: '@scure/bip32@1.7.0': resolution: {integrity: sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==} + '@scure/bip39@1.2.0': + resolution: {integrity: sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==} + + '@scure/bip39@1.2.1': + resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} + '@scure/bip39@1.3.0': resolution: {integrity: sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==} @@ -764,21 +854,48 @@ packages: '@socket.io/component-emitter@3.1.2': resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} + '@stablelib/aead@1.0.1': + resolution: {integrity: sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg==} + '@stablelib/binary@1.0.1': resolution: {integrity: sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==} '@stablelib/bytes@1.0.1': resolution: {integrity: sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ==} + '@stablelib/chacha20poly1305@1.0.1': + resolution: {integrity: sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA==} + + '@stablelib/chacha@1.0.1': + resolution: {integrity: sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg==} + + '@stablelib/constant-time@1.0.1': + resolution: {integrity: sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg==} + + '@stablelib/hash@1.0.1': + resolution: {integrity: sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==} + + '@stablelib/hkdf@1.0.1': + resolution: {integrity: sha512-SBEHYE16ZXlHuaW5RcGk533YlBj4grMeg5TooN80W3NpcHRtLZLLXvKyX0qcRFxf+BGDobJLnwkvgEwHIDBR6g==} + + '@stablelib/hmac@1.0.1': + resolution: {integrity: sha512-V2APD9NSnhVpV/QMYgCVMIYKiYG6LSqw1S65wxVoirhU/51ACio6D4yDVSwMzuTJXWZoVHbDdINioBwKy5kVmA==} + '@stablelib/int@1.0.1': resolution: {integrity: sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==} '@stablelib/keyagreement@1.0.1': resolution: {integrity: sha512-VKL6xBwgJnI6l1jKrBAfn265cspaWBPAPEc62VBQrWHLqVgNRE09gQ/AnOEyKUWrrqfD+xSQ3u42gJjLDdMDQg==} + '@stablelib/poly1305@1.0.1': + resolution: {integrity: sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA==} + '@stablelib/random@1.0.2': resolution: {integrity: sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==} + '@stablelib/sha256@1.0.1': + resolution: {integrity: sha512-GIIH3e6KH+91FqGV42Kcj71Uefd/QEe7Dy42sBTeqppXV95ggCcxLTk39bEr+lZfJmp+ghsR07J++ORkRELsBQ==} + '@stablelib/wipe@1.0.1': resolution: {integrity: sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==} @@ -826,28 +943,24 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] '@tailwindcss/oxide-linux-arm64-musl@4.1.11': resolution: {integrity: sha512-m/NVRFNGlEHJrNVk3O6I9ggVuNjXHIPoD6bqay/pubtYC9QIdAMpS+cswZQPBLvVvEF6GtSNONbDkZrjWZXYNQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [musl] '@tailwindcss/oxide-linux-x64-gnu@4.1.11': resolution: {integrity: sha512-YW6sblI7xukSD2TdbbaeQVDysIm/UPJtObHJHKxDEcW2exAtY47j52f8jZXkqE1krdnkhCMGqP3dbniu1Te2Fg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] '@tailwindcss/oxide-linux-x64-musl@4.1.11': resolution: {integrity: sha512-e3C/RRhGunWYNC3aSF7exsQkdXzQ/M+aYuZHKnw4U7KQwTJotnWsGOIVih0s2qQzmEzOFIJ3+xt7iq67K/p56Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [musl] '@tailwindcss/oxide-wasm32-wasi@4.1.11': resolution: {integrity: sha512-Xo1+/GU0JEN/C/dvcammKHzeM6NqKovG+6921MR6oadee5XPBaKOumrJCXvopJ/Qb5TH7LX/UAywbqrP4lax0g==} @@ -888,6 +1001,83 @@ packages: peerDependencies: react: ^18 || ^19 + '@tronweb3/tronwallet-abstract-adapter@1.1.9': + resolution: {integrity: sha512-2wev5T/Z+Yt96nv2upZeq54v8zk8aXCg0p6yx1BpfY2y25lC0jEiul+F/6o5s2uIUXe2ENdbpMiGQz8+/Jy1EQ==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-binance@1.0.1': + resolution: {integrity: sha512-2tdf4zIm0ZVRy5eW234JOgga6SX6pStZScS3Ae3PqVK0bx9n+O4kHTuPdkvnmkBmWcCSQrHB1u8EuTCekGQfhA==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-bitkeep@1.1.6': + resolution: {integrity: sha512-COyDtycbAKXMDq3+0EAe+sq9lizI34qt1dFq1jzRmDBck3k+8N3ABGRSpTHZUw37rcmc4CbACVVhwOpPypZJCA==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-bybit@1.0.1': + resolution: {integrity: sha512-j0Zff2ZjCEBUa60ncd+57VBbaILgVZcCV5lEK4LqLM9KLw2wCRiWUl+5WZoHBZrmH0ewjNS760Ozzu6V6DBAvw==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-foxwallet@1.0.1': + resolution: {integrity: sha512-XRPyhY6gixXwzk9ipp5z6PxpjKWVuoIKhvNEuxPTQN8Z58OGOvii/dg6veS65Rqio+GRMVPI9sk+zCmLjF0ywA==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-gatewallet@1.0.3': + resolution: {integrity: sha512-Crbf2RY9ToTndc8hkP0EJJX4gIrjlhAdyVyvYdafRZj3ml2zSVJzCOo55fGmsm1r34VdmHESAgqoSX/bEX/i2Q==} + engines: {node: '>=18', pnpm: '>=9'} + + '@tronweb3/tronwallet-adapter-imtoken@1.0.2': + resolution: {integrity: sha512-v7bTSc4r9wp1OZqpFNDyDQXZBVfruv0x8984gIpzuMmcZOSjSRkyLXtwicNYVLpPRbhtxbGKHvi9OoebbHA4QQ==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-ledger@1.1.11': + resolution: {integrity: sha512-r0S/4W9fszd247nKa+e/QWTdd1q6crqtUsHumbkT6YSU//tAy2iDoI9Ecz5o1ORabZ5WL7nLiuEr/ZuqCYcabA==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-okxwallet@1.0.6': + resolution: {integrity: sha512-RSq+1uhelI/Fh0rBpga44TpQUa+1p3H5PlGbBMFYvOoTbXcwkQZYLock/UzfWVZx/NmGjpbtO3hqih9kTvcXyg==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-react-hooks@1.1.10': + resolution: {integrity: sha512-/6rOFGc9imOHIiqQ/a7nSkR3tFae0HeUovq5dD2qygu9Rmb09rbJhyV0Nc4wH+yTFORjYCguIUqCi2QBbH/WOA==} + engines: {node: '>=16', pnpm: '>=7'} + peerDependencies: + react: '*' + react-dom: '*' + + '@tronweb3/tronwallet-adapter-react-ui@1.1.11': + resolution: {integrity: sha512-iStNfVpk4neqn3Dy9u5r+yK58zlYagklSlkEtpz12XW0OUjlslyICWgLK9hHUucbuV7Eyx59153JuZ84AhUe7A==} + engines: {node: '>=16', pnpm: '>=7'} + peerDependencies: + react: '*' + react-dom: '*' + + '@tronweb3/tronwallet-adapter-tokenpocket@1.0.6': + resolution: {integrity: sha512-NOsnAcF1nzVNkRsqSCt9pno5/w7QfH+ZOel9aO9ULW46lG5sSX5rFumqBE+CkK/SZg4wpDNkzvaf85d7vi+0+A==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-tomowallet@1.0.0': + resolution: {integrity: sha512-kDMZY3UtObvQMfrF8LT7yyNxHWPk6USSy/NgmBh5mHM1WhQuhVA1jlq6l3do3x11nwy71tYWixIVDVJWSgwLZA==} + engines: {node: 18.20.2, pnpm: 9.6.0} + + '@tronweb3/tronwallet-adapter-tronlink@1.1.12': + resolution: {integrity: sha512-ArRTfvxhZeUXHQHdOtw7yo8ddKP6k2cafp8lvhfmCgExx04Fgm1b/pR38JdKvNkQCROGzHNgWkwfrheQRMMU6A==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-trust@1.0.1': + resolution: {integrity: sha512-T4JG1CoqFCh8MH8E8fcItmggK0/95nY1jeWaX6wc2PevsQDO8BbqI0hU0aTmPzsMSBtqMQmz1OZYV668tmCdnA==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapter-walletconnect@2.0.3': + resolution: {integrity: sha512-RneJAsTyW9WrsEHDXqTHlSJ/UwD3Okr7po885njy47kqp5RuSC01C5ArtgnCcaoaMeSaJRaCzr2PhtpC8HK6sA==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/tronwallet-adapters@1.2.12': + resolution: {integrity: sha512-RCtl1jDMhdm2PWYiOEKU4bRpA1VoKF77KasacySrqC2opH2wJ2KYgXNf2C3swSAIDkpkzBNVZJRJ1rd0KpTbZA==} + engines: {node: '>=16', pnpm: '>=7'} + + '@tronweb3/walletconnect-tron@3.0.0': + resolution: {integrity: sha512-aYFbUsZHYumdGXt+1VN4mN9Cjr1+GWYr7cXOLawoQ1WqiHOlAiovSnsTpGhUFLn2FZV8m6rdnXTZ59S/0Mv9mw==} + '@tybys/wasm-util@0.10.0': resolution: {integrity: sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==} @@ -1024,49 +1214,41 @@ packages: resolution: {integrity: sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==} cpu: [arm64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-arm64-musl@1.11.1': resolution: {integrity: sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==} cpu: [arm64] os: [linux] - libc: [musl] '@unrs/resolver-binding-linux-ppc64-gnu@1.11.1': resolution: {integrity: sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==} cpu: [ppc64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-riscv64-gnu@1.11.1': resolution: {integrity: sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==} cpu: [riscv64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-riscv64-musl@1.11.1': resolution: {integrity: sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==} cpu: [riscv64] os: [linux] - libc: [musl] '@unrs/resolver-binding-linux-s390x-gnu@1.11.1': resolution: {integrity: sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==} cpu: [s390x] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-x64-gnu@1.11.1': resolution: {integrity: sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==} cpu: [x64] os: [linux] - libc: [glibc] '@unrs/resolver-binding-linux-x64-musl@1.11.1': resolution: {integrity: sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==} cpu: [x64] os: [linux] - libc: [musl] '@unrs/resolver-binding-wasm32-wasi@1.11.1': resolution: {integrity: sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==} @@ -1102,6 +1284,23 @@ packages: peerDependencies: '@vanilla-extract/css': ^1.0.0 + '@wagmi/chains@1.0.0': + resolution: {integrity: sha512-eNbqRWyHbivcMNq5tbXJks4NaOzVLHnNQauHPeE/EDT9AlpqzcrMc+v2T1/2Iw8zN4zgqB86NCsxeJHJs7+xng==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + + '@wagmi/connectors@3.1.11': + resolution: {integrity: sha512-wzxp9f9PtSUFjDUP/QDjc1t7HON4D8wrVKsw35ejdO8hToDpx1gU9lwH/47Zo/1zExGezQc392sjoHSszYd7OA==} + peerDependencies: + typescript: '>=5.0.4' + viem: '>=0.3.35' + peerDependenciesMeta: + typescript: + optional: true + '@wagmi/connectors@5.9.1': resolution: {integrity: sha512-o50e6reSYkVi2d72WWwbKSZ7xgLAeQ1Ja64tTWq3UhU1XtJPvQXWieCInIGInOajAAsZsYCPKYrPj6WoSl0Hqw==} peerDependencies: @@ -1112,6 +1311,15 @@ packages: typescript: optional: true + '@wagmi/core@1.4.13': + resolution: {integrity: sha512-ytMCvXbBOgfDu9Qw67279wq/jNEe7EZLjLyekX7ROnvHRADqFr3lwZI6ih41UmtRZAmXAx8Ghyuqy154EjB5mQ==} + peerDependencies: + typescript: '>=5.0.4' + viem: '>=0.3.35' + peerDependenciesMeta: + typescript: + optional: true + '@wagmi/core@2.18.1': resolution: {integrity: sha512-mU+qXeeY2/0lq8bf4uFm5RtMrc8FgOToqzMVMf6MzNdNbKxpNlmlbuTyRbyd9cxn4UnYa6+S6Bmx1x42FV7w3g==} peerDependencies: @@ -1124,6 +1332,9 @@ packages: typescript: optional: true + '@walletconnect/core@2.11.0': + resolution: {integrity: sha512-2Tjp5BCevI7dbmqo/OrCjX4tqgMqwJNQLlQAlphqPfvwlF9+tIu6pGcVbSN3U9zyXzWIZCeleqEaWUeSeET4Ew==} + '@walletconnect/core@2.21.0': resolution: {integrity: sha512-o6R7Ua4myxR8aRUAJ1z3gT9nM+jd2B2mfamu6arzy1Cc6vi10fIwFWb6vg3bC8xJ6o9H3n/cN5TOW3aA9Y1XVw==} engines: {node: '>=18'} @@ -1132,30 +1343,52 @@ packages: resolution: {integrity: sha512-Tp4MHJYcdWD846PH//2r+Mu4wz1/ZU/fr9av1UWFiaYQ2t2TPLDiZxjLw54AAEpMqlEHemwCgiRiAmjR1NDdTQ==} engines: {node: '>=18'} + '@walletconnect/crypto@1.1.0': + resolution: {integrity: sha512-yZO8BBTQt7BcaemjDgwN56OmSv0OO4QjIpvtfj5OxZfL6IQZQWHOhwC6pJg+BmZPbDlJlWFqFuCZRtiPwRmsoA==} + + '@walletconnect/encoding@1.0.2': + resolution: {integrity: sha512-CrwSBrjqJ7rpGQcTL3kU+Ief+Bcuu9PH6JLOb+wM6NITX1GTxR/MfNwnQfhLKK6xpRAyj2/nM04OOH6wS8Imag==} + '@walletconnect/environment@1.0.1': resolution: {integrity: sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==} + '@walletconnect/ethereum-provider@2.11.0': + resolution: {integrity: sha512-YrTeHVjuSuhlUw7SQ6xBJXDuJ6iAC+RwINm9nVhoKYJSHAy3EVSJZOofMKrnecL0iRMtD29nj57mxAInIBRuZA==} + deprecated: 'Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases' + '@walletconnect/ethereum-provider@2.21.1': resolution: {integrity: sha512-SSlIG6QEVxClgl1s0LMk4xr2wg4eT3Zn/Hb81IocyqNSGfXpjtawWxKxiC5/9Z95f1INyBD6MctJbL/R1oBwIw==} '@walletconnect/events@1.0.1': resolution: {integrity: sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==} + '@walletconnect/heartbeat@1.2.1': + resolution: {integrity: sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q==} + '@walletconnect/heartbeat@1.2.2': resolution: {integrity: sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw==} '@walletconnect/jsonrpc-http-connection@1.0.8': resolution: {integrity: sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw==} + '@walletconnect/jsonrpc-provider@1.0.13': + resolution: {integrity: sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g==} + '@walletconnect/jsonrpc-provider@1.0.14': resolution: {integrity: sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow==} + '@walletconnect/jsonrpc-types@1.0.3': + resolution: {integrity: sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw==} + '@walletconnect/jsonrpc-types@1.0.4': resolution: {integrity: sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ==} '@walletconnect/jsonrpc-utils@1.0.8': resolution: {integrity: sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw==} + '@walletconnect/jsonrpc-ws-connection@1.0.14': + resolution: {integrity: sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA==} + '@walletconnect/jsonrpc-ws-connection@1.0.16': resolution: {integrity: sha512-G81JmsMqh5nJheE1mPst1W0WfVv0SG3N7JggwLLGnI7iuDZJq8cRJvQwLGKHn5H1WTW7DEPCo00zz5w62AbL3Q==} @@ -1167,9 +1400,47 @@ packages: '@react-native-async-storage/async-storage': optional: true + '@walletconnect/legacy-client@2.0.0': + resolution: {integrity: sha512-v5L7rYk9loVnfvUf0mF+76bUPFaU5/Vh7mzL6/950CD/yoGdzYZ3Kj+L7mkC6HPMEGeQsBP1+sqBuiVGZ/aODA==} + + '@walletconnect/legacy-modal@2.0.0': + resolution: {integrity: sha512-jckNd8lMhm4X7dX9TDdxM3bXKJnaqkRs6K2Mo5j6GmbIF9Eyx40jZ5+q457RVxvM6ciZEDT5s1wBHWdWoOo+9Q==} + + '@walletconnect/legacy-provider@2.0.0': + resolution: {integrity: sha512-A8xPebMI1A+50HbWwTpFCbwP7G+1NGKdTKyg8BUUg3h3Y9JucpC1W6w/x0v1Xw7qFEqQnz74LoIN/A3ytH9xrQ==} + + '@walletconnect/legacy-types@2.0.0': + resolution: {integrity: sha512-sOVrA7HUdbI1OwKyPOQU0/DdvTSVFlsXWpAk2K2WvP2erTkBWPMTJq6cv2BmKdoJ3p6gLApT7sd+jHi3OF71uw==} + + '@walletconnect/legacy-utils@2.0.0': + resolution: {integrity: sha512-CPWxSVVXw0kgNCxvU126g4GiV3mzXmC8IPJ15twE46aJ1FX+RHEIfAzFMFz2F2+fEhBxL63A7dwNQKDXorRPcQ==} + '@walletconnect/logger@2.1.2': resolution: {integrity: sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw==} + '@walletconnect/modal-core@2.6.2': + resolution: {integrity: sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA==} + + '@walletconnect/modal-core@2.7.0': + resolution: {integrity: sha512-oyMIfdlNdpyKF2kTJowTixZSo0PGlCJRdssUN/EZdA6H6v03hZnf09JnwpljZNfir2M65Dvjm/15nGrDQnlxSA==} + + '@walletconnect/modal-ui@2.6.2': + resolution: {integrity: sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA==} + + '@walletconnect/modal-ui@2.7.0': + resolution: {integrity: sha512-gERYvU7D7K1ANCN/8vUgsE0d2hnRemfAFZ2novm9aZBg7TEd/4EgB+AqbJ+1dc7GhOL6dazckVq78TgccHb7mQ==} + + '@walletconnect/modal@2.6.2': + resolution: {integrity: sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA==} + deprecated: Please follow the migration guide on https://docs.reown.com/appkit/upgrade/wcm + + '@walletconnect/modal@2.7.0': + resolution: {integrity: sha512-RQVt58oJ+rwqnPcIvRFeMGKuXb9qkgSmwz4noF8JZGUym3gUAzVs+uW2NQ1Owm9XOJAV+sANrtJ+VoVq1ftElw==} + deprecated: Please follow the migration guide on https://docs.reown.com/appkit/upgrade/wcm + + '@walletconnect/randombytes@1.1.0': + resolution: {integrity: sha512-X+LO/9ClnXX2Q/1+u83qMnohVaxC4qsXByM/gMSwGMrUObxEiqEWS+b9Upg9oNl6mTr85dTCRF8W17KVcKKXQw==} + '@walletconnect/relay-api@1.0.11': resolution: {integrity: sha512-tLPErkze/HmC9aCmdZOhtVmYZq1wKfWTJtygQHoWtgg722Jd4homo54Cs4ak2RUFUZIGO2RsOpIcWipaua5D5Q==} @@ -1179,6 +1450,10 @@ packages: '@walletconnect/safe-json@1.0.2': resolution: {integrity: sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==} + '@walletconnect/sign-client@2.11.0': + resolution: {integrity: sha512-H2ukscibBS+6WrzQWh+WyVBqO5z4F5et12JcwobdwgHnJSlqIoZxqnUYYWNCI5rUR5UKsKWaUyto4AE9N5dw4Q==} + deprecated: 'Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases' + '@walletconnect/sign-client@2.21.0': resolution: {integrity: sha512-z7h+PeLa5Au2R591d/8ZlziE0stJvdzP9jNFzFolf2RG/OiXulgFKum8PrIyXy+Rg2q95U9nRVUF9fWcn78yBA==} @@ -1188,18 +1463,27 @@ packages: '@walletconnect/time@1.0.2': resolution: {integrity: sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==} + '@walletconnect/types@2.11.0': + resolution: {integrity: sha512-AB5b1lrEbCGHxqS2vqfCkIoODieH+ZAUp9rA1O2ftrhnqDJiJK983Df87JhYhECsQUBHHfALphA8ydER0q+9sw==} + '@walletconnect/types@2.21.0': resolution: {integrity: sha512-ll+9upzqt95ZBWcfkOszXZkfnpbJJ2CmxMfGgE5GmhdxxxCcO5bGhXkI+x8OpiS555RJ/v/sXJYMSOLkmu4fFw==} '@walletconnect/types@2.21.1': resolution: {integrity: sha512-UeefNadqP6IyfwWC1Yi7ux+ljbP2R66PLfDrDm8izmvlPmYlqRerJWJvYO4t0Vvr9wrG4Ko7E0c4M7FaPKT/sQ==} + '@walletconnect/universal-provider@2.11.0': + resolution: {integrity: sha512-zgJv8jDvIMP4Qse/D9oIRXGdfoNqonsrjPZanQ/CHNe7oXGOBiQND2IIeX+tS0H7uNA0TPvctljCLiIN9nw4eA==} + '@walletconnect/universal-provider@2.21.0': resolution: {integrity: sha512-mtUQvewt+X0VBQay/xOJBvxsB3Xsm1lTwFjZ6WUwSOTR1X+FNb71hSApnV5kbsdDIpYPXeQUbGt2se1n5E5UBg==} '@walletconnect/universal-provider@2.21.1': resolution: {integrity: sha512-Wjx9G8gUHVMnYfxtasC9poGm8QMiPCpXpbbLFT+iPoQskDDly8BwueWnqKs4Mx2SdIAWAwuXeZ5ojk5qQOxJJg==} + '@walletconnect/utils@2.11.0': + resolution: {integrity: sha512-hxkHPlTlDQILHfIKXlmzgNJau/YcSBC3XHUSuZuKZbNEw3duFT6h6pm3HT/1+j1a22IG05WDsNBuTCRkwss+BQ==} + '@walletconnect/utils@2.21.0': resolution: {integrity: sha512-zfHLiUoBrQ8rP57HTPXW7rQMnYxYI4gT9yTACxVW6LhIFROTF6/ytm5SKNoIvi4a5nX5dfXG4D9XwQUCu8Ilig==} @@ -1212,6 +1496,26 @@ packages: '@walletconnect/window-metadata@1.0.1': resolution: {integrity: sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==} + abitype@0.8.7: + resolution: {integrity: sha512-wQ7hV8Yg/yKmGyFpqrNZufCxbszDe5es4AZGYPBitocfSqXtjrTG9JMWFcc4N30ukl2ve48aBTwt7NJxVQdU3w==} + peerDependencies: + typescript: '>=5.0.4' + zod: ^3 >=3.19.1 + peerDependenciesMeta: + zod: + optional: true + + abitype@0.9.8: + resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} + peerDependencies: + typescript: '>=5.0.4' + zod: ^3 >=3.19.1 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + abitype@1.0.8: resolution: {integrity: sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==} peerDependencies: @@ -1318,6 +1622,9 @@ packages: resolution: {integrity: sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==} engines: {node: '>=4'} + axios@1.11.0: + resolution: {integrity: sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==} + axios@1.8.2: resolution: {integrity: sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==} @@ -1337,6 +1644,9 @@ packages: big.js@6.2.2: resolution: {integrity: sha512-y/ie+Faknx7sZA5MfGA2xKlu0GDv8RWrXGsmlteyJQ2lvoKv9GBK/fpRMc2qlSoBAgNxrixICFCBefIq8WCQpQ==} + bignumber.js@9.1.2: + resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} + bn.js@4.12.2: resolution: {integrity: sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==} @@ -1445,6 +1755,9 @@ packages: cookie-es@1.2.2: resolution: {integrity: sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==} + copy-to-clipboard@3.3.3: + resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} + core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} @@ -1839,6 +2152,9 @@ packages: eventemitter2@6.4.9: resolution: {integrity: sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==} + eventemitter3@4.0.7: + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} @@ -1981,6 +2297,9 @@ packages: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} + google-protobuf@3.21.4: + resolution: {integrity: sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==} + gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -2027,6 +2346,9 @@ packages: help-me@5.0.0: resolution: {integrity: sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==} + hey-listen@1.0.8: + resolution: {integrity: sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==} + hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} @@ -2195,6 +2517,19 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + isomorphic-unfetch@3.1.0: + resolution: {integrity: sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==} + + isomorphic-ws@5.0.0: + resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} + peerDependencies: + ws: '*' + + isows@1.0.3: + resolution: {integrity: sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg==} + peerDependencies: + ws: '*' + isows@1.0.6: resolution: {integrity: sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==} peerDependencies: @@ -2217,6 +2552,9 @@ packages: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} + js-base64@3.7.7: + resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} + js-sha3@0.8.0: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} @@ -2301,28 +2639,24 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] lightningcss-linux-arm64-musl@1.30.1: resolution: {integrity: sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [musl] lightningcss-linux-x64-gnu@1.30.1: resolution: {integrity: sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [glibc] lightningcss-linux-x64-musl@1.30.1: resolution: {integrity: sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [musl] lightningcss-win32-arm64-msvc@1.30.1: resolution: {integrity: sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==} @@ -2340,12 +2674,21 @@ packages: resolution: {integrity: sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==} engines: {node: '>= 12.0.0'} + lit-element@3.3.3: + resolution: {integrity: sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==} + lit-element@4.2.1: resolution: {integrity: sha512-WGAWRGzirAgyphK2urmYOV72tlvnxw7YfyLDgQ+OZnM9vQQBQnumQ7jUJe6unEzwGU3ahFOjuz1iz1jjrpCPuw==} + lit-html@2.8.0: + resolution: {integrity: sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==} + lit-html@3.3.1: resolution: {integrity: sha512-S9hbyDu/vs1qNrithiNyeyv64c9yqiW9l+DBgI18fL+MTvOtWoFR0FWiyq1TxaYef5wNlpEmzlXoBlZEO+WjoA==} + lit@2.8.0: + resolution: {integrity: sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==} + lit@3.3.0: resolution: {integrity: sha512-DGVsqsOIHBww2DqnuZzW7QsuCdahp50ojuDaBPC7jUDRpYoH0z7kHBBYZewRzer75FwtrkmkKk7iOAwSaWdBmw==} @@ -2357,6 +2700,10 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + lodash.isequal@4.5.0: + resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + deprecated: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. + lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -2436,6 +2783,9 @@ packages: modern-ahocorasick@1.1.0: resolution: {integrity: sha512-sEKPVl2rM+MNVkGQt3ChdmD8YsigmXdn5NifZn6jiwn9LRJpWm8F3guhaqrJT/JOat6pwpbXEk6kv+b9DMIjsQ==} + motion@10.16.2: + resolution: {integrity: sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ==} + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -2697,6 +3047,9 @@ packages: prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + proxy-compare@2.5.1: + resolution: {integrity: sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA==} + proxy-compare@2.6.0: resolution: {integrity: sha512-8xuCeM3l8yqdmbPoYeLbrAXCBWu19XEYc5/F28f5qOaoAIMyfmBUkl5axiK+x9olUvRlcekvnm98AP9RDngOIw==} @@ -2719,6 +3072,10 @@ packages: engines: {node: '>=10.13.0'} hasBin: true + query-string@6.14.1: + resolution: {integrity: sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==} + engines: {node: '>=6'} + query-string@7.1.3: resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==} engines: {node: '>=6'} @@ -2796,6 +3153,9 @@ packages: resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + regexp.prototype.flags@1.5.4: resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} engines: {node: '>= 0.4'} @@ -2830,6 +3190,13 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + rxjs@6.6.7: + resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} + engines: {npm: '>=2.0.0'} + + rxjs@7.8.2: + resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} + safe-array-concat@1.1.3: resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==} engines: {node: '>=0.4'} @@ -2862,6 +3229,11 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + semver@7.7.1: + resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} + engines: {node: '>=10'} + hasBin: true + semver@7.7.2: resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} engines: {node: '>=10'} @@ -3058,9 +3430,15 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + toggle-selection@1.0.6: + resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==} + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tronweb@6.0.4: + resolution: {integrity: sha512-+9Nc7H4FYVh2DcOnQG93WLm3UdlHSf9W+GXkfrXI77oLjTB1cptROJDKRSSxQBiOAyjjAJOOTuYDzlAkaLT85w==} + ts-api-utils@2.1.0: resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} engines: {node: '>=18.12'} @@ -3136,6 +3514,9 @@ packages: undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + unfetch@4.2.0: + resolution: {integrity: sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==} + unrs-resolver@1.11.1: resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} @@ -3249,6 +3630,22 @@ packages: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true + validator@13.12.0: + resolution: {integrity: sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==} + engines: {node: '>= 0.10'} + + valtio@1.11.2: + resolution: {integrity: sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=16.8' + react: '>=16.8' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + valtio@1.13.2: resolution: {integrity: sha512-Qik0o+DSy741TmkqmRfjq+0xpZBXi/Y6+fXZLn0xNF1z/waFMbE3rkivv5Zcf9RrMUp6zswf2J7sbh2KBlba5A==} engines: {node: '>=12.20.0'} @@ -3261,6 +3658,17 @@ packages: react: optional: true + viem@0.3.50: + resolution: {integrity: sha512-s+LxCYZTR9F/qPk1/n1YDVAX9vSeVz7GraqBZWGrDuenCJxo9ArCoIceJ6ksI0WwSeNzcZ0VVbD/kWRzTxkipw==} + + viem@1.21.4: + resolution: {integrity: sha512-BNVYdSaUjeS2zKQgPs+49e5JKocfo60Ib2yiXOWBT6LuVxY1I/6fFX3waEtpXvL1Xn4qu+BVitVtMh9lyThyhQ==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + viem@2.23.2: resolution: {integrity: sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA==} peerDependencies: @@ -3344,6 +3752,30 @@ packages: utf-8-validate: optional: true + ws@8.12.0: + resolution: {integrity: sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + ws@8.13.0: + resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@8.17.1: resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} engines: {node: '>=10.0.0'} @@ -3422,6 +3854,21 @@ packages: zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} + zustand@4.5.7: + resolution: {integrity: sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==} + engines: {node: '>=12.7.0'} + peerDependencies: + '@types/react': '>=16.8' + immer: '>=9.0.6' + react: '>=16.8' + peerDependenciesMeta: + '@types/react': + optional: true + immer: + optional: true + react: + optional: true + zustand@5.0.0: resolution: {integrity: sha512-LE+VcmbartOPM+auOjCCLQOsQ05zUTp8RkgwRzefUk+2jISdMMFnxvyTjA4YNWr5ZGXYbVsEMZosttuxUBkojQ==} engines: {node: '>=12.20.0'} @@ -3504,10 +3951,14 @@ snapshots: - bufferutil - utf-8-validate + '@adraffy/ens-normalize@1.10.0': {} + '@adraffy/ens-normalize@1.10.1': {} '@adraffy/ens-normalize@1.11.0': {} + '@adraffy/ens-normalize@1.9.0': {} + '@alloc/quick-lru@5.2.0': {} '@ampproject/remapping@2.3.0': @@ -3515,6 +3966,10 @@ snapshots: '@jridgewell/gen-mapping': 0.3.12 '@jridgewell/trace-mapping': 0.3.29 + '@babel/runtime@7.26.10': + dependencies: + regenerator-runtime: 0.14.1 + '@babel/runtime@7.28.2': {} '@base-org/account@1.1.1(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@19.1.0))(utf-8-validate@5.0.10)(zod@3.22.4)': @@ -3537,6 +3992,17 @@ snapshots: - utf-8-validate - zod + '@binance/w3w-types@1.1.4': + dependencies: + eventemitter3: 5.0.1 + + '@binance/w3w-utils@1.1.7': + dependencies: + '@binance/w3w-types': 1.1.4 + eventemitter3: 5.0.1 + hash.js: 1.1.7 + js-base64: 3.7.7 + '@coinbase/wallet-sdk@3.9.3': dependencies: bn.js: 5.2.2 @@ -3901,8 +4367,54 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.4 + '@ledgerhq/devices@6.27.1': + dependencies: + '@ledgerhq/errors': 6.23.0 + '@ledgerhq/logs': 6.13.0 + rxjs: 6.6.7 + semver: 7.7.2 + + '@ledgerhq/devices@8.4.8': + dependencies: + '@ledgerhq/errors': 6.23.0 + '@ledgerhq/logs': 6.13.0 + rxjs: 7.8.2 + semver: 7.7.2 + + '@ledgerhq/errors@6.23.0': {} + + '@ledgerhq/hw-app-trx@6.31.4': + dependencies: + '@ledgerhq/hw-transport': 6.31.8 + + '@ledgerhq/hw-transport-webhid@6.27.1': + dependencies: + '@ledgerhq/devices': 6.27.1 + '@ledgerhq/errors': 6.23.0 + '@ledgerhq/hw-transport': 6.27.1 + '@ledgerhq/logs': 6.13.0 + + '@ledgerhq/hw-transport@6.27.1': + dependencies: + '@ledgerhq/devices': 6.27.1 + '@ledgerhq/errors': 6.23.0 + events: 3.3.0 + + '@ledgerhq/hw-transport@6.31.8': + dependencies: + '@ledgerhq/devices': 8.4.8 + '@ledgerhq/errors': 6.23.0 + '@ledgerhq/logs': 6.13.0 + events: 3.3.0 + + '@ledgerhq/logs@6.13.0': {} + '@lit-labs/ssr-dom-shim@1.4.0': {} + '@lit/reactive-element@1.6.3': + dependencies: + '@lit-labs/ssr-dom-shim': 1.4.0 + '@lit/reactive-element@2.1.1': dependencies: '@lit-labs/ssr-dom-shim': 1.4.0 @@ -4063,6 +4575,51 @@ snapshots: transitivePeerDependencies: - supports-color + '@motionone/animation@10.18.0': + dependencies: + '@motionone/easing': 10.18.0 + '@motionone/types': 10.17.1 + '@motionone/utils': 10.18.0 + tslib: 2.8.1 + + '@motionone/dom@10.18.0': + dependencies: + '@motionone/animation': 10.18.0 + '@motionone/generators': 10.18.0 + '@motionone/types': 10.17.1 + '@motionone/utils': 10.18.0 + hey-listen: 1.0.8 + tslib: 2.8.1 + + '@motionone/easing@10.18.0': + dependencies: + '@motionone/utils': 10.18.0 + tslib: 2.8.1 + + '@motionone/generators@10.18.0': + dependencies: + '@motionone/types': 10.17.1 + '@motionone/utils': 10.18.0 + tslib: 2.8.1 + + '@motionone/svelte@10.16.4': + dependencies: + '@motionone/dom': 10.18.0 + tslib: 2.8.1 + + '@motionone/types@10.17.1': {} + + '@motionone/utils@10.18.0': + dependencies: + '@motionone/types': 10.17.1 + hey-listen: 1.0.8 + tslib: 2.8.1 + + '@motionone/vue@10.16.4': + dependencies: + '@motionone/dom': 10.18.0 + tslib: 2.8.1 + '@napi-rs/wasm-runtime@0.2.12': dependencies: '@emnapi/core': 1.4.5 @@ -4100,10 +4657,16 @@ snapshots: '@next/swc-win32-x64-msvc@15.4.4': optional: true + '@noble/ciphers@1.2.0': {} + '@noble/ciphers@1.2.1': {} '@noble/ciphers@1.3.0': {} + '@noble/curves@1.0.0': + dependencies: + '@noble/hashes': 1.3.0 + '@noble/curves@1.2.0': dependencies: '@noble/hashes': 1.3.2 @@ -4128,6 +4691,8 @@ snapshots: dependencies: '@noble/hashes': 1.8.0 + '@noble/hashes@1.3.0': {} + '@noble/hashes@1.3.2': {} '@noble/hashes@1.4.0': {} @@ -4453,6 +5018,16 @@ snapshots: - utf-8-validate - zod + '@safe-global/safe-apps-sdk@8.1.0(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + dependencies: + '@safe-global/safe-gateway-typescript-sdk': 3.23.1 + viem: 1.21.4(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod + '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.23.1 @@ -4469,6 +5044,18 @@ snapshots: '@scure/base@1.2.6': {} + '@scure/bip32@1.3.0': + dependencies: + '@noble/curves': 1.0.0 + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.9 + + '@scure/bip32@1.3.2': + dependencies: + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.9 + '@scure/bip32@1.4.0': dependencies: '@noble/curves': 1.4.2 @@ -4487,6 +5074,16 @@ snapshots: '@noble/hashes': 1.8.0 '@scure/base': 1.2.6 + '@scure/bip39@1.2.0': + dependencies: + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.9 + + '@scure/bip39@1.2.1': + dependencies: + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.9 + '@scure/bip39@1.3.0': dependencies: '@noble/hashes': 1.4.0 @@ -4504,23 +5101,66 @@ snapshots: '@socket.io/component-emitter@3.1.2': {} + '@stablelib/aead@1.0.1': {} + '@stablelib/binary@1.0.1': dependencies: '@stablelib/int': 1.0.1 '@stablelib/bytes@1.0.1': {} + '@stablelib/chacha20poly1305@1.0.1': + dependencies: + '@stablelib/aead': 1.0.1 + '@stablelib/binary': 1.0.1 + '@stablelib/chacha': 1.0.1 + '@stablelib/constant-time': 1.0.1 + '@stablelib/poly1305': 1.0.1 + '@stablelib/wipe': 1.0.1 + + '@stablelib/chacha@1.0.1': + dependencies: + '@stablelib/binary': 1.0.1 + '@stablelib/wipe': 1.0.1 + + '@stablelib/constant-time@1.0.1': {} + + '@stablelib/hash@1.0.1': {} + + '@stablelib/hkdf@1.0.1': + dependencies: + '@stablelib/hash': 1.0.1 + '@stablelib/hmac': 1.0.1 + '@stablelib/wipe': 1.0.1 + + '@stablelib/hmac@1.0.1': + dependencies: + '@stablelib/constant-time': 1.0.1 + '@stablelib/hash': 1.0.1 + '@stablelib/wipe': 1.0.1 + '@stablelib/int@1.0.1': {} '@stablelib/keyagreement@1.0.1': dependencies: '@stablelib/bytes': 1.0.1 + '@stablelib/poly1305@1.0.1': + dependencies: + '@stablelib/constant-time': 1.0.1 + '@stablelib/wipe': 1.0.1 + '@stablelib/random@1.0.2': dependencies: '@stablelib/binary': 1.0.1 '@stablelib/wipe': 1.0.1 + '@stablelib/sha256@1.0.1': + dependencies: + '@stablelib/binary': 1.0.1 + '@stablelib/hash': 1.0.1 + '@stablelib/wipe': 1.0.1 + '@stablelib/wipe@1.0.1': {} '@stablelib/x25519@1.0.3': @@ -4612,6 +5252,264 @@ snapshots: '@tanstack/query-core': 5.83.1 react: 19.1.0 + '@tronweb3/tronwallet-abstract-adapter@1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + eventemitter3: 4.0.7 + tronweb: 6.0.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-binance@1.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@binance/w3w-utils': 1.1.7 + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-bitkeep@1.1.6(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-bybit@1.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-foxwallet@1.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-gatewallet@1.0.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-imtoken@1.0.2(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-ledger@1.1.11(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@ledgerhq/hw-app-trx': 6.31.4 + '@ledgerhq/hw-transport': 6.27.1 + '@ledgerhq/hw-transport-webhid': 6.27.1 + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + buffer: 6.0.3 + eventemitter3: 4.0.7 + preact: 10.27.0 + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-okxwallet@1.0.6(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-react-hooks@1.1.10(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-react-ui@1.1.11(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-react-hooks': 1.1.10(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10) + react: 19.1.0 + react-dom: 19.1.0(react@19.1.0) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-tokenpocket@1.0.6(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-tomowallet@1.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-tronlink@1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-trust@1.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@tronweb3/tronwallet-adapter-walletconnect@2.0.3(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + dependencies: + '@tronweb3/tronwallet-abstract-adapter': 1.1.9(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/walletconnect-tron': 3.0.0(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@wagmi/core': 1.4.13(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(viem@0.3.50(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4) + '@walletconnect/sign-client': 2.21.1(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/types': 2.21.1 + viem: 0.3.50(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - debug + - encoding + - immer + - ioredis + - react + - supports-color + - typescript + - uploadthing + - utf-8-validate + - zod + + '@tronweb3/tronwallet-adapters@1.2.12(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + dependencies: + '@tronweb3/tronwallet-adapter-binance': 1.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-bitkeep': 1.1.6(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-bybit': 1.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-foxwallet': 1.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-gatewallet': 1.0.3(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-imtoken': 1.0.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-ledger': 1.1.11(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-okxwallet': 1.0.6(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tokenpocket': 1.0.6(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tomowallet': 1.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-tronlink': 1.1.12(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-trust': 1.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@tronweb3/tronwallet-adapter-walletconnect': 2.0.3(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - debug + - encoding + - immer + - ioredis + - react + - supports-color + - typescript + - uploadthing + - utf-8-validate + - zod + + '@tronweb3/walletconnect-tron@3.0.0(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + dependencies: + '@walletconnect/modal': 2.7.0(@types/react@19.1.9)(react@19.1.0) + '@walletconnect/sign-client': 2.21.1(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/utils': 2.21.1(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - ioredis + - react + - typescript + - uploadthing + - utf-8-validate + - zod + '@tybys/wasm-util@0.10.0': dependencies: tslib: 2.8.1 @@ -4828,6 +5726,51 @@ snapshots: dependencies: '@vanilla-extract/css': 1.17.3 + '@wagmi/chains@1.0.0(typescript@5.9.2)': + optionalDependencies: + typescript: 5.9.2 + + '@wagmi/connectors@3.1.11(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(viem@0.3.50(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4)': + dependencies: + '@coinbase/wallet-sdk': 3.9.3 + '@safe-global/safe-apps-provider': 0.18.6(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@safe-global/safe-apps-sdk': 8.1.0(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@walletconnect/ethereum-provider': 2.11.0(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10) + '@walletconnect/legacy-provider': 2.0.0 + '@walletconnect/modal': 2.6.2(@types/react@19.1.9)(react@19.1.0) + '@walletconnect/utils': 2.11.0 + abitype: 0.8.7(typescript@5.9.2)(zod@3.22.4) + eventemitter3: 4.0.7 + viem: 0.3.50(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + optionalDependencies: + typescript: 5.9.2 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - react + - supports-color + - uploadthing + - utf-8-validate + - zod + '@wagmi/connectors@5.9.1(@types/react@19.1.9)(@wagmi/core@2.18.1(@tanstack/query-core@5.83.1)(@types/react@19.1.9)(react@19.1.0)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@19.1.0))(viem@2.33.2(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@19.1.0))(utf-8-validate@5.0.10)(viem@2.33.2(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4)': dependencies: '@base-org/account': 1.1.1(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@19.1.0))(utf-8-validate@5.0.10)(zod@3.22.4) @@ -4870,6 +5813,43 @@ snapshots: - utf-8-validate - zod + '@wagmi/core@1.4.13(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(viem@0.3.50(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4)': + dependencies: + '@wagmi/connectors': 3.1.11(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(viem@0.3.50(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4) + abitype: 0.8.7(typescript@5.9.2)(zod@3.22.4) + eventemitter3: 4.0.7 + viem: 0.3.50(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) + zustand: 4.5.7(@types/react@19.1.9)(react@19.1.0) + optionalDependencies: + typescript: 5.9.2 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - immer + - ioredis + - react + - supports-color + - uploadthing + - utf-8-validate + - zod + '@wagmi/core@2.18.1(@tanstack/query-core@5.83.1)(@types/react@19.1.9)(react@19.1.0)(typescript@5.9.2)(use-sync-external-store@1.4.0(react@19.1.0))(viem@2.33.2(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4))': dependencies: eventemitter3: 5.0.1 @@ -4885,6 +5865,48 @@ snapshots: - react - use-sync-external-store + '@walletconnect/core@2.11.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@walletconnect/heartbeat': 1.2.1 + '@walletconnect/jsonrpc-provider': 1.0.13 + '@walletconnect/jsonrpc-types': 1.0.3 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/jsonrpc-ws-connection': 1.0.14(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + '@walletconnect/relay-api': 1.0.11 + '@walletconnect/relay-auth': 1.1.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.11.0 + '@walletconnect/utils': 2.11.0 + events: 3.3.0 + isomorphic-unfetch: 3.1.0 + lodash.isequal: 4.5.0 + uint8arrays: 3.1.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - uploadthing + - utf-8-validate + '@walletconnect/core@2.21.0(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: '@walletconnect/heartbeat': 1.2.2 @@ -4971,10 +5993,62 @@ snapshots: - utf-8-validate - zod + '@walletconnect/crypto@1.1.0': + dependencies: + '@noble/ciphers': 1.2.0 + '@noble/hashes': 1.7.0 + '@walletconnect/encoding': 1.0.2 + '@walletconnect/environment': 1.0.1 + '@walletconnect/randombytes': 1.1.0 + tslib: 1.14.1 + + '@walletconnect/encoding@1.0.2': + dependencies: + is-typedarray: 1.0.0 + tslib: 1.14.1 + typedarray-to-buffer: 3.1.5 + '@walletconnect/environment@1.0.1': dependencies: tslib: 1.14.1 + '@walletconnect/ethereum-provider@2.11.0(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(utf-8-validate@5.0.10)': + dependencies: + '@walletconnect/jsonrpc-http-connection': 1.0.8 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/modal': 2.6.2(@types/react@19.1.9)(react@19.1.0) + '@walletconnect/sign-client': 2.11.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@walletconnect/types': 2.11.0 + '@walletconnect/universal-provider': 2.11.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@walletconnect/utils': 2.11.0 + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@types/react' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - react + - uploadthing + - utf-8-validate + '@walletconnect/ethereum-provider@2.21.1(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: '@reown/appkit': 1.7.8(@types/react@19.1.9)(bufferutil@4.0.9)(react@19.1.0)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4) @@ -5020,6 +6094,12 @@ snapshots: keyvaluestorage-interface: 1.0.0 tslib: 1.14.1 + '@walletconnect/heartbeat@1.2.1': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/time': 1.0.2 + tslib: 1.14.1 + '@walletconnect/heartbeat@1.2.2': dependencies: '@walletconnect/events': 1.0.1 @@ -5035,38 +6115,214 @@ snapshots: transitivePeerDependencies: - encoding + '@walletconnect/jsonrpc-provider@1.0.13': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + tslib: 1.14.1 + '@walletconnect/jsonrpc-provider@1.0.14': dependencies: '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/safe-json': 1.0.2 events: 3.3.0 - '@walletconnect/jsonrpc-types@1.0.4': + '@walletconnect/jsonrpc-types@1.0.3': + dependencies: + keyvaluestorage-interface: 1.0.0 + tslib: 1.14.1 + + '@walletconnect/jsonrpc-types@1.0.4': + dependencies: + events: 3.3.0 + keyvaluestorage-interface: 1.0.0 + + '@walletconnect/jsonrpc-utils@1.0.8': + dependencies: + '@walletconnect/environment': 1.0.1 + '@walletconnect/jsonrpc-types': 1.0.4 + tslib: 1.14.1 + + '@walletconnect/jsonrpc-ws-connection@1.0.14(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + events: 3.3.0 + ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@walletconnect/jsonrpc-ws-connection@1.0.16(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/safe-json': 1.0.2 + events: 3.3.0 + ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@walletconnect/keyvaluestorage@1.1.1': + dependencies: + '@walletconnect/safe-json': 1.0.2 + idb-keyval: 6.2.2 + unstorage: 1.16.1(idb-keyval@6.2.2) + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - db0 + - ioredis + - uploadthing + + '@walletconnect/legacy-client@2.0.0': + dependencies: + '@walletconnect/crypto': 1.1.0 + '@walletconnect/encoding': 1.0.2 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/legacy-types': 2.0.0 + '@walletconnect/legacy-utils': 2.0.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/window-getters': 1.0.1 + '@walletconnect/window-metadata': 1.0.1 + detect-browser: 5.3.0 + query-string: 6.14.1 + + '@walletconnect/legacy-modal@2.0.0': + dependencies: + '@walletconnect/legacy-types': 2.0.0 + '@walletconnect/legacy-utils': 2.0.0 + copy-to-clipboard: 3.3.3 + preact: 10.27.0 + qrcode: 1.5.3 + + '@walletconnect/legacy-provider@2.0.0': + dependencies: + '@walletconnect/jsonrpc-http-connection': 1.0.8 + '@walletconnect/jsonrpc-provider': 1.0.14 + '@walletconnect/legacy-client': 2.0.0 + '@walletconnect/legacy-modal': 2.0.0 + '@walletconnect/legacy-types': 2.0.0 + '@walletconnect/legacy-utils': 2.0.0 + transitivePeerDependencies: + - encoding + + '@walletconnect/legacy-types@2.0.0': + dependencies: + '@walletconnect/jsonrpc-types': 1.0.4 + + '@walletconnect/legacy-utils@2.0.0': + dependencies: + '@walletconnect/encoding': 1.0.2 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/legacy-types': 2.0.0 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/window-getters': 1.0.1 + '@walletconnect/window-metadata': 1.0.1 + detect-browser: 5.3.0 + query-string: 6.14.1 + + '@walletconnect/logger@2.1.2': + dependencies: + '@walletconnect/safe-json': 1.0.2 + pino: 7.11.0 + + '@walletconnect/modal-core@2.6.2(@types/react@19.1.9)(react@19.1.0)': + dependencies: + valtio: 1.11.2(@types/react@19.1.9)(react@19.1.0) + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal-core@2.7.0(@types/react@19.1.9)(react@19.1.0)': + dependencies: + valtio: 1.11.2(@types/react@19.1.9)(react@19.1.0) + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal-ui@2.6.2(@types/react@19.1.9)(react@19.1.0)': + dependencies: + '@walletconnect/modal-core': 2.6.2(@types/react@19.1.9)(react@19.1.0) + lit: 2.8.0 + motion: 10.16.2 + qrcode: 1.5.3 + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal-ui@2.7.0(@types/react@19.1.9)(react@19.1.0)': + dependencies: + '@walletconnect/modal-core': 2.7.0(@types/react@19.1.9)(react@19.1.0) + lit: 2.8.0 + motion: 10.16.2 + qrcode: 1.5.3 + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal@2.6.2(@types/react@19.1.9)(react@19.1.0)': + dependencies: + '@walletconnect/modal-core': 2.6.2(@types/react@19.1.9)(react@19.1.0) + '@walletconnect/modal-ui': 2.6.2(@types/react@19.1.9)(react@19.1.0) + transitivePeerDependencies: + - '@types/react' + - react + + '@walletconnect/modal@2.7.0(@types/react@19.1.9)(react@19.1.0)': dependencies: - events: 3.3.0 - keyvaluestorage-interface: 1.0.0 + '@walletconnect/modal-core': 2.7.0(@types/react@19.1.9)(react@19.1.0) + '@walletconnect/modal-ui': 2.7.0(@types/react@19.1.9)(react@19.1.0) + transitivePeerDependencies: + - '@types/react' + - react - '@walletconnect/jsonrpc-utils@1.0.8': + '@walletconnect/randombytes@1.1.0': dependencies: + '@noble/hashes': 1.7.0 + '@walletconnect/encoding': 1.0.2 '@walletconnect/environment': 1.0.1 - '@walletconnect/jsonrpc-types': 1.0.4 tslib: 1.14.1 - '@walletconnect/jsonrpc-ws-connection@1.0.16(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + '@walletconnect/relay-api@1.0.11': dependencies: - '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/safe-json': 1.0.2 - events: 3.3.0 - ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - utf-8-validate + '@walletconnect/jsonrpc-types': 1.0.4 - '@walletconnect/keyvaluestorage@1.1.1': + '@walletconnect/relay-auth@1.1.0': dependencies: + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 '@walletconnect/safe-json': 1.0.2 - idb-keyval: 6.2.2 - unstorage: 1.16.1(idb-keyval@6.2.2) + '@walletconnect/time': 1.0.2 + uint8arrays: 3.1.0 + + '@walletconnect/safe-json@1.0.2': + dependencies: + tslib: 1.14.1 + + '@walletconnect/sign-client@2.11.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@walletconnect/core': 2.11.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@walletconnect/events': 1.0.1 + '@walletconnect/heartbeat': 1.2.1 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/logger': 2.1.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.11.0 + '@walletconnect/utils': 2.11.0 + events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -5078,34 +6334,17 @@ snapshots: - '@deno/kv' - '@netlify/blobs' - '@planetscale/database' + - '@react-native-async-storage/async-storage' - '@upstash/redis' - '@vercel/blob' - '@vercel/kv' - aws4fetch + - bufferutil - db0 + - encoding - ioredis - uploadthing - - '@walletconnect/logger@2.1.2': - dependencies: - '@walletconnect/safe-json': 1.0.2 - pino: 7.11.0 - - '@walletconnect/relay-api@1.0.11': - dependencies: - '@walletconnect/jsonrpc-types': 1.0.4 - - '@walletconnect/relay-auth@1.1.0': - dependencies: - '@noble/curves': 1.8.0 - '@noble/hashes': 1.7.0 - '@walletconnect/safe-json': 1.0.2 - '@walletconnect/time': 1.0.2 - uint8arrays: 3.1.0 - - '@walletconnect/safe-json@1.0.2': - dependencies: - tslib: 1.14.1 + - utf-8-validate '@walletconnect/sign-client@2.21.0(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: @@ -5181,6 +6420,34 @@ snapshots: dependencies: tslib: 1.14.1 + '@walletconnect/types@2.11.0': + dependencies: + '@walletconnect/events': 1.0.1 + '@walletconnect/heartbeat': 1.2.1 + '@walletconnect/jsonrpc-types': 1.0.3 + '@walletconnect/keyvaluestorage': 1.1.1 + '@walletconnect/logger': 2.1.2 + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - db0 + - ioredis + - uploadthing + '@walletconnect/types@2.21.0': dependencies: '@walletconnect/events': 1.0.1 @@ -5237,6 +6504,40 @@ snapshots: - ioredis - uploadthing + '@walletconnect/universal-provider@2.11.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@walletconnect/jsonrpc-http-connection': 1.0.8 + '@walletconnect/jsonrpc-provider': 1.0.13 + '@walletconnect/jsonrpc-types': 1.0.4 + '@walletconnect/jsonrpc-utils': 1.0.8 + '@walletconnect/logger': 2.1.2 + '@walletconnect/sign-client': 2.11.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@walletconnect/types': 2.11.0 + '@walletconnect/utils': 2.11.0 + events: 3.3.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - bufferutil + - db0 + - encoding + - ioredis + - uploadthing + - utf-8-validate + '@walletconnect/universal-provider@2.21.0(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: '@walletconnect/events': 1.0.1 @@ -5315,6 +6616,42 @@ snapshots: - utf-8-validate - zod + '@walletconnect/utils@2.11.0': + dependencies: + '@stablelib/chacha20poly1305': 1.0.1 + '@stablelib/hkdf': 1.0.1 + '@stablelib/random': 1.0.2 + '@stablelib/sha256': 1.0.1 + '@stablelib/x25519': 1.0.3 + '@walletconnect/relay-api': 1.0.11 + '@walletconnect/safe-json': 1.0.2 + '@walletconnect/time': 1.0.2 + '@walletconnect/types': 2.11.0 + '@walletconnect/window-getters': 1.0.1 + '@walletconnect/window-metadata': 1.0.1 + detect-browser: 5.3.0 + query-string: 7.1.3 + uint8arrays: 3.1.0 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@react-native-async-storage/async-storage' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/kv' + - aws4fetch + - db0 + - ioredis + - uploadthing + '@walletconnect/utils@2.21.0(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: '@noble/ciphers': 1.2.1 @@ -5410,6 +6747,17 @@ snapshots: '@walletconnect/window-getters': 1.0.1 tslib: 1.14.1 + abitype@0.8.7(typescript@5.9.2)(zod@3.22.4): + dependencies: + typescript: 5.9.2 + optionalDependencies: + zod: 3.22.4 + + abitype@0.9.8(typescript@5.9.2)(zod@3.22.4): + optionalDependencies: + typescript: 5.9.2 + zod: 3.22.4 + abitype@1.0.8(typescript@5.9.2)(zod@3.22.4): optionalDependencies: typescript: 5.9.2 @@ -5532,6 +6880,14 @@ snapshots: axe-core@4.10.3: {} + axios@1.11.0: + dependencies: + follow-redirects: 1.15.11 + form-data: 4.0.4 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + axios@1.8.2: dependencies: follow-redirects: 1.15.11 @@ -5550,6 +6906,8 @@ snapshots: big.js@6.2.2: {} + bignumber.js@9.1.2: {} + bn.js@4.12.2: {} bn.js@5.2.2: {} @@ -5658,6 +7016,10 @@ snapshots: cookie-es@1.2.2: {} + copy-to-clipboard@3.3.3: + dependencies: + toggle-selection: 1.0.6 + core-util-is@1.0.3: {} crc-32@1.2.2: {} @@ -6004,7 +7366,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.38.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.32.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.38.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.32.0(jiti@2.5.1)))(eslint@9.32.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: @@ -6026,7 +7388,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.32.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.38.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.32.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.38.0(eslint@9.32.0(jiti@2.5.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.32.0(jiti@2.5.1)))(eslint@9.32.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -6233,6 +7595,8 @@ snapshots: eventemitter2@6.4.9: {} + eventemitter3@4.0.7: {} + eventemitter3@5.0.1: {} events@3.3.0: {} @@ -6379,6 +7743,8 @@ snapshots: define-properties: 1.2.1 gopd: 1.2.0 + google-protobuf@3.21.4: {} + gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -6426,6 +7792,8 @@ snapshots: help-me@5.0.0: {} + hey-listen@1.0.8: {} + hmac-drbg@1.0.1: dependencies: hash.js: 1.1.7 @@ -6590,6 +7958,21 @@ snapshots: isexe@2.0.0: {} + isomorphic-unfetch@3.1.0: + dependencies: + node-fetch: 2.7.0 + unfetch: 4.2.0 + transitivePeerDependencies: + - encoding + + isomorphic-ws@5.0.0(ws@8.12.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)): + dependencies: + ws: 8.12.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + + isows@1.0.3(ws@8.13.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)): + dependencies: + ws: 8.13.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + isows@1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)): dependencies: ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) @@ -6611,6 +7994,8 @@ snapshots: joycon@3.1.1: {} + js-base64@3.7.7: {} + js-sha3@0.8.0: {} js-tokens@4.0.0: {} @@ -6711,16 +8096,32 @@ snapshots: lightningcss-win32-arm64-msvc: 1.30.1 lightningcss-win32-x64-msvc: 1.30.1 + lit-element@3.3.3: + dependencies: + '@lit-labs/ssr-dom-shim': 1.4.0 + '@lit/reactive-element': 1.6.3 + lit-html: 2.8.0 + lit-element@4.2.1: dependencies: '@lit-labs/ssr-dom-shim': 1.4.0 '@lit/reactive-element': 2.1.1 lit-html: 3.3.1 + lit-html@2.8.0: + dependencies: + '@types/trusted-types': 2.0.7 + lit-html@3.3.1: dependencies: '@types/trusted-types': 2.0.7 + lit@2.8.0: + dependencies: + '@lit/reactive-element': 1.6.3 + lit-element: 3.3.3 + lit-html: 2.8.0 + lit@3.3.0: dependencies: '@lit/reactive-element': 2.1.1 @@ -6735,6 +8136,8 @@ snapshots: dependencies: p-locate: 5.0.0 + lodash.isequal@4.5.0: {} + lodash.merge@4.6.2: {} loose-envify@1.4.0: @@ -6796,6 +8199,15 @@ snapshots: modern-ahocorasick@1.1.0: {} + motion@10.16.2: + dependencies: + '@motionone/animation': 10.18.0 + '@motionone/dom': 10.18.0 + '@motionone/svelte': 10.16.4 + '@motionone/types': 10.17.1 + '@motionone/utils': 10.18.0 + '@motionone/vue': 10.16.4 + ms@2.1.3: {} multiformats@9.9.0: {} @@ -7078,6 +8490,8 @@ snapshots: object-assign: 4.1.1 react-is: 16.13.1 + proxy-compare@2.5.1: {} + proxy-compare@2.6.0: {} proxy-from-env@1.1.0: {} @@ -7098,6 +8512,13 @@ snapshots: pngjs: 5.0.0 yargs: 15.4.1 + query-string@6.14.1: + dependencies: + decode-uri-component: 0.2.2 + filter-obj: 1.1.0 + split-on-first: 1.1.0 + strict-uri-encode: 2.0.0 + query-string@7.1.3: dependencies: decode-uri-component: 0.2.2 @@ -7182,6 +8603,8 @@ snapshots: get-proto: 1.0.1 which-builtin-type: 1.2.1 + regenerator-runtime@0.14.1: {} + regexp.prototype.flags@1.5.4: dependencies: call-bind: 1.0.8 @@ -7217,6 +8640,14 @@ snapshots: dependencies: queue-microtask: 1.2.3 + rxjs@6.6.7: + dependencies: + tslib: 1.14.1 + + rxjs@7.8.2: + dependencies: + tslib: 2.8.1 + safe-array-concat@1.1.3: dependencies: call-bind: 1.0.8 @@ -7248,6 +8679,8 @@ snapshots: semver@6.3.1: {} + semver@7.7.1: {} + semver@7.7.2: {} set-blocking@2.0.0: {} @@ -7511,8 +8944,26 @@ snapshots: dependencies: is-number: 7.0.0 + toggle-selection@1.0.6: {} + tr46@0.0.3: {} + tronweb@6.0.4(bufferutil@4.0.9)(utf-8-validate@5.0.10): + dependencies: + '@babel/runtime': 7.26.10 + axios: 1.11.0 + bignumber.js: 9.1.2 + ethereum-cryptography: 2.2.1 + ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + eventemitter3: 5.0.1 + google-protobuf: 3.21.4 + semver: 7.7.1 + validator: 13.12.0 + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + ts-api-utils@2.1.0(typescript@5.9.2): dependencies: typescript: 5.9.2 @@ -7598,6 +9049,8 @@ snapshots: undici-types@6.21.0: {} + unfetch@4.2.0: {} + unrs-resolver@1.11.1: dependencies: napi-postinstall: 0.3.2 @@ -7680,6 +9133,16 @@ snapshots: uuid@9.0.1: {} + validator@13.12.0: {} + + valtio@1.11.2(@types/react@19.1.9)(react@19.1.0): + dependencies: + proxy-compare: 2.5.1 + use-sync-external-store: 1.2.0(react@19.1.0) + optionalDependencies: + '@types/react': 19.1.9 + react: 19.1.0 + valtio@1.13.2(@types/react@19.1.9)(react@19.1.0): dependencies: derive-valtio: 0.1.0(valtio@1.13.2(@types/react@19.1.9)(react@19.1.0)) @@ -7689,6 +9152,40 @@ snapshots: '@types/react': 19.1.9 react: 19.1.0 + viem@0.3.50(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4): + dependencies: + '@adraffy/ens-normalize': 1.9.0 + '@noble/curves': 1.0.0 + '@noble/hashes': 1.3.0 + '@scure/bip32': 1.3.0 + '@scure/bip39': 1.2.0 + '@wagmi/chains': 1.0.0(typescript@5.9.2) + abitype: 0.8.7(typescript@5.9.2)(zod@3.22.4) + isomorphic-ws: 5.0.0(ws@8.12.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ws: 8.12.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod + + viem@1.21.4(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4): + dependencies: + '@adraffy/ens-normalize': 1.10.0 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@scure/bip32': 1.3.2 + '@scure/bip39': 1.2.1 + abitype: 0.9.8(typescript@5.9.2)(zod@3.22.4) + isows: 1.0.3(ws@8.13.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ws: 8.13.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + optionalDependencies: + typescript: 5.9.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + viem@2.23.2(bufferutil@4.0.9)(typescript@5.9.2)(utf-8-validate@5.0.10)(zod@3.22.4): dependencies: '@noble/curves': 1.8.1 @@ -7832,6 +9329,16 @@ snapshots: bufferutil: 4.0.9 utf-8-validate: 5.0.10 + ws@8.12.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + + ws@8.13.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + ws@8.17.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.9 @@ -7883,6 +9390,13 @@ snapshots: zod@3.22.4: {} + zustand@4.5.7(@types/react@19.1.9)(react@19.1.0): + dependencies: + use-sync-external-store: 1.4.0(react@19.1.0) + optionalDependencies: + '@types/react': 19.1.9 + react: 19.1.0 + zustand@5.0.0(@types/react@19.1.9)(react@19.1.0)(use-sync-external-store@1.4.0(react@19.1.0)): optionalDependencies: '@types/react': 19.1.9 diff --git a/public/tron-logo.png b/public/tron-logo.png new file mode 100644 index 0000000..8bd7214 Binary files /dev/null and b/public/tron-logo.png differ diff --git a/public/tron-token.png b/public/tron-token.png new file mode 100644 index 0000000..96e5af7 Binary files /dev/null and b/public/tron-token.png differ diff --git a/src/app/CombinedWalletProvider.tsx b/src/app/CombinedWalletProvider.tsx new file mode 100644 index 0000000..eb6cc75 --- /dev/null +++ b/src/app/CombinedWalletProvider.tsx @@ -0,0 +1,15 @@ +"use client"; + +import { PropsWithChildren } from "react"; +import { RainbowProvider } from "./RainbowProvider"; +import { TronProvider } from "./TronProvider"; + +export function CombinedWalletProvider({ children }: PropsWithChildren) { + return ( + + + {children} + + + ); +} \ No newline at end of file diff --git a/src/app/TronProvider.tsx b/src/app/TronProvider.tsx new file mode 100644 index 0000000..2c9a230 --- /dev/null +++ b/src/app/TronProvider.tsx @@ -0,0 +1,45 @@ +"use client" +import { Adapter } from '@tronweb3/tronwallet-abstract-adapter'; +import { WalletProvider } from '@tronweb3/tronwallet-adapter-react-hooks'; +import { WalletModalProvider } from '@tronweb3/tronwallet-adapter-react-ui'; +import '@tronweb3/tronwallet-adapter-react-ui/style.css'; +import { LedgerAdapter } from '@tronweb3/tronwallet-adapters'; +import { PropsWithChildren, useCallback, useEffect, useState } from "react"; + +export function TronProvider({ children }: PropsWithChildren) { + //const adapters = useMemo(() => ([new TronLinkAdapter()]), []); + const onAccountsChanged = useCallback((curAddr:string, preAddr:string|undefined) => { + console.log('new address is: ', curAddr, ' previous address is: ', preAddr); + }, []); + const [adapters, setAdapters] = useState([]); + useEffect(() => { + import('@tronweb3/tronwallet-adapters').then((res) => { + const { BitKeepAdapter, OkxWalletAdapter, TokenPocketAdapter, TronLinkAdapter } = res; + const tronLinkAdapter = new TronLinkAdapter({ + openTronLinkAppOnMobile: true, + openUrlWhenWalletNotFound: false, + checkTimeout: 3000, + }); + const ledger = new LedgerAdapter({ + accountNumber: 2, + }); + const bitKeepAdapter = new BitKeepAdapter(); + const tokenPocketAdapter = new TokenPocketAdapter(); + const okxwalletAdapter = new OkxWalletAdapter(); + setAdapters([ + tronLinkAdapter, + bitKeepAdapter, + tokenPocketAdapter, + okxwalletAdapter, + ledger, + ]); + }); + }, [setAdapters]); + return ( + + + {children} + + + ); +} \ No newline at end of file diff --git a/src/app/api/constants/contracts.ts b/src/app/api/constants/contracts.ts index 16755c1..cf8de7a 100644 --- a/src/app/api/constants/contracts.ts +++ b/src/app/api/constants/contracts.ts @@ -1,7 +1,7 @@ import { Address, EscrowFactory } from "@1inch/cross-chain-sdk"; import dotenv from "dotenv"; import { JsonRpcProvider } from "ethers"; -import { parseEther } from "viem"; +import { parseEther, parseUnits } from "viem"; import { getDestinationImpl, getSourceImpl } from "../order/escrow"; import { Wallet } from "../order/wallet"; dotenv.config(); @@ -11,6 +11,7 @@ export const ChainIds = { BaseSepolia: 84532, MonadTestnet: 10143, EtherlinkTestnet: 128123, + TronNile: 3448148188, }; export const ChainConfigs = { [ChainIds.Sepolia]: { @@ -73,6 +74,20 @@ export const ChainConfigs = { ResolverPrivateKey: process.env.MONAD_TESTNET_USER_PRIVATE_KEY, SafetyDeposit: parseEther("0.001"), }, + [ChainIds.TronNile]: { + LOP: "0x0656e98bf5b9457048b8ac0985cb48b1b6def4ac", // TAYjAyuKjKvkhkcvgJ7CgrJ8PVziU5vr4R + EscrowFactory: "0x527eb6a0f425c77722da1d92aa515f691606571b", // THVQCzNgJxTvBRH297tmHXuxVdcahipy3f + ResolverContractAddress: "0x9afd02fe7b017867e7468a0cacb3546c721edd84", // TQ6iAAL9oV4Xh6DrQwZ8iGa7q1QAcwhpui + BLT: "0xb7eac522e355549cf4820dfa75e8967ddf83432c", // TSjfuGqqg6XWqpDH4WukdvUPVZfXLAJDap + ITRC: "0x19fbfa920c9579bce1006d2d512d49e2dc47de1c", // 21Inches token "TCLbkeYSQR9zX8D7svdQ85NbdSRCDWVM5R", + EscrowSrcImplementationAddress: "0x810deb8c21a11f0f10977378d403c995480c2b8c", // TMjaqzSMeni2H8qSG2JyShS29dY8zgcm3V + EscrowDstImplementationAddress: "0x724132e32346b5199e7821025bcae3a20c5717fb", // TLPL921VcESVS3YKB1KnPxNmBENxTDB3jY + TrueERC20: "0xf8dfdf1ab75de04f485a9871d9298a070b9bebc6", // TYf8mVp2tC7K9AYbFFfv8gVH82JEkbKKDj + ChainName: "NILE", + RpcUrl: "https://nile.trongrid.io", + ResolverPrivateKey: process.env.NILE_USER_PRIVATE_KEY, + SafetyDeposit: parseUnits("1", 6), // TRX decimal is 6 + }, }; export const getChainResolver = (chainId: number) => { const chainConfig = ChainConfigs[chainId]; diff --git a/src/app/components/Navbar.tsx b/src/app/components/Navbar.tsx index 54acae9..5ae9ac2 100644 --- a/src/app/components/Navbar.tsx +++ b/src/app/components/Navbar.tsx @@ -1,5 +1,7 @@ -import Image from "next/image"; +"use client" import { ConnectButton } from "@rainbow-me/rainbowkit"; +import { WalletActionButton } from "@tronweb3/tronwallet-adapter-react-ui"; +import Image from "next/image"; export function Navbar() { return ( @@ -12,8 +14,11 @@ export function Navbar() { height={100} />
-
- +
+ + + +
diff --git a/src/app/components/NetworkSelector.tsx b/src/app/components/NetworkSelector.tsx new file mode 100644 index 0000000..79e2848 --- /dev/null +++ b/src/app/components/NetworkSelector.tsx @@ -0,0 +1,101 @@ +"use client"; + +import { useWallet } from "@tronweb3/tronwallet-adapter-react-hooks"; +import { useAccount, useSwitchChain } from "wagmi"; +import { ALL_CHAINS, isTronChain } from "../constants/chains"; + +export function NetworkSelector() { + const { chain } = useAccount(); + const { switchChain } = useSwitchChain(); + const { wallet, connected, disconnect } = useWallet(); + + const handleNetworkSwitch = async (chainId: number) => { + if (isTronChain(chainId)) { + // Handle Tron network switch + if (connected) { + await disconnect(); + } + // Tron networks are handled by the wallet adapter + console.log("Switching to Tron network:", chainId); + } else { + // Handle Ethereum network switch + if (switchChain) { + switchChain({ chainId }); + } + } + }; + + const getCurrentNetwork = () => { + if (connected && wallet) { + return "Tron Network"; // Tron wallet doesn't expose chain info directly + } + return chain?.name || "Select Network"; + }; + + return ( +
+
+ Current Network: {getCurrentNetwork()} +
+ +
+ {/* Ethereum Networks */} +
+

Ethereum Networks

+ {ALL_CHAINS.filter(chain => !isTronChain(chain.id)).map((network) => ( + + ))} +
+ + {/* Tron Networks */} +
+

Tron Networks

+ {ALL_CHAINS.filter(chain => isTronChain(chain.id)).map((network) => ( + + ))} +
+
+ + {/* Tron Wallet Status */} + {connected && ( +
+
+
Tron Wallet Connected
+
+ Address: {wallet?.adapter.address?.slice(0, 8)}...{wallet?.adapter.address?.slice(-6)} +
+
+ Network: Tron Network +
+
+
+ )} +
+ ); +} \ No newline at end of file diff --git a/src/app/components/OrderCard.tsx b/src/app/components/OrderCard.tsx index 1f88acd..2b326e2 100644 --- a/src/app/components/OrderCard.tsx +++ b/src/app/components/OrderCard.tsx @@ -49,7 +49,7 @@ interface OrderCardProps { } export default function OrderCard({ order }: OrderCardProps) { - const formatAmount = (amount: string, decimals: number) => { + const formatAmount = (amount: string) => { try { return Number(amount).toFixed(6); } catch (error) { @@ -125,26 +125,6 @@ export default function OrderCard({ order }: OrderCardProps) { } }; - const TransactionLink = ({ - href, - tooltip, - className = "", - }: { - href: string; - tooltip: string; - className?: string; - }) => ( - - - - ); - return (
{formatAmount( ((order.swapState as Record) - ?.fromAmount as string) || "0", - ((order.fromToken as Record) - ?.decimals as number) || 18 + ?.fromAmount as string) || "0" )}{" "} { (order.fromToken as Record) @@ -216,9 +194,7 @@ export default function OrderCard({ order }: OrderCardProps) { {formatAmount( ((order.swapState as Record) - ?.toAmount as string) || "0", - ((order.toToken as Record) - ?.decimals as number) || 18 + ?.toAmount as string) || "0" )}{" "} {(order.toToken as Record)?.symbol as string} diff --git a/src/app/components/SwapComponent.tsx b/src/app/components/SwapComponent.tsx index f2eb1a9..07046e2 100644 --- a/src/app/components/SwapComponent.tsx +++ b/src/app/components/SwapComponent.tsx @@ -2,6 +2,7 @@ import { Address, AmountMode, TakerTraits } from "@1inch/cross-chain-sdk"; import { ArrowsUpDownIcon, ChevronDownIcon } from "@heroicons/react/24/outline"; +import { useWallet } from "@tronweb3/tronwallet-adapter-react-hooks"; import { useEffect, useState } from "react"; import { formatUnits, hashTypedData, parseUnits } from "viem"; import { @@ -13,11 +14,16 @@ import { useWriteContract, } from "wagmi"; import { baseSepolia, sepolia } from "wagmi/chains"; -import { CHAINS, getChainLogo } from "../constants/chains"; +import { ALL_CHAINS, getChainLogo, isTronChain } from "../constants/chains"; import { ChainConfigs } from "../constants/contracts"; import { LOP_ADDRESSES, TOKENS } from "../constants/tokens"; import { createOrder as createOrderLogic } from "../logic/swap"; import { type Order, type SwapState } from "../types/order"; +import { + approveTronToken, + checkTronTokenAllowance, + getTronTokenBalance +} from "../utils/tron"; export default function SwapComponent() { const { address, isConnected } = useAccount(); @@ -25,6 +31,9 @@ export default function SwapComponent() { const { writeContract } = useWriteContract(); const { signTypedDataAsync } = useSignTypedData(); + // Tron wallet integration + const { wallet, connected: tronConnected } = useWallet(); + const [swapState, setSwapState] = useState({ fromChain: sepolia.id, toChain: baseSepolia.id, @@ -34,6 +43,22 @@ export default function SwapComponent() { toAmount: "", }); + // Helper function to check if current wallet supports the chain + const isWalletConnected = () => { + if (isTronChain(swapState.fromChain) || isTronChain(swapState.toChain)) { + return tronConnected; + } + return isConnected; + }; + + // Helper function to get current wallet address + const getCurrentAddress = () => { + if (isTronChain(swapState.fromChain) || isTronChain(swapState.toChain)) { + return wallet?.adapter.address; + } + return address; + }; + const [isLoading, setIsLoading] = useState(false); const [isApproving, setIsApproving] = useState(false); const [showFromTokenList, setShowFromTokenList] = useState(false); @@ -41,15 +66,20 @@ export default function SwapComponent() { const [showFromChainList, setShowFromChainList] = useState(false); const [showToChainList, setShowToChainList] = useState(false); - // Get balances and allowances + // State for Tron balances and allowances + const [tronFromBalance, setTronFromBalance] = useState("0"); + const [tronToBalance, setTronToBalance] = useState("0"); + const [tronAllowance, setTronAllowance] = useState("0"); + + // Get balances and allowances (EVM chains use wagmi, Tron chains use custom logic) const { data: fromTokenBalance } = useBalance({ - address, + address: isTronChain(swapState.fromChain) ? undefined : address, token: swapState.fromToken.address as `0x${string}`, chainId: swapState.fromChain, }); const { data: toTokenBalance } = useBalance({ - address, + address: isTronChain(swapState.toChain) ? undefined : address, token: swapState.toToken.address as `0x${string}`, chainId: swapState.toChain, }); @@ -73,90 +103,155 @@ export default function SwapComponent() { chainId: swapState.fromChain, }); + + + // Update Tron balances when wallet or chain changes + useEffect(() => { + const updateTronBalances = async () => { + if (isTronChain(swapState.fromChain) && wallet && tronConnected && wallet.adapter.address) { + const balance = await getTronTokenBalance( + wallet, + swapState.fromToken.address, + wallet.adapter.address + ); + setTronFromBalance(balance); + } + + if (isTronChain(swapState.toChain) && wallet && tronConnected && wallet.adapter.address) { + const balance = await getTronTokenBalance( + wallet, + swapState.toToken.address, + wallet.adapter.address + ); + setTronToBalance(balance); + } + }; + + updateTronBalances(); + }, [swapState.fromChain, swapState.toChain, swapState.fromToken, swapState.toToken, wallet, tronConnected]); + + // Update Tron allowance when wallet or chain changes + useEffect(() => { + const updateTronAllowance = async () => { + if (isTronChain(swapState.fromChain) && wallet && tronConnected && wallet.adapter.address) { + const allowance = await checkTronTokenAllowance( + wallet, + swapState.fromToken.address, + wallet.adapter.address, + LOP_ADDRESSES[swapState.fromChain] + ); + + setTronAllowance(allowance); + } + }; + + updateTronAllowance(); + }, [swapState.fromChain, swapState.fromToken, wallet, tronConnected]); + const needsApproval = () => { - // Check if we have all required data - if ( - !address || - !swapState.fromAmount || - allowance === undefined || - allowance === null - ) { + if (!swapState.fromAmount || parseFloat(swapState.fromAmount) <= 0) { return false; } - try { - const requiredAmount = parseUnits( - swapState.fromAmount, - swapState.fromToken.decimals - ); - - if (requiredAmount <= 0) { + if (isTronChain(swapState.fromChain)) { + // For Tron chains, check allowance using Tron wallet + if (!tronConnected || !wallet) { return false; } - // Check if allowance is less than required amount - const currentAllowance = allowance as bigint; - const needsApproval = currentAllowance < requiredAmount; + const requiredAmount = parseFloat(swapState.fromAmount) * Math.pow(10, swapState.fromToken.decimals); + const currentAllowance = parseFloat(tronAllowance); - console.log("🔍 Checking spending allowance..."); - console.log( - `Current allowance: ${formatUnits(currentAllowance, swapState.fromToken.decimals)} ${swapState.fromToken.symbol}` - ); - console.log( - `Required amount: ${formatUnits(requiredAmount, swapState.fromToken.decimals)} ${swapState.fromToken.symbol}` + return currentAllowance < requiredAmount; + } else { + // For EVM chains, use wagmi allowance + if (!address || allowance === undefined || allowance === null) { + return false; + } + const requiredAmount = parseUnits( + swapState.fromAmount, + swapState.fromToken.decimals ); - console.log(`Needs approval: ${needsApproval}`); + const needsApproval = (allowance as bigint) < requiredAmount; return needsApproval; - } catch (error) { - console.error("Error checking approval:", error); - return false; } }; const handleApprove = async () => { - if (!address || !swapState.fromAmount) return; - setIsApproving(true); try { - console.log("🔐 Setting spending cap for token..."); - const requiredAmount = parseUnits( - swapState.fromAmount, - swapState.fromToken.decimals - ); + console.log("🔐 Approving token spend..."); - console.log( - `Approving spending cap of ${formatUnits(requiredAmount, swapState.fromToken.decimals)} ${swapState.fromToken.symbol}` - ); - console.log(`Spender: ${LOP_ADDRESSES[swapState.fromChain]}`); - await writeContract({ - address: swapState.fromToken.address as `0x${string}`, - abi: [ - { - constant: false, - inputs: [ - { name: "_spender", type: "address" }, - { name: "_value", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", type: "bool" }], - type: "function", - }, - ], - functionName: "approve", - args: [ - LOP_ADDRESSES[swapState.fromChain] as `0x${string}`, - requiredAmount, - ], - chainId: swapState.fromChain, - }); + if (isTronChain(swapState.fromChain)) { + // For Tron chains, use Tron wallet approval + if (!tronConnected || !wallet) { + throw new Error("Tron wallet not connected"); + } + + const requiredAmount = parseFloat(swapState.fromAmount) * Math.pow(10, swapState.fromToken.decimals); + + const txHash = await approveTronToken( + wallet, + swapState.fromToken.address, + LOP_ADDRESSES[swapState.fromChain], + requiredAmount.toString() + ); + + console.log("✅ Tron token approval successful:", txHash); + + // Update allowance after approval + const newAllowance = await checkTronTokenAllowance( + wallet, + swapState.fromToken.address, + wallet.adapter.address, + LOP_ADDRESSES[swapState.fromChain] + ); + setTronAllowance(newAllowance); + + } else { + // For EVM chains, use wagmi approval + if (!address) { + throw new Error("EVM wallet not connected"); + } - console.log("✅ Spending cap approved successfully"); - console.log("🔄 Allowance will be updated automatically..."); + await switchChain({ chainId: swapState.fromChain }); + + // Add a delay to ensure the chain switch is complete + await new Promise(resolve => setTimeout(resolve, 2000)); + + const requiredAmount = parseUnits( + swapState.fromAmount, + swapState.fromToken.decimals + ); + + await writeContract({ + address: swapState.fromToken.address as `0x${string}`, + abi: [ + { + constant: false, + inputs: [ + { name: "_spender", type: "address" }, + { name: "_value", type: "uint256" }, + ], + name: "approve", + outputs: [{ name: "", type: "bool" }], + type: "function", + }, + ], + functionName: "approve", + args: [ + LOP_ADDRESSES[swapState.fromChain] as `0x${string}`, + requiredAmount, + ], + chainId: swapState.fromChain as number, + }); + console.log("✅ EVM token approval successful"); + } } catch (error) { - console.error("❌ Spending cap approval failed:", error); - // You might want to show a user-friendly error message here + console.error("❌ Token approval failed:", error); + alert(`Approval failed: ${error instanceof Error ? error.message : "Unknown error"}`); } finally { setIsApproving(false); } @@ -186,13 +281,21 @@ export default function SwapComponent() { }; const handleSwap = async () => { - if (!isConnected) return; + if (!isWalletConnected()) { + alert("Please connect your wallet first"); + return; + } - // Safety check: Ensure we have sufficient allowance before proceeding - if (needsApproval()) { - console.error( - "❌ Cannot proceed with swap: Insufficient allowance. Please approve spending cap first." - ); + // Check if we have the right wallet connected for the from chain + if (isTronChain(swapState.fromChain) && !tronConnected) { + alert("Please connect your Tron wallet to perform this swap"); + setIsLoading(false); + return; + } + + if (!isTronChain(swapState.fromChain) && !isConnected) { + alert("Please connect your EVM wallet to perform this swap"); + setIsLoading(false); return; } @@ -220,17 +323,32 @@ export default function SwapComponent() { try { console.log("🔄 Switching to source chain..."); - await switchChain({ chainId: swapState.fromChain }); - console.log("Switched to source chain"); - // Add a small delay to ensure the chain switch is complete - await new Promise(resolve => setTimeout(resolve, 1000)); + + // Handle chain switching based on wallet type + if (isTronChain(swapState.fromChain)) { + // For Tron chains, we need to ensure Tron wallet is connected + if (!tronConnected) { + throw new Error("Please connect your Tron wallet first"); + } + console.log("Using Tron wallet for source chain"); + } else { + // For EVM chains, use wagmi switchChain + if (typeof swapState.fromChain === "number") { + await switchChain({ chainId: swapState.fromChain }); + // Add a delay to ensure the chain switch is complete + await new Promise(resolve => setTimeout(resolve, 2000)); + } else { + throw new Error("Invalid chain ID for EVM network"); + } + } + const secret = "0x0000000000000000000000000000000000000000000000000000000000000000"; console.log("✅ Switched to source chain successfully"); console.log("📝 Creating order data..."); const order = await createOrderLogic( - address!, + getCurrentAddress()!, swapState.fromAmount, swapState.toAmount, swapState.fromToken.address, @@ -242,7 +360,6 @@ export default function SwapComponent() { swapState.toToken.decimals ); - console.log("🔐 Signing order data..."); const signature = await signTypedDataAsync(order.orderdata); console.log("📦 Preparing order for submission..."); @@ -331,13 +448,13 @@ export default function SwapComponent() { const updatedOrders = pendingSecretOrders.map((o: Order) => o.id === orderId ? { - ...o, - status: "PENDING_SECRET", - transactions: resultBody.transactions || {}, - message: - resultBody.message || - "Escrow contracts deployed on both chains. Waiting for secret revelation.", - } + ...o, + status: "PENDING_SECRET", + transactions: resultBody.transactions || {}, + message: + resultBody.message || + "Escrow contracts deployed on both chains. Waiting for secret revelation.", + } : o ); localStorage.setItem("orders", JSON.stringify(updatedOrders)); @@ -365,10 +482,10 @@ export default function SwapComponent() { const withdrawOrders = currentOrders.map((o: Order) => o.id === orderId ? { - ...o, - status: "PENDING_WITHDRAW", - message: "Secret revealed. Starting withdrawal process...", - } + ...o, + status: "PENDING_WITHDRAW", + message: "Secret revealed. Starting withdrawal process...", + } : o ); localStorage.setItem("orders", JSON.stringify(withdrawOrders)); @@ -465,12 +582,44 @@ export default function SwapComponent() { }; const formatBalance = ( - balance: { value: bigint; decimals: number } | undefined + balance: { value: bigint; decimals: number } | undefined, + chainId?: number ) => { if (!balance) return "0.00"; + // For Tron chains, we don't have balance data from wagmi + if (chainId && isTronChain(chainId)) return "N/A"; return Number(formatUnits(balance.value, balance.decimals)).toFixed(4); }; + // Format Tron balance for display + const formatTronBalance = (balance: string | number, decimals: number = 6) => { + if (!balance || balance === "0" || balance === 0) { + return "0.00"; + } + + // Handle different balance formats + let balanceNum: number; + + // If balance is already a number + if (typeof balance === 'number') { + balanceNum = balance; + } else if (typeof balance === 'string') { + // Remove any non-numeric characters except decimal point + const cleanBalance = balance.replace(/[^0-9.]/g, ''); + balanceNum = parseFloat(cleanBalance); + } else { + // If it's an object (like BigNumber), try to convert to string first + const balanceStr = String(balance); + balanceNum = parseFloat(balanceStr); + } + + // Apply decimal conversion + const adjustedBalance = balanceNum / Math.pow(10, decimals); + const result = adjustedBalance.toFixed(4); + + return result; + }; + return (
@@ -478,9 +627,9 @@ export default function SwapComponent() { Exchange Assets
-
+
- Connected + {isWalletConnected() ? 'Connected' : 'Disconnected'}
@@ -492,7 +641,10 @@ export default function SwapComponent() { From - Balance: {formatBalance(fromTokenBalance)} + Balance: {isTronChain(swapState.fromChain) + ? formatTronBalance(tronFromBalance, swapState.fromToken.decimals) + : formatBalance(fromTokenBalance, swapState.fromChain) + }
@@ -510,14 +662,14 @@ export default function SwapComponent() { className="w-6 h-6 rounded-full" /> - {CHAINS.find(c => c.id === swapState.fromChain)?.name} + {ALL_CHAINS.find(c => c.id === swapState.fromChain)?.name} {showFromChainList && (
- {CHAINS.map(chain => ( + {ALL_CHAINS.map(chain => (
@@ -633,14 +788,14 @@ export default function SwapComponent() { className="w-6 h-6 rounded-full" /> - {CHAINS.find(c => c.id === swapState.toChain)?.name} + {ALL_CHAINS.find(c => c.id === swapState.toChain)?.name} {showToChainList && (
- {CHAINS.map(chain => ( + {ALL_CHAINS.map(chain => (
- -
- - Allowance - - - {allowance != null - ? formatUnits(allowance as bigint, swapState.fromToken.decimals) - : "0.00"} - -
{/* Action Button */} - {!isConnected ? ( -
- Please connect your wallet -
- ) : !swapState.fromAmount || !swapState.toAmount ? ( -
- Enter amounts to continue -
- ) : needsApproval() ? ( + {needsApproval() ? ( ) : (
); -} +} \ No newline at end of file diff --git a/src/app/constants/abi.ts b/src/app/constants/abi.ts new file mode 100644 index 0000000..6d42f39 --- /dev/null +++ b/src/app/constants/abi.ts @@ -0,0 +1,197 @@ +// TRC20 Token ABI +export const TRC20_ABI = [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [{"name": "", "type": "string"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [{"name": "", "type": "string"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [{"name": "", "type": "uint8"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{"name": "", "type": "uint256"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{"name": "_owner", "type": "address"}], + "name": "balanceOf", + "outputs": [{"name": "balance", "type": "uint256"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + {"name": "_owner", "type": "address"}, + {"name": "_spender", "type": "address"} + ], + "name": "allowance", + "outputs": [{"name": "", "type": "uint256"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + {"name": "_spender", "type": "address"}, + {"name": "_value", "type": "uint256"} + ], + "name": "approve", + "outputs": [{"name": "", "type": "bool"}], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + {"name": "_to", "type": "address"}, + {"name": "_value", "type": "uint256"} + ], + "name": "transfer", + "outputs": [{"name": "", "type": "bool"}], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + {"name": "_from", "type": "address"}, + {"name": "_to", "type": "address"}, + {"name": "_value", "type": "uint256"} + ], + "name": "transferFrom", + "outputs": [{"name": "", "type": "bool"}], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +]; + +// ERC20 ABI (for EVM chains) +export const ERC20_ABI = [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [{"name": "", "type": "string"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [{"name": "", "type": "string"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [{"name": "", "type": "uint8"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{"name": "", "type": "uint256"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{"name": "_owner", "type": "address"}], + "name": "balanceOf", + "outputs": [{"name": "balance", "type": "uint256"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + {"name": "_owner", "type": "address"}, + {"name": "_spender", "type": "address"} + ], + "name": "allowance", + "outputs": [{"name": "", "type": "uint256"}], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + {"name": "_spender", "type": "address"}, + {"name": "_value", "type": "uint256"} + ], + "name": "approve", + "outputs": [{"name": "", "type": "bool"}], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + {"name": "_to", "type": "address"}, + {"name": "_value", "type": "uint256"} + ], + "name": "transfer", + "outputs": [{"name": "", "type": "bool"}], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + {"name": "_from", "type": "address"}, + {"name": "_to", "type": "address"}, + {"name": "_value", "type": "uint256"} + ], + "name": "transferFrom", + "outputs": [{"name": "", "type": "bool"}], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +]; + + \ No newline at end of file diff --git a/src/app/constants/chains.ts b/src/app/constants/chains.ts index 06d2044..6117aa3 100644 --- a/src/app/constants/chains.ts +++ b/src/app/constants/chains.ts @@ -4,6 +4,16 @@ import { monadTestnet, sepolia, } from "wagmi/chains"; +// Tron network configurations +export const TRON_NETWORKS = { + nile: { + id: 3448148188, // Tron Nile Testnet chain ID + name: "Tron Nile Testnet", + logo: "/tron-logo.png", + chainId: 3448148188, + rpcUrl: "https://nile.trongrid.io", + }, +}; // Chain configurations export const CHAINS = [ @@ -33,9 +43,20 @@ export const CHAINS = [ }, ]; +// Combined chains including Tron networks +export const ALL_CHAINS = [ + ...CHAINS, + { + id: TRON_NETWORKS.nile.id, + name: TRON_NETWORKS.nile.name, + logo: TRON_NETWORKS.nile.logo, + chain: TRON_NETWORKS.nile, + }, +]; + // Helper functions export const getChainById = (chainId: number) => { - return CHAINS.find(chain => chain.id === chainId); + return ALL_CHAINS.find(chain => chain.id === chainId); }; export const getChainName = (chainId: number): string => { @@ -49,5 +70,14 @@ export const getChainLogo = (chainId: number): string => { }; export const isSupportedChain = (chainId: number): boolean => { - return CHAINS.some(chain => chain.id === chainId); + return ALL_CHAINS.some(chain => chain.id === chainId); +}; + +export const isTronChain = (chainId: number): boolean => { + return chainId === 3448148188; // Tron Nile chain ID +}; + +export const getTronNetwork = (chainId: number) => { + if (chainId === 3448148188) return TRON_NETWORKS.nile; + return null; }; diff --git a/src/app/constants/contracts.ts b/src/app/constants/contracts.ts index 17c2f1a..08f9467 100644 --- a/src/app/constants/contracts.ts +++ b/src/app/constants/contracts.ts @@ -4,6 +4,7 @@ export const ChainIds = { BaseSepolia: 84532, MonadTestnet: 10143, EtherlinkTestnet: 128123, + TronNile: 3448148188, }; export const ChainConfigs = { [ChainIds.Sepolia]: { @@ -62,4 +63,16 @@ export const ChainConfigs = { RpcUrl: "https://rpc.ankr.com/monad_testnet", SafetyDeposit: parseEther("0.001"), }, + [ChainIds.TronNile]: { + LOP: "0x0656e98bf5b9457048b8ac0985cb48b1b6def4ac", // "TAYjAyuKjKvkhkcvgJ7CgrJ8PVziU5vr4R", + EscrowFactory: "0x527eb6a0f425c77722da1d92aa515f691606571b", // "THVQCzNgJxTvBRH297tmHXuxVdcahipy3f", + ResolverContractAddress: "0x9afd02fe7b017867e7468a0cacb3546c721edd84", // "TQ6iAAL9oV4Xh6DrQwZ8iGa7q1QAcwhpui", + ITRC: "0x19fbfa920c9579bce1006d2d512d49e2dc47de1c", //"TCLbkeYSQR9zX8D7svdQ85NbdSRCDWVM5R", + EscrowSrcImplementationAddress: "0x810deb8c21a11f0f10977378d403c995480c2b8c", // "TMjaqzSMeni2H8qSG2JyShS29dY8zgcm3V", + EscrowDstImplementationAddress: "0x724132e32346b5199e7821025bcae3a20c5717fb", // "TLPL921VcESVS3YKB1KnPxNmBENxTDB3jY", + TrueERC20: "0xf8dfdf1ab75de04f485a9871d9298a070b9bebc6", // "TYf8mVp2tC7K9AYbFFfv8gVH82JEkbKKDj", + ChainId: 3448148188, // NILE=3448148188, Mainnet=728126428 + RpcUrl: "https://nile.trongrid.io", + SafetyDeposit: parseEther("0.001"), + }, }; diff --git a/src/app/constants/tokens.ts b/src/app/constants/tokens.ts index cffc422..508c82a 100644 --- a/src/app/constants/tokens.ts +++ b/src/app/constants/tokens.ts @@ -5,6 +5,7 @@ import { sepolia, } from "wagmi/chains"; import { type Token } from "../types/order"; +import { ChainIds } from "./contracts"; // Token configurations export const TOKENS: Record = { @@ -44,6 +45,16 @@ export const TOKENS: Record = { logo: "/blt-logo.svg", }, ], + // Tron tokens + [ChainIds.TronNile]: [ + { + symbol: "ITRC", + name: "ITRC Coin", + address: "TCLbkeYSQR9zX8D7svdQ85NbdSRCDWVM5R", // Test USDT on Nile + decimals: 6, + logo: "/blt-logo.svg", + }, + ], }; // LOP (Liquidity Optimization Protocol) addresses per chain @@ -52,6 +63,7 @@ export const LOP_ADDRESSES: Record = { [baseSepolia.id]: "0xe30f9abbadc1eb84b41d41035b2a2c7d0bd5f9b2", [monadTestnet.id]: "0xFCf9F11666Adb060D03Bb873954673f90914bAdE", [etherlinkTestnet.id]: "0x942DFf5Af350fd0816Bd03C91729633C293dB5dA", + [ChainIds.TronNile]: "0x0656e98bf5b9457048b8ac0985cb48b1b6def4ac", }; // Helper functions @@ -64,7 +76,7 @@ export const getTokenByAddress = ( address: string ): Token | undefined => { return TOKENS[chainId]?.find( - token => token.address.toLowerCase() === address.toLowerCase() + (token: Token) => token.address.toLowerCase() === address.toLowerCase() ); }; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index df8847a..b613b2b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,9 +1,9 @@ import type { Metadata } from "next"; import { Roboto } from "next/font/google"; -import "./globals.css"; -import { RainbowProvider } from "./RainbowProvider"; -import { Navbar } from "./components/Navbar"; +import { CombinedWalletProvider } from "./CombinedWalletProvider"; import { Footer } from "./components/Footer"; +import { Navbar } from "./components/Navbar"; +import "./globals.css"; const roboto = Roboto({ weight: "400", @@ -23,13 +23,13 @@ export default function RootLayout({ return ( - +
{children}
-
+ ); diff --git a/src/app/types/tronweb.d.ts b/src/app/types/tronweb.d.ts new file mode 100644 index 0000000..318eef8 --- /dev/null +++ b/src/app/types/tronweb.d.ts @@ -0,0 +1,36 @@ +// TronWeb TypeScript declarations +declare global { + interface Window { + tronWeb?: { + contract(): { + at(address: string): Promise<{ + balanceOf(address: string): { + call(): Promise; + }; + allowance(owner: string, spender: string): { + call(): Promise; + }; + approve(spender: string, amount: string): { + send(): Promise; + }; + transfer(to: string, amount: string): { + send(): Promise; + }; + transferFrom(from: string, to: string, amount: string): { + send(): Promise; + }; + }>; + }; + defaultAddress: { + base58: string; + hex: string; + }; + ready: boolean; + request: (request: unknown) => Promise; + signMessage: (message: string) => Promise; + signTransaction: (transaction: unknown) => Promise; + }; + } +} + +export { }; diff --git a/src/app/utils/tron.ts b/src/app/utils/tron.ts new file mode 100644 index 0000000..7a0af43 --- /dev/null +++ b/src/app/utils/tron.ts @@ -0,0 +1,740 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { TRC20_ABI } from "../constants/abi"; +import { getTronNetwork, isTronChain } from "../constants/chains"; +import { ChainIds } from "../constants/contracts"; +export interface TronTransaction { + to: string; + amount: string; + data?: string; +} + +export interface TronAccount { + address: string; + balance: string; + network: string; +} + +export interface TronSignature { + signature: string; + messageHash: string; +} + +// Tron API endpoints +const TRON_API_ENDPOINTS = { + mainnet: "https://api.trongrid.io", + shasta: "https://api.shasta.trongrid.io", + nile: "https://nile.trongrid.io" +}; + +// Helper function to get TronWeb instance +const getTronWebInstance = async (chainId: number) => { + // Check if window.tronWeb is available (TronLink) + if (typeof window !== 'undefined' && window.tronWeb && window.tronWeb.ready) { + console.log("🌐 [getTronWebInstance] Using window.tronWeb (TronLink)"); + return window.tronWeb; + } + + console.log("⚠️ [getTronWebInstance] TronWeb not available, will use API fallback"); + return null; +}; + +/** + * Check if the given chain ID is a Tron network + */ +export const isTronNetwork = (chainId: number): boolean => { + return isTronChain(chainId); +}; + +/** + * Get Tron network configuration + */ +export const getTronNetworkConfig = (chainId: number) => { + return getTronNetwork(chainId); +}; + +/** + * Convert Ethereum address format to Tron address format + */ +export const toTronAddress = (address: string): string => { + // Tron addresses are base58 encoded + // This is a simplified conversion - in practice you'd use a proper base58 library + return address; +}; + +/** + * Convert Tron address format to Ethereum address format + */ +export const fromTronAddress = (address: string): string => { + // Convert from Tron base58 format to Ethereum hex format + // This is a simplified conversion - in practice you'd use a proper base58 library + return address; +}; + +/** + * Get Tron network RPC URL + */ +export const getTronRpcUrl = (chainId: number): string => { + const network = getTronNetwork(chainId); + return network?.rpcUrl || ""; +}; + +/** + * Validate Tron address format + */ +export const isValidTronAddress = (address: string): boolean => { + // Basic validation - Tron addresses are 34 characters long and start with 'T' + return address.length === 34 && address.startsWith("T"); +}; + +/** + * Get supported Tron networks + */ +export const getSupportedTronNetworks = () => { + return [ + ChainIds.TronNile, + ]; +}; + +/** + * Format Tron balance + */ +export const formatTronBalance = (balance: string, decimals: number = 6): string => { + const num = parseFloat(balance) / Math.pow(10, decimals); + return num.toFixed(6); +}; + +/** + * Convert TRX to SUN (smallest unit) + */ +export const trxToSun = (trx: number): string => { + return (trx * 1000000).toString(); +}; + +/** + * Convert SUN to TRX + */ +export const sunToTrx = (sun: string): number => { + return parseFloat(sun) / 1000000; +}; + +/** + * Get Tron account balance via API + */ +export const getTronAccountBalance = async (address: string, chainId: number): Promise => { + console.log("🔍 [getTronAccountBalance] Starting...", { address, chainId }); + + try { + const network = getTronNetwork(chainId); + console.log("🌐 [getTronAccountBalance] Network config:", network); + + if (!network) { + console.error("❌ [getTronAccountBalance] Invalid Tron network for chainId:", chainId); + throw new Error("Invalid Tron network"); + } + + const apiUrl = `${network.rpcUrl}/v1/accounts/${address}`; + console.log("📡 [getTronAccountBalance] Making API call to:", apiUrl); + + const response = await fetch(apiUrl); + console.log("📥 [getTronAccountBalance] Response status:", response.status); + + if (!response.ok) { + console.error("❌ [getTronAccountBalance] API call failed:", response.status, response.statusText); + throw new Error("Failed to fetch account balance"); + } + + const data = await response.json(); + console.log("📊 [getTronAccountBalance] Response data:", data); + + const balance = data.balance || "0"; + console.log("💰 [getTronAccountBalance] Final balance:", balance); + + return balance; + } catch (error) { + console.error("❌ [getTronAccountBalance] Error:", error); + return "0"; + } +}; + +/** + * Get TRC20 token balance using TronWeb + */ +export const getTronTokenBalance = async ( + wallet: any, + tokenAddress: string, + userAddress: string | null +): Promise => { + console.log("🔍 [getTronTokenBalance] Starting...", { + wallet: !!wallet, + hasAdapter: !!wallet?.adapter, + tokenAddress, + userAddress + }); + + try { + if (!wallet || !wallet.adapter || !userAddress) { + console.error("❌ [getTronTokenBalance] Wallet validation failed:", { + hasWallet: !!wallet, + hasAdapter: !!wallet?.adapter, + userAddress + }); + throw new Error("Tron wallet not available or address is null"); + } + + // Get the current chain ID from wallet or use default + const chainId = wallet.adapter.chainId || ChainIds.TronNile; + console.log("🌐 [getTronTokenBalance] Chain ID:", chainId); + + const network = getTronNetwork(chainId); + console.log("🌐 [getTronTokenBalance] Network config:", network); + + if (!network) { + console.error("❌ [getTronTokenBalance] Invalid Tron network for chainId:", chainId); + throw new Error("Invalid Tron network"); + } + + // Get TronWeb instance + const tronWeb = await getTronWebInstance(chainId); + + if (tronWeb) { + console.log("🌐 [getTronTokenBalance] Using TronWeb for balance check"); + + try { + // Use TronWeb to get token balance + const contract = await tronWeb.contract().at(tokenAddress); + console.log("📋 [getTronTokenBalance] Contract instance created"); + + const balance = await contract.balanceOf(userAddress).call(); + console.log("💰 [getTronTokenBalance] TronWeb balance result:", balance); + + // Convert balance to string and adjust for decimals + const balanceString = String(balance); + console.log("💰 [getTronTokenBalance] Raw balance:", balanceString); + + // Note: You might want to adjust for decimals here + // const adjustedBalance = parseFloat(balanceString) / Math.pow(10, decimals); + + return balanceString; + } catch (tronWebError) { + console.error("❌ [getTronTokenBalance] TronWeb error:", tronWebError); + console.log("🔄 [getTronTokenBalance] Falling back to API call..."); + + // Fallback to API call + const balance = await callTronContract( + tokenAddress, + "balanceOf", + [userAddress], + chainId + ); + + console.log("💰 [getTronTokenBalance] API fallback balance:", balance); + return balance || "0"; + } + } else { + console.log("⚠️ [getTronTokenBalance] TronWeb not available, using API call"); + + // Fallback to API call + const balance = await callTronContract( + tokenAddress, + "balanceOf", + [userAddress], + chainId + ); + + console.log("💰 [getTronTokenBalance] API balance:", balance); + return balance || "0"; + } + } catch (error) { + console.error("❌ [getTronTokenBalance] Error:", error); + return "0"; + } +}; + +/** + * Call Tron smart contract function + */ +export const callTronContract = async ( + contractAddress: string, + functionName: string, + parameters: any[] = [], + chainId: number +): Promise => { + console.log("🔍 [callTronContract] Starting...", { + contractAddress, + functionName, + parameters, + chainId + }); + + try { + const network = getTronNetwork(chainId); + console.log("🌐 [callTronContract] Network config:", network); + + if (!network) { + console.error("❌ [callTronContract] Invalid Tron network for chainId:", chainId); + throw new Error("Invalid Tron network"); + } + + // Find the ABI function + console.log("🔍 [callTronContract] Searching for function in TRC20_ABI:", functionName); + const abiFunction = TRC20_ABI.find(item => + item.type === "function" && item.name === functionName + ); + + console.log("📋 [callTronContract] Found ABI function:", abiFunction); + + if (!abiFunction) { + console.error("❌ [callTronContract] Function not found in ABI:", functionName); + throw new Error(`Function ${functionName} not found in ABI`); + } + + // Encode function call + console.log("🔧 [callTronContract] Encoding function call..."); + const encodedData = encodeTronFunctionCall(abiFunction, parameters); + console.log("🔧 [callTronContract] Encoded data:", encodedData); + + const requestBody = { + contract_address: contractAddress, + function_selector: functionName, + parameter: encodedData, + owner_address: parameters[0] || "", // Use first parameter as owner if available + fee_limit: 1000000000, + call_value: 0 + }; + + console.log("📤 [callTronContract] Request body:", requestBody); + + // Make API call to Tron network + const apiUrl = `${network.rpcUrl}/wallet/triggersmartcontract`; + console.log("📡 [callTronContract] Making API call to:", apiUrl); + + const response = await fetch(apiUrl, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(requestBody) + }); + + console.log("📥 [callTronContract] Response status:", response.status); + + if (!response.ok) { + console.error("❌ [callTronContract] API call failed:", response.status, response.statusText); + throw new Error("Failed to call Tron contract"); + } + + const data = await response.json(); + console.log("📊 [callTronContract] Response data:", data); + + const result = data.result || "0"; + console.log("✅ [callTronContract] Final result:", result); + + return result; + } catch (error) { + console.error("❌ [callTronContract] Error:", error); + throw error; + } +}; + +/** + * Encode Tron function call parameters + */ +export const encodeTronFunctionCall = (abiFunction: any, parameters: any[]): string => { + console.log("🔧 [encodeTronFunctionCall] Starting...", { + abiFunction, + parameters + }); + + // This is a simplified encoding - in practice you'd use a proper ABI encoder + // For now, we'll return a placeholder + console.log("⚠️ [encodeTronFunctionCall] Using placeholder encoding - needs proper ABI encoder"); + console.log("📝 [encodeTronFunctionCall] Parameters to encode:", parameters); + + // TODO: Implement proper ABI encoding for Tron + // This should use a library like ethers.js or similar for proper parameter encoding + const encodedData = "0x"; + console.log("🔧 [encodeTronFunctionCall] Encoded data (placeholder):", encodedData); + + return encodedData; +}; + +/** + * Approve Tron token spending using TronWeb + */ +export const approveTronToken = async ( + wallet: any, + tokenAddress: string, + spenderAddress: string, + amount: string +): Promise => { + console.log("🔍 [approveTronToken] Starting...", { + wallet: !!wallet, + hasAdapter: !!wallet?.adapter, + tokenAddress, + spenderAddress, + amount + }); + + try { + if (!wallet || !wallet.adapter) { + console.error("❌ [approveTronToken] Wallet validation failed:", { + hasWallet: !!wallet, + hasAdapter: !!wallet?.adapter + }); + throw new Error("Tron wallet not available"); + } + + const chainId = wallet.adapter.chainId || ChainIds.TronNile; + console.log("🌐 [approveTronToken] Chain ID:", chainId); + + const network = getTronNetwork(chainId); + console.log("🌐 [approveTronToken] Network config:", network); + + if (!network) { + console.error("❌ [approveTronToken] Invalid Tron network for chainId:", chainId); + throw new Error("Invalid Tron network"); + } + + // Get TronWeb instance + const tronWeb = await getTronWebInstance(chainId); + + if (tronWeb && tronWeb.ready) { + console.log("🌐 [approveTronToken] Using TronWeb for approval"); + + try { + // Use TronWeb to approve token spending + const contract = await tronWeb.contract().at(tokenAddress); + console.log("📋 [approveTronToken] Contract instance created"); + + console.log("📝 [approveTronToken] Sending approval transaction..."); + const result = await contract.approve(spenderAddress, amount).send(); + console.log("📊 [approveTronToken] TronWeb approval result:", result); + + const txHash = (result as any).txid || (result as any).transaction?.txID || "0x0000000000000000000000000000000000000000000000000000000000000000"; + console.log("✅ [approveTronToken] TronWeb transaction hash:", txHash); + + return txHash; + } catch (tronWebError) { + console.error("❌ [approveTronToken] TronWeb error:", tronWebError); + console.log("🔄 [approveTronToken] Falling back to wallet adapter..."); + + // Fallback to wallet adapter + const transaction = await createTronTransaction( + wallet, + tokenAddress, + "approve", + [spenderAddress, amount], + chainId + ); + + console.log("📊 [approveTronToken] Wallet adapter transaction result:", transaction); + + const txHash = (transaction as any).txid || "0x0000000000000000000000000000000000000000000000000000000000000000"; + console.log("✅ [approveTronToken] Wallet adapter transaction hash:", txHash); + + return txHash; + } + } else { + console.log("⚠️ [approveTronToken] TronWeb not available, using wallet adapter"); + + // Use wallet adapter + const transaction = await createTronTransaction( + wallet, + tokenAddress, + "approve", + [spenderAddress, amount], + chainId + ); + + console.log("📊 [approveTronToken] Wallet adapter transaction result:", transaction); + + const txHash = (transaction as any).txid || "0x0000000000000000000000000000000000000000000000000000000000000000"; + console.log("✅ [approveTronToken] Wallet adapter transaction hash:", txHash); + + return txHash; + } + } catch (error) { + console.error("❌ [approveTronToken] Error:", error); + throw error; + } +}; + +/** + * Check Tron token allowance using TronWeb + */ +export const checkTronTokenAllowance = async ( + wallet: any, + tokenAddress: string, + ownerAddress: string | null, + spenderAddress: string +): Promise => { + console.log("🔍 [checkTronTokenAllowance] Starting...", { + wallet: !!wallet, + hasAdapter: !!wallet?.adapter, + tokenAddress, + ownerAddress, + spenderAddress + }); + + try { + if (!wallet || !wallet.adapter || !ownerAddress) { + console.error("❌ [checkTronTokenAllowance] Wallet validation failed:", { + hasWallet: !!wallet, + hasAdapter: !!wallet?.adapter, + ownerAddress + }); + throw new Error("Tron wallet not available or address is null"); + } + + const chainId = wallet.adapter.chainId || ChainIds.TronNile; + console.log("🌐 [checkTronTokenAllowance] Chain ID:", chainId); + + // Get TronWeb instance + const tronWeb = await getTronWebInstance(chainId); + + if (tronWeb) { + console.log("🌐 [checkTronTokenAllowance] Using TronWeb for allowance check"); + + try { + // Use TronWeb to get token allowance + const contract = await tronWeb.contract().at(tokenAddress); + console.log("📋 [checkTronTokenAllowance] Contract instance created"); + + const allowance = await contract.allowance(ownerAddress, spenderAddress).call(); + console.log("💰 [checkTronTokenAllowance] TronWeb allowance result:", allowance); + + // Convert allowance to string + const allowanceString = String(allowance); + console.log("💰 [checkTronTokenAllowance] Raw allowance:", allowanceString); + + return allowanceString; + } catch (tronWebError) { + console.error("❌ [checkTronTokenAllowance] TronWeb error:", tronWebError); + console.log("🔄 [checkTronTokenAllowance] Falling back to API call..."); + + // Fallback to API call + const allowance = await callTronContract( + tokenAddress, + "allowance", + [ownerAddress, spenderAddress], + chainId + ); + + console.log("💰 [checkTronTokenAllowance] API fallback allowance:", allowance); + return allowance || "0"; + } + } else { + console.log("⚠️ [checkTronTokenAllowance] TronWeb not available, using API call"); + + // Fallback to API call + const allowance = await callTronContract( + tokenAddress, + "allowance", + [ownerAddress, spenderAddress], + chainId + ); + + console.log("💰 [checkTronTokenAllowance] API allowance:", allowance); + return allowance || "0"; + } + } catch (error) { + console.error("❌ [checkTronTokenAllowance] Error:", error); + return "0"; + } +}; + +/** + * Create and sign Tron transaction + */ +export const createTronTransaction = async ( + wallet: any, + contractAddress: string, + functionName: string, + parameters: any[] = [], + chainId: number +): Promise => { + console.log("🔍 [createTronTransaction] Starting...", { + wallet: !!wallet, + hasAdapter: !!wallet?.adapter, + contractAddress, + functionName, + parameters, + chainId + }); + + try { + if (!wallet || !wallet.adapter) { + console.error("❌ [createTronTransaction] Wallet validation failed:", { + hasWallet: !!wallet, + hasAdapter: !!wallet?.adapter + }); + throw new Error("Tron wallet not available"); + } + + const network = getTronNetwork(chainId); + console.log("🌐 [createTronTransaction] Network config:", network); + + if (!network) { + console.error("❌ [createTronTransaction] Invalid Tron network for chainId:", chainId); + throw new Error("Invalid Tron network"); + } + + // Encode function call + console.log("🔍 [createTronTransaction] Searching for function in TRC20_ABI:", functionName); + const abiFunction = TRC20_ABI.find(item => + item.type === "function" && item.name === functionName + ); + + console.log("📋 [createTronTransaction] Found ABI function:", abiFunction); + + if (!abiFunction) { + console.error("❌ [createTronTransaction] Function not found in ABI:", functionName); + throw new Error(`Function ${functionName} not found in ABI`); + } + + console.log("🔧 [createTronTransaction] Encoding function call..."); + const encodedData = encodeTronFunctionCall(abiFunction, parameters); + console.log("🔧 [createTronTransaction] Encoded data:", encodedData); + + // Create transaction + const transaction = { + contract_address: contractAddress, + function_selector: functionName, + parameter: encodedData, + owner_address: wallet.adapter.address, + fee_limit: 1000000000, + call_value: 0 + }; + + console.log("📝 [createTronTransaction] Transaction object:", transaction); + + console.log("✍️ [createTronTransaction] Signing transaction with wallet..."); + // Sign transaction with wallet + const signedTx = await wallet.adapter.signTransaction(transaction); + console.log("✍️ [createTronTransaction] Signed transaction:", signedTx); + + // Broadcast transaction + const apiUrl = `${network.rpcUrl}/wallet/broadcasttransaction`; + console.log("📡 [createTronTransaction] Broadcasting transaction to:", apiUrl); + + const response = await fetch(apiUrl, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(signedTx) + }); + + console.log("📥 [createTronTransaction] Broadcast response status:", response.status); + + if (!response.ok) { + console.error("❌ [createTronTransaction] Broadcast failed:", response.status, response.statusText); + throw new Error("Failed to broadcast transaction"); + } + + const result = await response.json(); + console.log("📊 [createTronTransaction] Broadcast result:", result); + console.log("✅ [createTronTransaction] Transaction created successfully"); + + return result; + } catch (error) { + console.error("❌ [createTronTransaction] Error:", error); + throw error; + } +}; + +/** + * Sign message with Tron wallet + */ +export const signTronMessage = async ( + wallet: any, + message: string, + chainId: number +): Promise => { + console.log("🔍 [signTronMessage] Starting...", { + wallet: !!wallet, + hasAdapter: !!wallet?.adapter, + messageLength: message.length, + chainId + }); + + try { + if (!wallet || !wallet.adapter) { + console.error("❌ [signTronMessage] Wallet validation failed:", { + hasWallet: !!wallet, + hasAdapter: !!wallet?.adapter + }); + throw new Error("Tron wallet not available"); + } + + console.log("✍️ [signTronMessage] Signing message with Tron wallet..."); + console.log("📝 [signTronMessage] Message to sign:", message); + + // Sign the message using Tron wallet + const signature = await wallet.adapter.signMessage(message); + console.log("✍️ [signTronMessage] Signature received:", signature); + + const result = { + signature: signature, + messageHash: message, // Tron doesn't use the same message hashing as EVM + }; + + console.log("✅ [signTronMessage] Final result:", result); + return result; + } catch (error) { + console.error("❌ [signTronMessage] Error:", error); + throw error; + } +}; + +/** + * Get Tron transaction info + */ +export const getTronTransactionInfo = async (txid: string, chainId: number): Promise => { + try { + const network = getTronNetwork(chainId); + if (!network) throw new Error("Invalid Tron network"); + + const response = await fetch(`${network.rpcUrl}/wallet/gettransactioninfobyid`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ value: txid }) + }); + + if (!response.ok) throw new Error("Failed to get transaction info"); + + const data = await response.json(); + return data; + } catch (error) { + console.error("Failed to get Tron transaction info:", error); + throw error; + } +}; + +/** + * Get Tron block info + */ +export const getTronBlockInfo = async (blockNumber: number, chainId: number): Promise => { + try { + const network = getTronNetwork(chainId); + if (!network) throw new Error("Invalid Tron network"); + + const response = await fetch(`${network.rpcUrl}/wallet/getblockbynum`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ num: blockNumber }) + }); + + if (!response.ok) throw new Error("Failed to get block info"); + + const data = await response.json(); + return data; + } catch (error) { + console.error("Failed to get Tron block info:", error); + throw error; + } +}; \ No newline at end of file