From 0f95a811762287fa0dec5f2d6ff5f202763bd4f0 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Thu, 5 Dec 2024 17:16:39 +0100 Subject: [PATCH 01/26] feat: add permits --- examples/node/pnpm-lock.yaml | 13 +- package.json | 2 +- pnpm-lock.yaml | 498 +++++++++++++++++- src/constants.ts | 7 +- src/core/EVM/EVM.ts | 4 - src/core/EVM/EVMStepExecutor.ts | 331 +++++++----- src/core/EVM/abi.ts | 83 ++- src/core/EVM/checkAllowance.ts | 153 +++--- src/core/EVM/getAllowance.ts | 16 +- src/core/EVM/getEVMBalance.int.spec.ts | 6 +- src/core/EVM/getEVMBalance.ts | 4 +- src/core/EVM/getNativePermit.ts | 113 ++++ src/core/EVM/multisig.ts | 54 -- src/core/EVM/parseEVMErrors.ts | 8 + src/core/EVM/permit2/allowanceTransfer.ts | 168 ++++++ src/core/EVM/permit2/constants.ts | 11 + src/core/EVM/permit2/domain.ts | 20 + src/core/EVM/permit2/signatureTransfer.ts | 214 ++++++++ src/core/EVM/setAllowance.ts | 23 +- src/core/EVM/signPermitMessage.ts | 248 +++++++++ src/core/EVM/types.ts | 28 +- src/core/EVM/utils.ts | 7 +- .../EVM/waitForBatchTransactionReceipt.ts | 49 ++ src/core/checkBalance.ts | 9 +- src/index.ts | 3 - src/utils/invariant.ts | 51 ++ tsconfig.build.json | 10 +- tsconfig.node.json | 5 +- 28 files changed, 1754 insertions(+), 384 deletions(-) create mode 100644 src/core/EVM/getNativePermit.ts delete mode 100644 src/core/EVM/multisig.ts create mode 100644 src/core/EVM/permit2/allowanceTransfer.ts create mode 100644 src/core/EVM/permit2/constants.ts create mode 100644 src/core/EVM/permit2/domain.ts create mode 100644 src/core/EVM/permit2/signatureTransfer.ts create mode 100644 src/core/EVM/signPermitMessage.ts create mode 100644 src/core/EVM/waitForBatchTransactionReceipt.ts create mode 100644 src/utils/invariant.ts diff --git a/examples/node/pnpm-lock.yaml b/examples/node/pnpm-lock.yaml index f067a633..fcc10f5f 100644 --- a/examples/node/pnpm-lock.yaml +++ b/examples/node/pnpm-lock.yaml @@ -345,6 +345,10 @@ packages: resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} engines: {node: ^14.21.3 || >=16} + '@noble/curves@1.7.0': + resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} + engines: {node: ^14.21.3 || >=16} + '@noble/hashes@1.4.0': resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} @@ -1697,11 +1701,6 @@ packages: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 - use-sync-external-store@1.2.2: - resolution: {integrity: sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - utf-8-validate@5.0.10: resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} engines: {node: '>=6.14.2'} @@ -2235,6 +2234,10 @@ snapshots: dependencies: '@noble/hashes': 1.6.0 + '@noble/curves@1.7.0': + dependencies: + '@noble/hashes': 1.6.0 + '@noble/hashes@1.4.0': {} '@noble/hashes@1.6.0': {} diff --git a/package.json b/package.json index 7d6fe785..8020cb75 100644 --- a/package.json +++ b/package.json @@ -134,5 +134,5 @@ "postbump": "node scripts/version.js && git add ." } }, - "packageManager": "pnpm@9.12.0" + "packageManager": "pnpm@9.14.2" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b5c598f2..f7da5753 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -417,6 +417,96 @@ packages: cpu: [x64] os: [win32] + '@ethersproject/abi@5.7.0': + resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} + + '@ethersproject/abstract-provider@5.7.0': + resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} + + '@ethersproject/abstract-signer@5.7.0': + resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} + + '@ethersproject/address@5.7.0': + resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} + + '@ethersproject/base64@5.7.0': + resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} + + '@ethersproject/basex@5.7.0': + resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} + + '@ethersproject/bignumber@5.7.0': + resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} + + '@ethersproject/bytes@5.7.0': + resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} + + '@ethersproject/constants@5.7.0': + resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} + + '@ethersproject/contracts@5.7.0': + resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} + + '@ethersproject/hash@5.7.0': + resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} + + '@ethersproject/hdnode@5.7.0': + resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} + + '@ethersproject/json-wallets@5.7.0': + resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} + + '@ethersproject/keccak256@5.7.0': + resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} + + '@ethersproject/logger@5.7.0': + resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} + + '@ethersproject/networks@5.7.1': + resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} + + '@ethersproject/pbkdf2@5.7.0': + resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} + + '@ethersproject/properties@5.7.0': + resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} + + '@ethersproject/providers@5.7.2': + resolution: {integrity: sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==} + + '@ethersproject/random@5.7.0': + resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} + + '@ethersproject/rlp@5.7.0': + resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} + + '@ethersproject/sha2@5.7.0': + resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} + + '@ethersproject/signing-key@5.7.0': + resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} + + '@ethersproject/solidity@5.7.0': + resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} + + '@ethersproject/strings@5.7.0': + resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} + + '@ethersproject/transactions@5.7.0': + resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} + + '@ethersproject/units@5.7.0': + resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} + + '@ethersproject/wallet@5.7.0': + resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} + + '@ethersproject/web@5.7.1': + resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} + + '@ethersproject/wordlists@5.7.0': + resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} + '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} engines: {node: '>=6.9.0'} @@ -691,6 +781,12 @@ packages: '@types/node@22.7.4': resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} + '@types/node@22.9.0': + resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} + + '@types/node@22.9.1': + resolution: {integrity: sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==} + '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -814,6 +910,9 @@ packages: add-stream@1.0.0: resolution: {integrity: sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==} + aes-js@3.0.0: + resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} + agentkeepalive@4.5.0: resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} @@ -892,6 +991,9 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + bech32@1.1.4: + resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} + bech32@2.0.0: resolution: {integrity: sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==} @@ -913,6 +1015,9 @@ packages: bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + bn.js@4.12.1: + resolution: {integrity: sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==} + bn.js@5.2.1: resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} @@ -929,6 +1034,9 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} + brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + bs58@4.0.1: resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} @@ -987,6 +1095,9 @@ packages: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} + citty@0.1.6: + resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} + cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -1058,6 +1169,10 @@ packages: resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} engines: {'0': node >= 6.0} + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + conventional-changelog-angular@5.0.13: resolution: {integrity: sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==} engines: {node: '>=10'} @@ -1294,6 +1409,9 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + elliptic@6.5.4: + resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + emoji-regex@10.4.0: resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} @@ -1372,6 +1490,9 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} + ethers@5.7.2: + resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} + eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} @@ -1556,6 +1677,9 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -1563,6 +1687,9 @@ packages: headers-polyfill@4.0.3: resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} + hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -1738,6 +1865,9 @@ packages: resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} hasBin: true + js-sha3@0.8.0: + resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1930,6 +2060,12 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -2355,6 +2491,9 @@ packages: engines: {node: '>=18'} hasBin: true + scrypt-js@3.0.1: + resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} + semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -2552,6 +2691,9 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + tiny-invariant@1.3.3: + resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -2827,6 +2969,18 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + ws@7.4.6: + resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@7.5.10: resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} engines: {node: '>=8.3.0'} @@ -3185,6 +3339,261 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true + '@ethersproject/abi@5.7.0': + dependencies: + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + + '@ethersproject/abstract-provider@5.7.0': + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.1 + '@ethersproject/properties': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/web': 5.7.1 + + '@ethersproject/abstract-signer@5.7.0': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + + '@ethersproject/address@5.7.0': + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/rlp': 5.7.0 + + '@ethersproject/base64@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + + '@ethersproject/basex@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/properties': 5.7.0 + + '@ethersproject/bignumber@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + bn.js: 5.2.1 + + '@ethersproject/bytes@5.7.0': + dependencies: + '@ethersproject/logger': 5.7.0 + + '@ethersproject/constants@5.7.0': + dependencies: + '@ethersproject/bignumber': 5.7.0 + + '@ethersproject/contracts@5.7.0': + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/transactions': 5.7.0 + + '@ethersproject/hash@5.7.0': + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + + '@ethersproject/hdnode@5.7.0': + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/wordlists': 5.7.0 + + '@ethersproject/json-wallets@5.7.0': + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + aes-js: 3.0.0 + scrypt-js: 3.0.1 + + '@ethersproject/keccak256@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + js-sha3: 0.8.0 + + '@ethersproject/logger@5.7.0': {} + + '@ethersproject/networks@5.7.1': + dependencies: + '@ethersproject/logger': 5.7.0 + + '@ethersproject/pbkdf2@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/sha2': 5.7.0 + + '@ethersproject/properties@5.7.0': + dependencies: + '@ethersproject/logger': 5.7.0 + + '@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.1 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/web': 5.7.1 + bech32: 1.1.4 + ws: 7.4.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@ethersproject/random@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + + '@ethersproject/rlp@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + + '@ethersproject/sha2@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + hash.js: 1.1.7 + + '@ethersproject/signing-key@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + bn.js: 5.2.1 + elliptic: 6.5.4 + hash.js: 1.1.7 + + '@ethersproject/solidity@5.7.0': + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/strings': 5.7.0 + + '@ethersproject/strings@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + + '@ethersproject/transactions@5.7.0': + dependencies: + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + + '@ethersproject/units@5.7.0': + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + + '@ethersproject/wallet@5.7.0': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/json-wallets': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/wordlists': 5.7.0 + + '@ethersproject/web@5.7.1': + dependencies: + '@ethersproject/base64': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + + '@ethersproject/wordlists@5.7.0': + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@hutson/parse-repository-url@3.0.2': {} '@inquirer/confirm@5.0.2(@types/node@22.10.1)': @@ -3455,6 +3864,14 @@ snapshots: dependencies: undici-types: 6.19.8 + '@types/node@22.9.0': + dependencies: + undici-types: 6.19.8 + + '@types/node@22.9.1': + dependencies: + undici-types: 6.19.8 + '@types/normalize-package-data@2.4.4': {} '@types/statuses@2.0.5': {} @@ -3607,6 +4024,8 @@ snapshots: add-stream@1.0.0: {} + aes-js@3.0.0: {} + agentkeepalive@4.5.0: dependencies: humanize-ms: 1.2.1 @@ -3668,6 +4087,8 @@ snapshots: base64-js@1.5.1: {} + bech32@1.1.4: {} + bech32@2.0.0: {} bigint-buffer@1.1.5: @@ -3701,6 +4122,8 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 + bn.js@4.12.1: {} + bn.js@5.2.1: {} borsh@0.7.0: @@ -3722,6 +4145,8 @@ snapshots: dependencies: fill-range: 7.1.1 + brorand@1.1.0: {} + bs58@4.0.1: dependencies: base-x: 3.0.10 @@ -3787,6 +4212,10 @@ snapshots: check-error@2.1.1: {} + citty@0.1.6: + dependencies: + consola: 3.2.3 + cli-cursor@3.1.0: dependencies: restore-cursor: 3.1.0 @@ -3854,6 +4283,8 @@ snapshots: readable-stream: 3.6.2 typedarray: 0.0.6 + consola@3.2.3: {} + conventional-changelog-angular@5.0.13: dependencies: compare-func: 2.0.0 @@ -4127,6 +4558,16 @@ snapshots: eastasianwidth@0.2.0: {} + elliptic@6.5.4: + dependencies: + bn.js: 4.12.1 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + emoji-regex@10.4.0: {} emoji-regex@8.0.0: {} @@ -4208,6 +4649,42 @@ snapshots: esutils@2.0.3: {} + ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/contracts': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/json-wallets': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.1 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@ethersproject/random': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/solidity': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/units': 5.7.0 + '@ethersproject/wallet': 5.7.0 + '@ethersproject/web': 5.7.1 + '@ethersproject/wordlists': 5.7.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + eventemitter3@4.0.7: {} eventemitter3@5.0.1: {} @@ -4418,12 +4895,23 @@ snapshots: has-flag@4.0.0: {} + hash.js@1.1.7: + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + hasown@2.0.2: dependencies: function-bind: 1.1.2 headers-polyfill@4.0.3: {} + hmac-drbg@1.0.1: + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + hosted-git-info@2.8.9: {} hosted-git-info@4.1.0: @@ -4573,6 +5061,8 @@ snapshots: jiti@1.21.6: {} + js-sha3@0.8.0: {} + js-tokens@4.0.0: {} js-yaml@4.1.0: @@ -4771,6 +5261,10 @@ snapshots: min-indent@1.0.1: {} + minimalistic-assert@1.0.1: {} + + minimalistic-crypto-utils@1.0.1: {} + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -5221,6 +5715,8 @@ snapshots: dependencies: commander: 12.1.0 + scrypt-js@3.0.1: {} + semver@5.7.2: {} semver@6.3.1: {} @@ -5403,7 +5899,7 @@ snapshots: through@2.3.8: {} - tinybench@2.9.0: {} + tiny-invariant@1.3.3: {} tinyexec@0.3.1: {} diff --git a/src/constants.ts b/src/constants.ts index 703a1f7d..7d2f6607 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,5 +1,10 @@ export const AddressZero = '0x0000000000000000000000000000000000000000' export const AlternativeAddressZero = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' -export const wrappedSolAddress = 'So11111111111111111111111111111111111111112' + export const SolSystemProgram = '11111111111111111111111111111111' + +export const MaxUint48 = BigInt('0xffffffffffff') +export const MaxUint160 = BigInt('0xffffffffffffffffffffffffffffffffffffffff') +export const MaxUint256 = + BigInt(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn) diff --git a/src/core/EVM/EVM.ts b/src/core/EVM/EVM.ts index 7f77dd54..e7734cf6 100644 --- a/src/core/EVM/EVM.ts +++ b/src/core/EVM/EVM.ts @@ -12,9 +12,6 @@ export function EVM(options?: EVMProviderOptions): EVMProvider { get type() { return ChainType.EVM }, - get multisig() { - return _options.multisig - }, isAddress, resolveAddress: getENSAddress, getBalance: getEVMBalance, @@ -29,7 +26,6 @@ export function EVM(options?: EVMProviderOptions): EVMProvider { const executor = new EVMStepExecutor({ client: walletClient, - multisig: _options.multisig, routeId: options.routeId, executionOptions: { ...options.executionOptions, diff --git a/src/core/EVM/EVMStepExecutor.ts b/src/core/EVM/EVMStepExecutor.ts index ce3a61b3..88877ce5 100644 --- a/src/core/EVM/EVMStepExecutor.ts +++ b/src/core/EVM/EVMStepExecutor.ts @@ -3,11 +3,20 @@ import type { FullStatusData, Process, } from '@lifi/types' -import type { Client, Hash, SendTransactionParameters } from 'viem' -import { getAddresses, sendTransaction } from 'viem/actions' +import type { + Address, + Client, + Hash, + Hex, + SendTransactionParameters, + TransactionReceipt, +} from 'viem' +import { encodeFunctionData, multicall3Abi } from 'viem' +import { estimateGas, getAddresses, sendTransaction } from 'viem/actions' +import { getCapabilities, sendCalls } from 'viem/experimental' import { config } from '../../config.js' import { LiFiErrorCode } from '../../errors/constants.js' -import { TransactionError, ValidationError } from '../../errors/errors.js' +import { TransactionError } from '../../errors/errors.js' import { getStepTransaction } from '../../services/api.js' import { getTransactionFailedMessage } from '../../utils/getTransactionMessage.js' import { isZeroAddress } from '../../utils/isZeroAddress.js' @@ -22,33 +31,44 @@ import type { } from '../types.js' import { waitForReceivingTransaction } from '../waitForReceivingTransaction.js' import { checkAllowance } from './checkAllowance.js' -import { updateMultisigRouteProcess } from './multisig.js' +import { getNativePermit } from './getNativePermit.js' import { parseEVMErrors } from './parseEVMErrors.js' +import { signPermitMessage } from './signPermitMessage.js' import { switchChain } from './switchChain.js' -import type { MultisigConfig, MultisigTransaction } from './types.js' -import { getMaxPriorityFeePerGas } from './utils.js' +import { getMaxPriorityFeePerGas, getMulticallAddress } from './utils.js' +import { + type WalletCallReceipt, + waitForBatchTransactionReceipt, +} from './waitForBatchTransactionReceipt.js' import { waitForTransactionReceipt } from './waitForTransactionReceipt.js' +export type Call = { + data?: Hex + to?: Address + value?: bigint + chainId?: number +} + +export type Aggregate3Call = { + allowFailure: boolean + callData: Hex + target: Address +} + export interface EVMStepExecutorOptions extends StepExecutorOptions { client: Client - multisig?: MultisigConfig } export class EVMStepExecutor extends BaseStepExecutor { private client: Client - private multisig?: MultisigConfig constructor(options: EVMStepExecutorOptions) { super(options) this.client = options.client - this.multisig = options.multisig } // Ensure that we are using the right chain and wallet when executing transactions. - checkClient = async ( - step: LiFiStepExtended, - process?: Process - ): Promise => { + checkClient = async (step: LiFiStepExtended, process?: Process) => { const updatedClient = await switchChain( this.client, this.statusManager, @@ -115,16 +135,23 @@ export class EVMStepExecutor extends BaseStepExecutor { } } - const isMultisigClient = !!this.multisig?.isMultisigWalletClient - const multisigBatchTransactions: MultisigTransaction[] = [] - - const shouldBatchTransactions = - this.multisig?.shouldBatchTransactions && - !!this.multisig.sendBatchTransaction - const fromChain = await config.getChainById(step.action.fromChainId) const toChain = await config.getChainById(step.action.toChainId) + const multicallAddress = await getMulticallAddress(fromChain.id) + const multicallSupported = !!multicallAddress + + let atomicBatchSupported = false + try { + const capabilities = await getCapabilities(this.client) + atomicBatchSupported = capabilities[fromChain.id]?.atomicBatch?.supported + } catch { + // If the wallet does not support getCapabilities, we assume that atomic batch is not supported + } + + const calls: Call[] = [] + const multicallCalls: Aggregate3Call[] = [] + const isBridgeExecution = fromChain.id !== toChain.id const currentProcessType = isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP' @@ -133,13 +160,39 @@ export class EVMStepExecutor extends BaseStepExecutor { (p) => p.type === currentProcessType ) - // Check token approval only if fromToken is not the native token => no approval needed in that case + // Check if token requires approval + // Native tokens (like ETH) don't need approval since they're not ERC20 tokens + // We should support different permit types: + // 1. Native permits (EIP-2612) + // 2. Permit2 - Universal permit implementation by Uniswap (limited to certain chains) + // 3. Standard ERC20 approval + const nativePermit = await getNativePermit( + this.client, + fromChain, + step.action.fromToken.address as Address + ) + // Check if proxy contract is available and token supports native permits, not available for atomic batch + const nativePermitSupported = + !!fromChain.permit2Proxy && + nativePermit.supported && + !atomicBatchSupported + // Check if chain has Permit2 contract deployed, not available for atomic batch + const permit2Supported = + !!fromChain.permit2 && !!fromChain.permit2Proxy && !atomicBatchSupported + // Token supports either native permits or Permit2 + const permitSupported = permit2Supported || nativePermitSupported + + // We need to check allowance only if: + // 1. No existing transaction is pending + // 2. Token is not native (address is not zero) + // 3. Token doesn't support native permits (we'll use permit instead of approve) const checkForAllowance = !existingProcess?.txHash && !isZeroAddress(step.action.fromToken.address) && - (shouldBatchTransactions || !isMultisigClient) - + !nativePermitSupported + // TODO: wait for existing approval tx hash? if (checkForAllowance) { + // Check if token needs approval and get approval transaction data if atomic batch is supported const data = await checkAllowance( this.client, fromChain, @@ -147,17 +200,26 @@ export class EVMStepExecutor extends BaseStepExecutor { this.statusManager, this.executionOptions, this.allowUserInteraction, - shouldBatchTransactions + atomicBatchSupported || multicallSupported, + permit2Supported ) if (data) { - // allowance doesn't need value - const baseTransaction: MultisigTransaction = { - to: step.action.fromToken.address, - data, + // Create approval transaction call + // No value needed since we're only approving ERC20 tokens + if (multicallSupported) { + multicallCalls.push({ + target: step.action.fromToken.address as Address, + callData: data, + allowFailure: true, + }) + } else if (atomicBatchSupported) { + calls.push({ + chainId: step.action.fromToken.chainId, + to: step.action.fromToken.address as Address, + data, + }) } - - multisigBatchTransactions.push(baseTransaction) } } @@ -169,28 +231,7 @@ export class EVMStepExecutor extends BaseStepExecutor { }) if (process.status !== 'DONE') { - const multisigProcess = step.execution.process.find( - (p) => !!p.multisigTxHash - ) - try { - if (isMultisigClient && multisigProcess) { - const multisigTxHash = multisigProcess.multisigTxHash as Hash - if (!multisigTxHash) { - throw new ValidationError( - 'Multisig internal transaction hash is undefined.' - ) - } - await updateMultisigRouteProcess( - multisigTxHash, - step, - process.type, - fromChain, - this.statusManager, - this.multisig - ) - } - let txHash: Hash if (process.txHash) { // Make sure that the chain is still correct @@ -211,7 +252,7 @@ export class EVMStepExecutor extends BaseStepExecutor { // Check balance await checkBalance(this.client.account!.address, step) - // Create new transaction + // Create new transaction request if (!step.transactionRequest) { const { execution, ...stepBase } = step const updatedStep = await getStepTransaction(stepBase) @@ -235,23 +276,6 @@ export class EVMStepExecutor extends BaseStepExecutor { ) } - // STEP 3: Send the transaction - // Make sure that the chain is still correct - const updatedClient = await this.checkClient(step, process) - if (!updatedClient) { - return step - } - - process = this.statusManager.updateProcess( - step, - process.type, - 'ACTION_REQUIRED' - ) - - if (!this.allowUserInteraction) { - return step - } - let transactionRequest: TransactionParameters = { to: step.transactionRequest.to, from: step.transactionRequest.from, @@ -289,25 +313,82 @@ export class EVMStepExecutor extends BaseStepExecutor { } } - if (shouldBatchTransactions && this.multisig?.sendBatchTransaction) { - if (transactionRequest.to && transactionRequest.data) { - const populatedTransaction: MultisigTransaction = { - value: transactionRequest.value, - to: transactionRequest.to, - data: transactionRequest.data, - } - multisigBatchTransactions.push(populatedTransaction) + // STEP 3: Send the transaction + // Make sure that the chain is still correct + const updatedClient = await this.checkClient(step, process) + if (!updatedClient) { + return step + } - txHash = await this.multisig?.sendBatchTransaction( - multisigBatchTransactions - ) - } else { - throw new TransactionError( - LiFiErrorCode.TransactionUnprepared, - 'Unable to prepare transaction.' - ) + process = this.statusManager.updateProcess( + step, + process.type, + 'ACTION_REQUIRED' + ) + + if (!this.allowUserInteraction) { + return step + } + + if (atomicBatchSupported) { + const transferCall: Call = { + chainId: fromChain.id, + data: transactionRequest.data as Hex, + to: transactionRequest.to as Address, + value: transactionRequest.value, } + + calls.push(transferCall) + + txHash = (await sendCalls(this.client, { + account: this.client.account!, + calls, + })) as Address } else { + if (permitSupported) { + const { data } = await signPermitMessage( + this.client, + transactionRequest, + fromChain, + step.action.fromToken.address as Address, + BigInt(step.action.fromAmount), + nativePermit, + multicallSupported + ) + + multicallCalls.push({ + target: fromChain.permit2Proxy as Address, + callData: data, + allowFailure: true, + }) + + const multicallData = encodeFunctionData({ + abi: multicall3Abi, + functionName: 'aggregate3', + args: [multicallCalls], + }) + + // Update transaction request to call permit2 proxy + transactionRequest.to = multicallAddress + transactionRequest.data = multicallData + + // transactionRequest.to = fromChain.permit2Proxy + // transactionRequest.data = data + + try { + // Try to re-estimate the gas due to additional Permit data + transactionRequest.gas = await estimateGas(this.client, { + account: this.client.account!, + to: transactionRequest.to as Address, + data: transactionRequest.data as Hex, + value: transactionRequest.value, + }) + } catch { + // Let the wallet estimate the gas in case of failure + transactionRequest.gas = undefined + } + } + txHash = await sendTransaction(this.client, { to: transactionRequest.to, account: this.client.account!, @@ -317,62 +398,53 @@ export class EVMStepExecutor extends BaseStepExecutor { gasPrice: transactionRequest.gasPrice, maxFeePerGas: transactionRequest.maxFeePerGas, maxPriorityFeePerGas: transactionRequest.maxPriorityFeePerGas, - chain: null, } as SendTransactionParameters) } // STEP 4: Wait for the transaction - if (isMultisigClient) { - process = this.statusManager.updateProcess( - step, - process.type, - 'ACTION_REQUIRED', - { - multisigTxHash: txHash, - } - ) - } else { - process = this.statusManager.updateProcess( - step, - process.type, - 'PENDING', - { - txHash: txHash, - txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${txHash}`, - } - ) - } + process = this.statusManager.updateProcess( + step, + process.type, + 'PENDING', + // When atomic batch is supported, txHash represents the batch hash rather than an individual transaction hash at this point + atomicBatchSupported + ? { + atomicBatchSupported, + } + : { + txHash: txHash, + txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${txHash}`, + } + ) } - const transactionReceipt = await waitForTransactionReceipt({ - client: this.client, - chainId: fromChain.id, - txHash, - onReplaced: (response) => { - this.statusManager.updateProcess(step, process.type, 'PENDING', { - txHash: response.transaction.hash, - txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${response.transaction.hash}`, - }) - }, - }) + let transactionReceipt: + | TransactionReceipt + | WalletCallReceipt + | undefined - // if it's multisig wallet client and the process is in ACTION_REQUIRED - // then signatures are still needed - if (isMultisigClient && process.status === 'ACTION_REQUIRED') { - await updateMultisigRouteProcess( - transactionReceipt?.transactionHash || txHash, - step, - process.type, - fromChain, - this.statusManager, - this.multisig + if (atomicBatchSupported) { + transactionReceipt = await waitForBatchTransactionReceipt( + this.client, + txHash ) + } else { + transactionReceipt = await waitForTransactionReceipt({ + client: this.client, + chainId: fromChain.id, + txHash, + onReplaced: (response) => { + this.statusManager.updateProcess(step, process.type, 'PENDING', { + txHash: response.transaction.hash, + txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${response.transaction.hash}`, + }) + }, + }) } // Update pending process if the transaction hash from the receipt is different. // This might happen if the transaction was replaced. if ( - !isMultisigClient && transactionReceipt?.transactionHash && transactionReceipt.transactionHash !== txHash ) { @@ -419,13 +491,12 @@ export class EVMStepExecutor extends BaseStepExecutor { chainId: toChain.id, }) } - let statusResponse: FullStatusData try { if (!processTxHash) { throw new Error('Transaction hash is undefined.') } - statusResponse = (await waitForReceivingTransaction( + const statusResponse = (await waitForReceivingTransaction( processTxHash, this.statusManager, process.type, diff --git a/src/core/EVM/abi.ts b/src/core/EVM/abi.ts index 840ae040..2a747eb9 100644 --- a/src/core/EVM/abi.ts +++ b/src/core/EVM/abi.ts @@ -1,47 +1,44 @@ -import type { Abi } from 'viem' +import { parseAbi } from 'viem' -export const approveAbi: Abi = [ - { - name: 'approve', - inputs: [ - { internalType: 'address', name: 'spender', type: 'address' }, - { internalType: 'uint256', name: 'amount', type: 'uint256' }, - ], - outputs: [{ internalType: 'bool', name: 'approved', type: 'bool' }], - stateMutability: 'nonpayable', - type: 'function', - }, -] +export const permit2ProxyAbi = parseAbi([ + 'function callDiamondWithPermit2(bytes, ((address, uint256), uint256, uint256), bytes) external', + 'function callDiamondWithEIP2612Signature(address, uint256, uint256, uint8, bytes32, bytes32, bytes) external payable', + 'function nextNonce(address) external view returns (uint256)', + 'function callDiamondWithPermit2Witness(bytes, address, ((address, uint256), uint256, uint256), bytes) external payable', +]) -export const allowanceAbi: Abi = [ - { - name: 'allowance', - inputs: [ - { internalType: 'address', name: 'owner', type: 'address' }, - { internalType: 'address', name: 'spender', type: 'address' }, - ], - outputs: [{ internalType: 'uint256', name: 'allowance', type: 'uint256' }], - stateMutability: 'view', - type: 'function', - }, -] +export const eip2612Abi = parseAbi([ + 'function permit(address, address, uint256, uint256, uint8, bytes32, bytes32) external', + 'function DOMAIN_SEPARATOR() external view returns (bytes32)', + 'function nonces(address) external view returns (uint256)', + 'function name() external view returns (string)', + 'function version() external view returns (string)', +]) -export const getEthBalanceAbi: Abi = [ - { - inputs: [{ name: '_owner', type: 'address' }], - name: 'getEthBalance', - outputs: [{ name: 'balance', type: 'uint256' }], - type: 'function', - stateMutability: 'view', - }, -] +export const approveAbi = parseAbi([ + 'function approve(address, uint256) external returns (bool)', +]) -export const balanceOfAbi: Abi = [ - { - inputs: [{ name: '_owner', type: 'address' }], - name: 'balanceOf', - outputs: [{ name: 'balance', type: 'uint256' }], - type: 'function', - stateMutability: 'view', - }, -] +export const allowanceAbi = parseAbi([ + 'function allowance(address, address) external view returns (uint256)', +]) + +export const getEthBalanceAbi = parseAbi([ + 'function getEthBalance(address) external view returns (uint256)', +]) + +export const balanceOfAbi = parseAbi([ + 'function balanceOf(address) external view returns (uint256)', +]) + +// EIP-2612 types +// https://eips.ethereum.org/EIPS/eip-2612 +export const eip2612Types = { + Permit: [ + { name: 'owner', type: 'address' }, + { name: 'spender', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'nonce', type: 'uint256' }, + { name: 'deadline', type: 'uint256' }, + ], +} as const diff --git a/src/core/EVM/checkAllowance.ts b/src/core/EVM/checkAllowance.ts index b1d4b665..ddd47dc1 100644 --- a/src/core/EVM/checkAllowance.ts +++ b/src/core/EVM/checkAllowance.ts @@ -1,5 +1,6 @@ -import type { Chain, LiFiStep, Process, ProcessType } from '@lifi/types' +import type { ExtendedChain, LiFiStep, Process, ProcessType } from '@lifi/types' import type { Address, Client, Hash } from 'viem' +import { MaxUint256 } from '../../constants.js' import type { StatusManager } from '../StatusManager.js' import type { ExecutionOptions } from '../types.js' import { getAllowance } from './getAllowance.js' @@ -9,106 +10,92 @@ import { waitForTransactionReceipt } from './waitForTransactionReceipt.js' export const checkAllowance = async ( client: Client, - chain: Chain, + chain: ExtendedChain, step: LiFiStep, statusManager: StatusManager, settings?: ExecutionOptions, allowUserInteraction = false, - shouldBatchTransactions = false + atomicBatchSupported = false, + permit2Supported = false ): Promise => { - // Ask the user to set an allowance - let allowanceProcess: Process = statusManager.findOrCreateProcess({ + // Find existing or create new allowance process + const allowanceProcess: Process = statusManager.findOrCreateProcess({ step, type: 'TOKEN_ALLOWANCE', chainId: step.action.fromChainId, }) - // Check allowance try { + // Handle existing pending transaction if (allowanceProcess.txHash && allowanceProcess.status !== 'DONE') { await waitForApprovalTransaction( client, - allowanceProcess.txHash! as Address, + allowanceProcess.txHash as Address, allowanceProcess.type, step, chain, statusManager ) - } else { - allowanceProcess = statusManager.updateProcess( - step, - allowanceProcess.type, - 'STARTED' - ) + return + } - const approved = await getAllowance( - chain.id, - step.action.fromToken.address, - client.account!.address, - step.estimate.approvalAddress - ) + // Start new allowance check + statusManager.updateProcess(step, allowanceProcess.type, 'STARTED') - const fromAmount = BigInt(step.action.fromAmount) + const spenderAddress = permit2Supported + ? chain.permit2 + : step.estimate.approvalAddress + const fromAmount = BigInt(step.action.fromAmount) - if (fromAmount > approved) { - if (!allowUserInteraction) { - return - } + const approved = await getAllowance( + chain.id, + step.action.fromToken.address as Address, + client.account!.address, + spenderAddress as Address + ) - if (shouldBatchTransactions) { - const approveTxHash = await setAllowance( - client, - step.action.fromToken.address, - step.estimate.approvalAddress, - fromAmount, - settings, - true - ) + // Return early if already approved + if (fromAmount <= approved) { + statusManager.updateProcess(step, allowanceProcess.type, 'DONE') + return + } - allowanceProcess = statusManager.updateProcess( - step, - allowanceProcess.type, - 'DONE' - ) + if (!allowUserInteraction) { + return + } - return approveTxHash - } + // Set new allowance + const approveAmount = permit2Supported ? MaxUint256 : fromAmount + const approveTxHash = await setAllowance( + client, + step.action.fromToken.address as Address, + spenderAddress as Address, + approveAmount, + settings, + atomicBatchSupported + ) - const approveTxHash = await setAllowance( - client, - step.action.fromToken.address, - step.estimate.approvalAddress, - fromAmount - ) - await waitForApprovalTransaction( - client, - approveTxHash, - allowanceProcess.type, - step, - chain, - statusManager - ) - } else { - allowanceProcess = statusManager.updateProcess( - step, - allowanceProcess.type, - 'DONE' - ) - } + if (atomicBatchSupported) { + statusManager.updateProcess(step, allowanceProcess.type, 'DONE') + return approveTxHash } - } catch (e: any) { - const error = await parseEVMErrors(e, step, allowanceProcess) - allowanceProcess = statusManager.updateProcess( - step, + + await waitForApprovalTransaction( + client, + approveTxHash, allowanceProcess.type, - 'FAILED', - { - error: { - message: error.cause.message, - code: error.code, - }, - } + step, + chain, + statusManager ) + } catch (e: any) { + const error = await parseEVMErrors(e, step, allowanceProcess) + statusManager.updateProcess(step, allowanceProcess.type, 'FAILED', { + error: { + message: error.cause.message, + code: error.code, + }, + }) statusManager.updateExecution(step, 'FAILED') throw error } @@ -119,29 +106,33 @@ const waitForApprovalTransaction = async ( txHash: Hash, processType: ProcessType, step: LiFiStep, - chain: Chain, + chain: ExtendedChain, statusManager: StatusManager ) => { + const baseExplorerUrl = chain.metamask.blockExplorerUrls[0] + const getTxLink = (hash: Hash) => `${baseExplorerUrl}tx/${hash}` + statusManager.updateProcess(step, processType, 'PENDING', { txHash, - txLink: `${chain.metamask.blockExplorerUrls[0]}tx/${txHash}`, + txLink: getTxLink(txHash), }) const transactionReceipt = await waitForTransactionReceipt({ - client: client, + client, chainId: chain.id, - txHash: txHash, + txHash, onReplaced(response) { + const newHash = response.transaction.hash statusManager.updateProcess(step, processType, 'PENDING', { - txHash: response.transaction.hash, - txLink: `${chain.metamask.blockExplorerUrls[0]}tx/${response.transaction.hash}`, + txHash: newHash, + txLink: getTxLink(newHash), }) }, }) - const transactionHash = transactionReceipt?.transactionHash || txHash + const finalHash = transactionReceipt?.transactionHash || txHash statusManager.updateProcess(step, processType, 'DONE', { - txHash: transactionHash, - txLink: `${chain.metamask.blockExplorerUrls[0]}tx/${transactionHash}`, + txHash: finalHash, + txLink: getTxLink(finalHash), }) } diff --git a/src/core/EVM/getAllowance.ts b/src/core/EVM/getAllowance.ts index 630267d4..c0e2a7f7 100644 --- a/src/core/EVM/getAllowance.ts +++ b/src/core/EVM/getAllowance.ts @@ -13,9 +13,9 @@ import { getMulticallAddress } from './utils.js' export const getAllowance = async ( chainId: ChainId, - tokenAddress: string, - ownerAddress: string, - spenderAddress: string + tokenAddress: Address, + ownerAddress: Address, + spenderAddress: Address ): Promise => { const client = await getPublicClient(chainId) try { @@ -34,7 +34,7 @@ export const getAllowance = async ( export const getAllowanceMulticall = async ( chainId: ChainId, tokens: TokenSpender[], - ownerAddress: string + ownerAddress: Address ): Promise => { if (!tokens.length) { return [] @@ -80,8 +80,8 @@ export const getAllowanceMulticall = async ( */ export const getTokenAllowance = async ( token: BaseToken, - ownerAddress: string, - spenderAddress: string + ownerAddress: Address, + spenderAddress: Address ): Promise => { // native token don't need approval if (isNativeTokenAddress(token.address)) { @@ -90,7 +90,7 @@ export const getTokenAllowance = async ( const approved = await getAllowance( token.chainId, - token.address, + token.address as Address, ownerAddress, spenderAddress ) @@ -104,7 +104,7 @@ export const getTokenAllowance = async ( * @returns Returns array of tokens and their allowance */ export const getTokenAllowanceMulticall = async ( - ownerAddress: string, + ownerAddress: Address, tokens: TokenSpender[] ): Promise => { // filter out native tokens diff --git a/src/core/EVM/getEVMBalance.int.spec.ts b/src/core/EVM/getEVMBalance.int.spec.ts index 67e44585..b7fb31f2 100644 --- a/src/core/EVM/getEVMBalance.int.spec.ts +++ b/src/core/EVM/getEVMBalance.int.spec.ts @@ -1,5 +1,6 @@ import type { StaticToken, Token } from '@lifi/types' import { ChainId, CoinKey } from '@lifi/types' +import type { Address } from 'viem' import { beforeAll, describe, expect, it } from 'vitest' import { setupTestEnvironment } from '../../../tests/setup.js' import { findDefaultToken } from '../../../tests/tokens.js' @@ -18,7 +19,10 @@ describe('getBalances integration tests', () => { walletAddress: string, tokens: StaticToken[] ) => { - const tokenBalances = await getEVMBalance(walletAddress, tokens as Token[]) + const tokenBalances = await getEVMBalance( + walletAddress as Address, + tokens as Token[] + ) expect(tokenBalances.length).toEqual(tokens.length) diff --git a/src/core/EVM/getEVMBalance.ts b/src/core/EVM/getEVMBalance.ts index 14799664..b1caf64f 100644 --- a/src/core/EVM/getEVMBalance.ts +++ b/src/core/EVM/getEVMBalance.ts @@ -12,7 +12,7 @@ import { getPublicClient } from './publicClient.js' import { getMulticallAddress } from './utils.js' export const getEVMBalance = async ( - walletAddress: string, + walletAddress: Address, tokens: Token[] ): Promise => { if (tokens.length === 0) { @@ -85,7 +85,7 @@ const getEVMBalanceMulticall = async ( const getEVMBalanceDefault = async ( chainId: ChainId, tokens: Token[], - walletAddress: string + walletAddress: Address ): Promise => { const client = await getPublicClient(chainId) const blockNumber = await getBlockNumber(client) diff --git a/src/core/EVM/getNativePermit.ts b/src/core/EVM/getNativePermit.ts new file mode 100644 index 00000000..52b68731 --- /dev/null +++ b/src/core/EVM/getNativePermit.ts @@ -0,0 +1,113 @@ +import type { ExtendedChain } from '@lifi/types' +import type { Address, Client } from 'viem' +import { multicall, readContract } from 'viem/actions' +import { eip2612Abi } from './abi.js' +import { getMulticallAddress } from './utils.js' + +export type NativePermitData = { + name: string + version: string + nonce: bigint + supported: boolean +} +/** + * Retrieves native permit data (EIP-2612) for a token on a specific chain + * @link https://eips.ethereum.org/EIPS/eip-2612 + * @param client - The Viem client instance + * @param chain - The extended chain object containing chain details + * @param tokenAddress - The address of the token to check for permit support + * @returns {Promise} Object containing permit data including name, version, nonce and support status + */ +export const getNativePermit = async ( + client: Client, + chain: ExtendedChain, + tokenAddress: Address +): Promise => { + try { + const multicallAddress = await getMulticallAddress(chain.id) + + if (multicallAddress) { + const [nameResult, domainSeparatorResult, noncesResult, versionResult] = + await multicall(client, { + contracts: [ + { + address: tokenAddress, + abi: eip2612Abi, + functionName: 'name', + }, + { + address: tokenAddress, + abi: eip2612Abi, + functionName: 'DOMAIN_SEPARATOR', + }, + { + address: tokenAddress, + abi: eip2612Abi, + functionName: 'nonces', + args: [client.account!.address], + }, + { + address: tokenAddress, + abi: eip2612Abi, + functionName: 'version', + }, + ], + multicallAddress, + }) + + const supported = + nameResult.status === 'success' && + domainSeparatorResult.status === 'success' && + noncesResult.status === 'success' && + !!nameResult.result && + !!domainSeparatorResult.result && + noncesResult.result !== undefined + + return { + name: nameResult.result!, + version: versionResult.result ?? '1', + nonce: noncesResult.result!, + supported, + } + } + + // Fallback to individual calls + const [name, domainSeparator, nonce, version] = await Promise.all([ + readContract(client, { + address: tokenAddress, + abi: eip2612Abi, + functionName: 'name', + }), + readContract(client, { + address: tokenAddress, + abi: eip2612Abi, + functionName: 'DOMAIN_SEPARATOR', + }), + readContract(client, { + address: tokenAddress, + abi: eip2612Abi, + functionName: 'nonces', + args: [client.account!.address], + }), + readContract(client, { + address: tokenAddress, + abi: eip2612Abi, + functionName: 'version', + }), + ]) + + return { + name, + version: version ?? '1', + nonce, + supported: !!name && !!domainSeparator && nonce !== undefined, + } + } catch { + return { + name: '', + version: '1', + nonce: 0n, + supported: false, + } + } +} diff --git a/src/core/EVM/multisig.ts b/src/core/EVM/multisig.ts deleted file mode 100644 index a4a895c1..00000000 --- a/src/core/EVM/multisig.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { ExtendedChain, LiFiStep, ProcessType } from '@lifi/types' -import type { Hash } from 'viem' -import { LiFiErrorCode } from '../../errors/constants.js' -import { TransactionError } from '../../errors/errors.js' -import type { StatusManager } from '../StatusManager.js' -import type { MultisigConfig, MultisigTxDetails } from './types.js' - -export const updateMultisigRouteProcess = async ( - internalTxHash: Hash, - step: LiFiStep, - processType: ProcessType, - fromChain: ExtendedChain, - statusManager: StatusManager, - multisig?: MultisigConfig -) => { - if (!multisig?.getMultisigTransactionDetails) { - throw new Error( - 'getMultisigTransactionDetails is missing in multisig config.' - ) - } - - const updateIntermediateMultisigStatus = () => { - statusManager.updateProcess(step, processType, 'PENDING') - } - - const multisigStatusResponse: MultisigTxDetails = - await multisig?.getMultisigTransactionDetails( - internalTxHash, - fromChain.id, - updateIntermediateMultisigStatus - ) - - if (multisigStatusResponse.status === 'DONE') { - statusManager.updateProcess(step, processType, 'PENDING', { - txHash: multisigStatusResponse.txHash, - multisigTxHash: undefined, - txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${multisigStatusResponse.txHash}`, - }) - } - - if (multisigStatusResponse.status === 'FAILED') { - throw new TransactionError( - LiFiErrorCode.TransactionFailed, - 'Multisig transaction failed.' - ) - } - - if (multisigStatusResponse.status === 'CANCELLED') { - throw new TransactionError( - LiFiErrorCode.SignatureRejected, - 'Transaction was rejected by user.' - ) - } -} diff --git a/src/core/EVM/parseEVMErrors.ts b/src/core/EVM/parseEVMErrors.ts index 093e7a05..cd5a2d81 100644 --- a/src/core/EVM/parseEVMErrors.ts +++ b/src/core/EVM/parseEVMErrors.ts @@ -29,6 +29,14 @@ const handleSpecificErrors = async ( if (e.cause?.name === 'UserRejectedRequestError') { return new TransactionError(LiFiErrorCode.SignatureRejected, e.message, e) } + // Safe Wallet via WalletConnect returns -32000 code when user rejects the signature + // { + // code: -32000, + // message: 'User rejected transaction', + // } + if (e.cause?.code === -32000) { + return new TransactionError(LiFiErrorCode.SignatureRejected, e.message, e) + } if ( step && diff --git a/src/core/EVM/permit2/allowanceTransfer.ts b/src/core/EVM/permit2/allowanceTransfer.ts new file mode 100644 index 00000000..aa05419b --- /dev/null +++ b/src/core/EVM/permit2/allowanceTransfer.ts @@ -0,0 +1,168 @@ +import { + type Address, + type TypedData, + type TypedDataDomain, + hashTypedData, +} from 'viem' +import { MaxUint48, MaxUint160 } from '../../../constants.js' +import { invariant } from '../../../utils/invariant.js' +import { MaxSigDeadline } from './constants.js' +import { permit2Domain } from './domain.js' + +export const MaxAllowanceTransferAmount = MaxUint160 +export const MaxAllowanceExpiration = MaxUint48 +export const MaxOrderedNonce = MaxUint48 + +export interface PermitDetails { + token: Address + amount: bigint + expiration: number + nonce: number +} + +export interface PermitSingle { + details: PermitDetails + spender: Address + sigDeadline: bigint +} + +export interface PermitBatch { + details: PermitDetails[] + spender: Address + sigDeadline: bigint +} + +export type PermitSingleData = { + domain: TypedDataDomain + types: TypedData + values: PermitSingle +} + +export type PermitBatchData = { + domain: TypedDataDomain + types: TypedData + values: PermitBatch +} + +const PERMIT_DETAILS = [ + { name: 'token', type: 'address' }, + { name: 'amount', type: 'uint160' }, + { name: 'expiration', type: 'uint48' }, + { name: 'nonce', type: 'uint48' }, +] as const + +const PERMIT_TYPES = { + PermitDetails: PERMIT_DETAILS, + PermitSingle: [ + { name: 'details', type: 'PermitDetails' }, + { name: 'spender', type: 'address' }, + { name: 'sigDeadline', type: 'uint256' }, + ], +} as const + +const PERMIT_BATCH_TYPES = { + PermitDetails: PERMIT_DETAILS, + PermitBatch: [ + { name: 'details', type: 'PermitDetails[]' }, + { name: 'spender', type: 'address' }, + { name: 'sigDeadline', type: 'uint256' }, + ], +} as const + +function isPermit(permit: PermitSingle | PermitBatch): permit is PermitSingle { + return !Array.isArray(permit.details) +} + +export function getPermitSingleData( + permit: PermitSingle, + permit2Address: Address, + chainId: number +) { + invariant(MaxSigDeadline >= permit.sigDeadline, 'SIG_DEADLINE_OUT_OF_RANGE') + + const domain = permit2Domain(permit2Address, chainId) + validatePermitDetails(permit.details) + + return { + domain, + values: permit, + } +} + +export function getPermitBatchData( + permit: PermitBatch, + permit2Address: Address, + chainId: number +) { + invariant(MaxSigDeadline >= permit.sigDeadline, 'SIG_DEADLINE_OUT_OF_RANGE') + + const domain = permit2Domain(permit2Address, chainId) + permit.details.forEach(validatePermitDetails) + + return { + domain, + values: permit, + } +} + +export function getPermitData( + permit: PermitSingle | PermitBatch, + permit2Address: Address, + chainId: number +): PermitSingleData | PermitBatchData { + invariant(MaxSigDeadline >= permit.sigDeadline, 'SIG_DEADLINE_OUT_OF_RANGE') + + const domain = permit2Domain(permit2Address, chainId) + if (isPermit(permit)) { + validatePermitDetails(permit.details) + return { + domain, + types: PERMIT_TYPES, + values: permit, + } + } + permit.details.forEach(validatePermitDetails) + return { + domain, + types: PERMIT_BATCH_TYPES, + values: permit, + } +} + +export function hash( + permit: PermitSingle | PermitBatch, + permit2Address: Address, + chainId: number +): string { + if (isPermit(permit)) { + const { domain, values } = getPermitSingleData( + permit, + permit2Address, + chainId + ) + + return hashTypedData({ + domain, + types: PERMIT_TYPES, + primaryType: 'PermitSingle', + message: values, + }) + } + const { domain, values } = getPermitBatchData(permit, permit2Address, chainId) + + return hashTypedData({ + domain, + types: PERMIT_BATCH_TYPES, + primaryType: 'PermitBatch', + message: values, + }) +} + +function validatePermitDetails(details: PermitDetails) { + invariant(MaxOrderedNonce >= details.nonce, 'NONCE_OUT_OF_RANGE') + invariant(MaxAllowanceTransferAmount >= details.amount, 'AMOUNT_OUT_OF_RANGE') + invariant( + MaxAllowanceExpiration >= details.expiration, + 'EXPIRATION_OUT_OF_RANGE' + ) +} diff --git a/src/core/EVM/permit2/constants.ts b/src/core/EVM/permit2/constants.ts new file mode 100644 index 00000000..9fe607b9 --- /dev/null +++ b/src/core/EVM/permit2/constants.ts @@ -0,0 +1,11 @@ +import { MaxUint48, MaxUint160, MaxUint256 } from '../../../constants.js' + +export const MaxAllowanceTransferAmount = MaxUint160 +export const MaxAllowanceExpiration = MaxUint48 +export const MaxOrderedNonce = MaxUint48 + +export const MaxSignatureTransferAmount = MaxUint256 +export const MaxUnorderedNonce = MaxUint256 +export const MaxSigDeadline = MaxUint256 + +export const InstantExpiration = 0n diff --git a/src/core/EVM/permit2/domain.ts b/src/core/EVM/permit2/domain.ts new file mode 100644 index 00000000..941583cb --- /dev/null +++ b/src/core/EVM/permit2/domain.ts @@ -0,0 +1,20 @@ +import type { Address, TypedData, TypedDataDomain } from 'viem' + +const PERMIT2_DOMAIN_NAME = 'Permit2' + +export function permit2Domain( + permit2Address: Address, + chainId: number +): TypedDataDomain { + return { + name: PERMIT2_DOMAIN_NAME, + chainId, + verifyingContract: permit2Address, + } +} + +export type PermitData = { + domain: TypedDataDomain + types: TypedData + values: any +} diff --git a/src/core/EVM/permit2/signatureTransfer.ts b/src/core/EVM/permit2/signatureTransfer.ts new file mode 100644 index 00000000..8de84464 --- /dev/null +++ b/src/core/EVM/permit2/signatureTransfer.ts @@ -0,0 +1,214 @@ +import { hashTypedData } from 'viem' +import type { Address, TypedData, TypedDataDomain } from 'viem' +import { invariant } from '../../../utils/invariant.js' +import { + MaxSigDeadline, + MaxSignatureTransferAmount, + MaxUnorderedNonce, +} from './constants.js' +import { permit2Domain } from './domain.js' + +export interface Witness { + witness: any + witnessTypeName: string + witnessType: { [key: string]: { name: string; type: string }[] } +} + +export interface TokenPermissions { + token: Address + amount: bigint +} + +export interface PermitTransferFrom { + permitted: TokenPermissions + spender: Address + nonce: bigint + deadline: bigint +} + +export interface PermitBatchTransferFrom { + permitted: TokenPermissions[] + spender: Address + nonce: bigint + deadline: bigint +} + +export type PermitTransferFromData = { + domain: TypedDataDomain + types: TypedData + values: PermitTransferFrom +} + +export type PermitBatchTransferFromData = { + domain: TypedDataDomain + types: TypedData + values: PermitBatchTransferFrom +} + +const TOKEN_PERMISSIONS = [ + { name: 'token', type: 'address' }, + { name: 'amount', type: 'uint256' }, +] as const + +const PERMIT_TRANSFER_FROM_TYPES = { + TokenPermissions: TOKEN_PERMISSIONS, + PermitTransferFrom: [ + { name: 'permitted', type: 'TokenPermissions' }, + { name: 'spender', type: 'address' }, + { name: 'nonce', type: 'uint256' }, + { name: 'deadline', type: 'uint256' }, + ], +} as const + +const PERMIT_BATCH_TRANSFER_FROM_TYPES = { + TokenPermissions: TOKEN_PERMISSIONS, + PermitBatchTransferFrom: [ + { name: 'permitted', type: 'TokenPermissions[]' }, + { name: 'spender', type: 'address' }, + { name: 'nonce', type: 'uint256' }, + { name: 'deadline', type: 'uint256' }, + ], +} as const + +function isPermitTransferFrom( + permit: PermitTransferFrom | PermitBatchTransferFrom +): permit is PermitTransferFrom { + return !Array.isArray(permit.permitted) +} + +export function getPermitTransferData( + permit: PermitTransferFrom, + permit2Address: Address, + chainId: number, + witness?: Witness +): PermitTransferFromData { + invariant(MaxSigDeadline >= permit.deadline, 'SIG_DEADLINE_OUT_OF_RANGE') + invariant(MaxUnorderedNonce >= permit.nonce, 'NONCE_OUT_OF_RANGE') + + const domain = permit2Domain(permit2Address, chainId) + + validateTokenPermissions(permit.permitted) + + const types = witness + ? ({ + TokenPermissions: TOKEN_PERMISSIONS, + ...witness.witnessType, + PermitWitnessTransferFrom: [ + { name: 'permitted', type: 'TokenPermissions' }, + { name: 'spender', type: 'address' }, + { name: 'nonce', type: 'uint256' }, + { name: 'deadline', type: 'uint256' }, + { name: 'witness', type: witness.witnessTypeName }, + ], + } as const) + : PERMIT_TRANSFER_FROM_TYPES + + const values = witness + ? Object.assign(permit, { witness: witness.witness }) + : permit + + return { + domain, + types, + values, + } +} + +export function getPermitBatchTransferData( + permit: PermitBatchTransferFrom, + permit2Address: Address, + chainId: number, + witness?: Witness +): PermitBatchTransferFromData { + invariant(MaxSigDeadline >= permit.deadline, 'SIG_DEADLINE_OUT_OF_RANGE') + invariant(MaxUnorderedNonce >= permit.nonce, 'NONCE_OUT_OF_RANGE') + + const domain = permit2Domain(permit2Address, chainId) + + permit.permitted.forEach(validateTokenPermissions) + + const types = witness + ? { + ...witness.witnessType, + TokenPermissions: TOKEN_PERMISSIONS, + PermitBatchWitnessTransferFrom: [ + { name: 'permitted', type: 'TokenPermissions[]' }, + { name: 'spender', type: 'address' }, + { name: 'nonce', type: 'uint256' }, + { name: 'deadline', type: 'uint256' }, + { name: 'witness', type: witness.witnessTypeName }, + ], + } + : PERMIT_BATCH_TRANSFER_FROM_TYPES + + const values = witness + ? Object.assign(permit, { witness: witness.witness }) + : permit + + return { + domain, + types, + values, + } +} + +// return the data to be sent in a eth_signTypedData RPC call +// for signing the given permit data +export function getPermitData( + permit: PermitTransferFrom | PermitBatchTransferFrom, + permit2Address: Address, + chainId: number, + witness?: Witness +): PermitTransferFromData | PermitBatchTransferFromData { + if (isPermitTransferFrom(permit)) { + return getPermitTransferData(permit, permit2Address, chainId, witness) + } + return getPermitBatchTransferData(permit, permit2Address, chainId, witness) +} + +export function hash( + permit: PermitTransferFrom | PermitBatchTransferFrom, + permit2Address: Address, + chainId: number, + witness?: Witness +) { + if (isPermitTransferFrom(permit)) { + const { domain, types, values } = getPermitTransferData( + permit, + permit2Address, + chainId, + witness + ) + + return hashTypedData({ + domain, + types, + primaryType: witness ? 'PermitWitnessTransferFrom' : 'PermitTransferFrom', + message: { + ...values, + }, + }) + } + const { domain, types, values } = getPermitBatchTransferData( + permit, + permit2Address, + chainId, + witness + ) + + return hashTypedData({ + domain, + types, + primaryType: witness + ? 'PermitBatchWitnessTransferFrom' + : 'PermitBatchTransferFrom', + message: { ...values }, + }) +} + +function validateTokenPermissions(permissions: TokenPermissions) { + invariant( + MaxSignatureTransferAmount >= permissions.amount, + 'AMOUNT_OUT_OF_RANGE' + ) +} diff --git a/src/core/EVM/setAllowance.ts b/src/core/EVM/setAllowance.ts index e0a3ce7d..12870cb6 100644 --- a/src/core/EVM/setAllowance.ts +++ b/src/core/EVM/setAllowance.ts @@ -1,4 +1,4 @@ -import type { Client, Hash, SendTransactionParameters } from 'viem' +import type { Address, Client, Hash, SendTransactionParameters } from 'viem' import { encodeFunctionData } from 'viem' import { sendTransaction } from 'viem/actions' import { isNativeTokenAddress } from '../../utils/isZeroAddress.js' @@ -10,8 +10,8 @@ import { getMaxPriorityFeePerGas } from './utils.js' export const setAllowance = async ( client: Client, - tokenAddress: string, - contractAddress: string, + tokenAddress: Address, + contractAddress: Address, amount: bigint, settings?: ExecutionOptions, returnPopulatedTransaction?: boolean @@ -56,7 +56,6 @@ export const setAllowance = async ( gasPrice: transactionRequest.gasPrice, maxFeePerGas: transactionRequest.maxFeePerGas, maxPriorityFeePerGas: transactionRequest.maxPriorityFeePerGas, - chain: null, } as SendTransactionParameters) } @@ -81,16 +80,16 @@ export const setTokenAllowance = async ({ } const approvedAmount = await getAllowance( token.chainId, - token.address, + token.address as Address, walletClient.account!.address, - spenderAddress + spenderAddress as Address ) if (amount > approvedAmount) { const approveTx = await setAllowance( walletClient, - token.address, - spenderAddress, + token.address as Address, + spenderAddress as Address, amount ) @@ -117,15 +116,15 @@ export const revokeTokenApproval = async ({ } const approvedAmount = await getAllowance( token.chainId, - token.address, + token.address as Address, walletClient.account!.address, - spenderAddress + spenderAddress as Address ) if (approvedAmount > 0) { const approveTx = await setAllowance( walletClient, - token.address, - spenderAddress, + token.address as Address, + spenderAddress as Address, 0n ) diff --git a/src/core/EVM/signPermitMessage.ts b/src/core/EVM/signPermitMessage.ts new file mode 100644 index 00000000..1d381fbd --- /dev/null +++ b/src/core/EVM/signPermitMessage.ts @@ -0,0 +1,248 @@ +import type { ExtendedChain } from '@lifi/types' +import type { Client, Hex } from 'viem' +import { encodeFunctionData } from 'viem' +import { parseSignature } from 'viem' +import type { Address } from 'viem' +import { keccak256 } from 'viem' +import { readContract, signTypedData } from 'viem/actions' +import type { TransactionParameters } from '../types.js' +import { eip2612Types, permit2ProxyAbi } from './abi.js' +import { type NativePermitData, getNativePermit } from './getNativePermit.js' +import { + type PermitTransferFrom, + getPermitData, +} from './permit2/signatureTransfer.js' + +export const signNativePermitMessage = async ( + client: Client, + transactionRequest: TransactionParameters, + chain: ExtendedChain, + tokenAddress: Address, + amount: bigint, + nativePermit: NativePermitData +) => { + const deadline = BigInt(Math.floor(Date.now() / 1000) + 30 * 60) // 30 minutes + + const domain = { + name: nativePermit.name, + version: nativePermit.version, + chainId: chain.id, + verifyingContract: tokenAddress, + } + + const message = { + owner: client.account!.address, + spender: chain.permit2Proxy as Address, + value: amount, + nonce: nativePermit.nonce, + deadline, + } + + const signature = await signTypedData(client, { + account: client.account!, + domain, + types: eip2612Types, + primaryType: 'Permit', + message, + }) + + const { v, r, s } = parseSignature(signature) + + const data = encodeFunctionData({ + abi: permit2ProxyAbi, + functionName: 'callDiamondWithEIP2612Signature', + args: [ + tokenAddress, + amount, + deadline, + Number(v), + r, + s, + transactionRequest.data as Hex, + ], + }) + + return { + signature, + data, + } +} + +export const signPermit2Message = async ( + client: Client, + transactionRequest: TransactionParameters, + chain: ExtendedChain, + tokenAddress: Address, + amount: bigint +) => { + const nonce = await readContract(client, { + address: chain.permit2Proxy as Address, + abi: permit2ProxyAbi, + functionName: 'nextNonce', + args: [client.account!.address], + }) + + const permitTransferFrom: PermitTransferFrom = { + permitted: { + token: tokenAddress, + amount: amount, + }, + spender: chain.permit2Proxy as Address, + nonce: nonce, + deadline: BigInt(Math.floor(Date.now() / 1000) + 30 * 60), // 30 minutes + } + + const { domain, types, values } = getPermitData( + permitTransferFrom, + chain.permit2 as Address, + chain.id + ) + + const signature = await signTypedData(client, { + account: client.account!, + primaryType: 'PermitTransferFrom', + domain, + types, + message: { ...values }, + }) + + const data = encodeFunctionData({ + abi: permit2ProxyAbi, + functionName: 'callDiamondWithPermit2', + args: [ + transactionRequest.data as Hex, + [ + [tokenAddress, amount], + permitTransferFrom.nonce, + permitTransferFrom.deadline, + ], + signature as Hex, + ], + }) + + return { + signature, + data, + } +} + +export const signPermit2WitnessMessage = async ( + client: Client, + transactionRequest: TransactionParameters, + chain: ExtendedChain, + tokenAddress: Address, + amount: bigint +) => { + const nonce = await readContract(client, { + address: chain.permit2Proxy as Address, + abi: permit2ProxyAbi, + functionName: 'nextNonce', + args: [client.account!.address], + }) + + const permitTransferFrom: PermitTransferFrom = { + permitted: { + token: tokenAddress, + amount: amount, + }, + spender: chain.permit2Proxy as Address, + nonce: nonce, + deadline: BigInt(Math.floor(Date.now() / 1000) + 30 * 60), // 30 minutes + } + + // Create witness data for the LIFI call + const witness = { + witness: { + tokenReceiver: chain.permit2Proxy as Address, + diamondAddress: chain.diamondAddress as Address, + diamondCalldataHash: keccak256(transactionRequest.data as Hex), + }, + witnessTypeName: 'LiFiCall', + witnessType: { + LiFiCall: [ + { name: 'diamondAddress', type: 'address' }, + { name: 'diamondCalldataHash', type: 'bytes32' }, + ], + }, + } + + const { domain, types, values } = getPermitData( + permitTransferFrom, + chain.permit2 as Address, + chain.id, + witness + ) + + const signature = await signTypedData(client, { + account: client.account!, + primaryType: 'PermitWitnessTransferFrom', + domain, + types, + message: { ...values }, + }) + + const data = encodeFunctionData({ + abi: permit2ProxyAbi, + functionName: 'callDiamondWithPermit2Witness', + args: [ + transactionRequest.data as Hex, + client.account!.address, + [ + [tokenAddress, amount], + permitTransferFrom.nonce, + permitTransferFrom.deadline, + ], + signature as Hex, + ], + }) + + return { + signature, + data, + } +} + +export const signPermitMessage = async ( + client: Client, + transactionRequest: TransactionParameters, + chain: ExtendedChain, + tokenAddress: Address, + amount: bigint, + nativePermit?: NativePermitData, + useWitness = false +) => { + let _nativePermit = nativePermit + + if (!_nativePermit) { + _nativePermit = await getNativePermit(client, chain, tokenAddress) + } + + if (_nativePermit.supported) { + return signNativePermitMessage( + client, + transactionRequest, + chain, + tokenAddress, + amount, + _nativePermit + ) + } + + if (useWitness) { + return signPermit2WitnessMessage( + client, + transactionRequest, + chain, + tokenAddress, + amount + ) + } + + return signPermit2Message( + client, + transactionRequest, + chain, + tokenAddress, + amount + ) +} diff --git a/src/core/EVM/types.ts b/src/core/EVM/types.ts index 7451450e..8a769e9c 100644 --- a/src/core/EVM/types.ts +++ b/src/core/EVM/types.ts @@ -1,17 +1,15 @@ import { type BaseToken, ChainType } from '@lifi/types' -import type { Client, Hash } from 'viem' +import type { Client } from 'viem' import type { SwitchChainHook } from '../types.js' import type { SDKProvider } from '../types.js' export interface EVMProviderOptions { getWalletClient?: () => Promise switchChain?: SwitchChainHook - multisig?: MultisigConfig } export interface EVMProvider extends SDKProvider { setOptions(options: EVMProviderOptions): void - multisig?: MultisigConfig } export function isEVM(provider: SDKProvider): provider is EVMProvider { @@ -50,27 +48,3 @@ export interface RevokeApprovalRequest { token: BaseToken spenderAddress: string } - -export interface MultisigTxDetails { - status: 'DONE' | 'FAILED' | 'PENDING' | 'CANCELLED' - txHash?: Hash -} - -export interface MultisigTransaction { - to: string - value?: bigint - data: string -} - -export interface MultisigConfig { - isMultisigWalletClient: boolean - getMultisigTransactionDetails: ( - txHash: Hash, - fromChainId: number, - updateIntermediateStatus?: () => void - ) => Promise - sendBatchTransaction?: ( - batchTransactions: MultisigTransaction[] - ) => Promise - shouldBatchTransactions?: boolean -} diff --git a/src/core/EVM/utils.ts b/src/core/EVM/utils.ts index 5761dcd5..17b3964d 100644 --- a/src/core/EVM/utils.ts +++ b/src/core/EVM/utils.ts @@ -1,5 +1,5 @@ import type { ChainId } from '@lifi/types' -import type { Client, Transaction } from 'viem' +import type { Address, Client, Transaction } from 'viem' import { getBlock } from 'viem/actions' import { config } from '../../config.js' import { median } from '../../utils/median.js' @@ -37,9 +37,10 @@ export const getMaxPriorityFeePerGas = async ( // Multicall export const getMulticallAddress = async ( chainId: ChainId -): Promise => { +): Promise
=> { const chains = await config.getChains() - return chains.find((chain) => chain.id === chainId)?.multicallAddress + return chains.find((chain) => chain.id === chainId) + ?.multicallAddress as Address } // Modified viem retryDelay exponential backoff function. diff --git a/src/core/EVM/waitForBatchTransactionReceipt.ts b/src/core/EVM/waitForBatchTransactionReceipt.ts new file mode 100644 index 00000000..057f13ed --- /dev/null +++ b/src/core/EVM/waitForBatchTransactionReceipt.ts @@ -0,0 +1,49 @@ +import type { + Client, + Hash, + WalletCallReceipt as _WalletCallReceipt, +} from 'viem' +import { getCallsStatus } from 'viem/experimental' +import { LiFiErrorCode } from '../../errors/constants.js' +import { TransactionError } from '../../errors/errors.js' +import { waitForResult } from '../../utils/waitForResult.js' + +export type WalletCallReceipt = _WalletCallReceipt< + bigint, + 'success' | 'reverted' +> + +export const waitForBatchTransactionReceipt = async ( + client: Client, + batchHash: Hash +): Promise => { + return waitForResult(async () => { + const callsDetails = await getCallsStatus(client, { + id: batchHash, + }) + + if (callsDetails.status === 'PENDING') { + return undefined + } + + if (callsDetails.status === 'CONFIRMED') { + if ( + !callsDetails.receipts?.length || + !callsDetails.receipts.every((receipt) => receipt.transactionHash) || + callsDetails.receipts.some((receipt) => receipt.status === 'reverted') + ) { + throw new TransactionError( + LiFiErrorCode.TransactionFailed, + 'Transaction was reverted.' + ) + } + const transactionReceipt = callsDetails.receipts.at(-1)! + return transactionReceipt + } + + throw new TransactionError( + LiFiErrorCode.TransactionFailed, + 'Transaction not found.' + ) + }, 3000) +} diff --git a/src/core/checkBalance.ts b/src/core/checkBalance.ts index b1e48d18..4cf813b5 100644 --- a/src/core/checkBalance.ts +++ b/src/core/checkBalance.ts @@ -28,13 +28,16 @@ export const checkBalance = async ( } else { const neeeded = formatUnits(neededBalance, token.decimals) const current = formatUnits(currentBalance, token.decimals) - let _errorMessage = `Your ${token.symbol} balance is too low, you try to transfer ${neeeded} ${token.symbol}, but your wallet only holds ${current} ${token.symbol}. No funds have been sent.` + let errorMessage = `Your ${token.symbol} balance is too low, you try to transfer ${neeeded} ${token.symbol}, but your wallet only holds ${current} ${token.symbol}. No funds have been sent.` if (currentBalance !== 0n) { - _errorMessage += `If the problem consists, please delete this transfer and start a new one with a maximum of ${current} ${token.symbol}.` + errorMessage += `If the problem consists, please delete this transfer and start a new one with a maximum of ${current} ${token.symbol}.` } - throw new BalanceError('The balance is too low.') + throw new BalanceError( + 'The balance is too low.', + new Error(errorMessage) + ) } } } diff --git a/src/index.ts b/src/index.ts index 3294e6f0..8369bbbe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,9 +15,6 @@ export { isEVM } from './core/EVM/types.js' export type { EVMProvider, EVMProviderOptions, - MultisigConfig, - MultisigTransaction, - MultisigTxDetails, } from './core/EVM/types.js' export { StatusManager } from './core/StatusManager.js' export { diff --git a/src/utils/invariant.ts b/src/utils/invariant.ts new file mode 100644 index 00000000..a66ed496 --- /dev/null +++ b/src/utils/invariant.ts @@ -0,0 +1,51 @@ +// https://github.com/alexreardon/tiny-invariant + +const isProduction: boolean = process.env.NODE_ENV === 'production' +const prefix: string = 'Invariant failed' + +/** + * `invariant` is used to [assert](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions) that the `condition` is [truthy](https://github.com/getify/You-Dont-Know-JS/blob/bdbe570600d4e1107d0b131787903ca1c9ec8140/up%20%26%20going/ch2.md#truthy--falsy). + * + * 💥 `invariant` will `throw` an `Error` if the `condition` is [falsey](https://github.com/getify/You-Dont-Know-JS/blob/bdbe570600d4e1107d0b131787903ca1c9ec8140/up%20%26%20going/ch2.md#truthy--falsy) + * + * 🤏 `message`s are not displayed in production environments to help keep bundles small + * + * @example + * + * ```ts + * const value: Person | null = { name: 'Alex' }; + * invariant(value, 'Expected value to be a person'); + * // type of `value`` has been narrowed to `Person` + * ``` + */ +export function invariant( + condition: any, + // Not providing an inline default argument for message as the result is smaller + /** + * Can provide a string, or a function that returns a string for cases where + * the message takes a fair amount of effort to compute + */ + message?: string | (() => string) +): asserts condition { + if (condition) { + return + } + // Condition not passed + + // In production we strip the message but still throw + if (isProduction) { + throw new Error(prefix) + } + + // When not in production we allow the message to pass through + // *This block will be removed in production builds* + + const provided: string | undefined = + typeof message === 'function' ? message() : message + + // Options: + // 1. message provided: `${prefix}: ${provided}` + // 2. message not provided: prefix + const value: string = provided ? `${prefix}: ${provided}` : prefix + throw new Error(value) +} diff --git a/tsconfig.build.json b/tsconfig.build.json index 322f5a0e..8f739efb 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -2,10 +2,16 @@ // This file is used to compile the for cjs and esm (see package.json build scripts). It should exclude all test files. "extends": "./tsconfig.base.json", "include": ["src"], - "exclude": ["tests", "./src/**/*.spec.ts", "./src/**/*.mock.ts", "./src/**/*.handlers.ts"], + "exclude": [ + "tests", + "./src/**/*.spec.ts", + "./src/**/*.mock.ts", + "./src/**/*.handlers.ts" + ], "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.build.tsbuildinfo", "moduleResolution": "node", "sourceMap": true, - "rootDir": "./src", + "rootDir": "./src" } } diff --git a/tsconfig.node.json b/tsconfig.node.json index ccf42994..b75a6e1c 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -1,9 +1,8 @@ { // This configuration is used for local development and type checking of configuration and script files that are not part of the build. - "include": [ - "vitest.config.ts" - ], + "include": ["vitest.config.ts"], "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", "strict": true, "composite": true, "module": "ESNext", From 04c28715567665bfbbf43220d7ca8b1d80bff8ab Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 10 Dec 2024 11:00:50 +0100 Subject: [PATCH 02/26] fix: allowance adjustments --- examples/node/package.json | 4 +- examples/node/pnpm-lock.yaml | 75 ++-- package.json | 6 +- pnpm-lock.yaml | 550 ++---------------------------- src/core/EVM/EVMStepExecutor.ts | 84 ++--- src/core/EVM/checkAllowance.ts | 31 +- src/core/EVM/setAllowance.ts | 6 +- src/core/EVM/signPermitMessage.ts | 2 +- 8 files changed, 133 insertions(+), 625 deletions(-) diff --git a/examples/node/package.json b/examples/node/package.json index 30402a4e..b7f7b168 100644 --- a/examples/node/package.json +++ b/examples/node/package.json @@ -7,8 +7,8 @@ "author": "LI.FI ", "license": "MIT", "dependencies": { - "@lifi/data-types": "^5.15.5", - "@lifi/sdk": "^3.4.1", + "@lifi/data-types": "^5.16.0", + "@lifi/sdk": "^3.4.2", "@wagmi/connectors": "^5.5.3", "@wagmi/core": "^2.15.2", "dotenv": "^16.4.7", diff --git a/examples/node/pnpm-lock.yaml b/examples/node/pnpm-lock.yaml index fcc10f5f..cc410ad2 100644 --- a/examples/node/pnpm-lock.yaml +++ b/examples/node/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: dependencies: '@lifi/data-types': - specifier: ^5.15.5 - version: 5.15.5 + specifier: ^5.16.0 + version: 5.16.0 '@lifi/sdk': - specifier: ^3.4.1 - version: 3.4.1(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)) + specifier: ^3.4.2 + version: 3.4.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) '@wagmi/connectors': specifier: ^5.5.3 version: 5.5.3(@wagmi/core@2.15.2(typescript@5.7.2)(use-sync-external-store@1.2.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)))(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)) @@ -46,8 +46,8 @@ packages: resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} - '@bigmi/core@0.0.4': - resolution: {integrity: sha512-PtLwVOtKXeFNm9mk3gcoo5YmmUSSGxZFjBSX7Wh+5ubRlPAq40D8VqngO0R3/gnFflopQJ4y+igPOz+0J2cQ3A==} + '@bigmi/core@0.0.5': + resolution: {integrity: sha512-6SdkB/8AKx3VEqcJngJo3WEN7RsqQmJLBvcIRFLw52ejpWIO4Y4PCqysGQ0SdWZ/bFc955g1ZRqMXzcudxbufw==} peerDependencies: viem: ^2.21.0 @@ -223,16 +223,16 @@ packages: resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} engines: {node: '>=14'} - '@lifi/data-types@5.15.5': - resolution: {integrity: sha512-nMlXxVZTClaMNS1fty6BV7E+gyKFnOgYAIMQ1kAJLv97TdLWBwQxUVDWPI5zJKKIT/Y14PJ7H6ONx+5Gq0kRGw==} + '@lifi/data-types@5.16.0': + resolution: {integrity: sha512-xwrGmZndFssr50KLckdk8ntew8HWpa+JVN6iQ31xP54E5a1+arhRak5KAw2n7r4CrypMU+Ei8NHRI7lQgJ69CQ==} - '@lifi/sdk@3.4.1': - resolution: {integrity: sha512-8jctwg+EYj4AFhfLCQbkz9TUwE+8AZtWxfCTSgzl2FBWwgPBgnK4l0OWZ7HejZSt5BXtxtytk2JAphhHtvtCag==} + '@lifi/sdk@3.4.2': + resolution: {integrity: sha512-CJW+GX0BE+nEN0ZRNPySoWdElgcQYxYOCa8OcPqyPOt4oUTiADElaSzMuIEhOG7D8g6ucz1wtM8sQnWUNpF7ZQ==} peerDependencies: viem: ^2.16.0 - '@lifi/types@16.3.1': - resolution: {integrity: sha512-5mA+opWGt3YwmxjkppQ5chkyfyZKJrK4CH1wvLD9DlYrLBA3zq89jpCffaGqtA6rmsnMYaUbRUPxFFmd6rTfYw==} + '@lifi/types@16.4.0': + resolution: {integrity: sha512-eZKDEXQ6LHYqMXxeQHEspPcB//74P1nYUmz+QNJe5Rh2LTus8lC1y4nZnMLVe5243vXgO/ggcXDEzCmgV3dhDw==} '@lit-labs/ssr-dom-shim@1.2.1': resolution: {integrity: sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==} @@ -345,10 +345,6 @@ packages: resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} engines: {node: ^14.21.3 || >=16} - '@noble/curves@1.7.0': - resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} - engines: {node: ^14.21.3 || >=16} - '@noble/hashes@1.4.0': resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} @@ -888,6 +884,15 @@ packages: supports-color: optional: true + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decamelize@1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} @@ -1866,7 +1871,7 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 - '@bigmi/core@0.0.4(typescript@5.7.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5))': + '@bigmi/core@0.0.5(typescript@5.7.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: '@noble/hashes': 1.6.1 bech32: 2.0.0 @@ -1993,18 +1998,18 @@ snapshots: ethereum-cryptography: 2.2.1 micro-ftch: 0.3.1 - '@lifi/data-types@5.15.5': + '@lifi/data-types@5.16.0': dependencies: - '@lifi/types': 16.3.1 + '@lifi/types': 16.4.0 - '@lifi/sdk@3.4.1(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5))': + '@lifi/sdk@3.4.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: - '@bigmi/core': 0.0.4(typescript@5.7.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)) - '@lifi/types': 16.3.1 + '@bigmi/core': 0.0.5(typescript@5.7.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) + '@lifi/types': 16.4.0 '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 - '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@6.0.5)) - '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@6.0.5) + '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.2) bs58: 6.0.0 @@ -2015,7 +2020,7 @@ snapshots: - typescript - utf-8-validate - '@lifi/types@16.3.1': {} + '@lifi/types@16.4.0': {} '@lit-labs/ssr-dom-shim@1.2.1': {} @@ -2145,7 +2150,7 @@ snapshots: dependencies: '@ethereumjs/tx': 4.2.0 '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.4.0 semver: 7.6.3 superstruct: 1.0.4 transitivePeerDependencies: @@ -2234,10 +2239,6 @@ snapshots: dependencies: '@noble/hashes': 1.6.0 - '@noble/curves@1.7.0': - dependencies: - '@noble/hashes': 1.6.0 - '@noble/hashes@1.4.0': {} '@noble/hashes@1.6.0': {} @@ -2365,10 +2366,10 @@ snapshots: dependencies: buffer: 6.0.3 - '@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@6.0.5))': + '@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))': dependencies: '@solana/wallet-standard-features': 1.2.0 - '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@6.0.5) + '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@wallet-standard/base': 1.1.0 '@wallet-standard/features': 1.1.0 eventemitter3: 4.0.7 @@ -2378,7 +2379,7 @@ snapshots: '@wallet-standard/base': 1.1.0 '@wallet-standard/features': 1.1.0 - '@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@6.0.5)': + '@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 '@noble/curves': 1.7.0 @@ -2391,7 +2392,7 @@ snapshots: bs58: 4.0.1 buffer: 6.0.3 fast-stable-stringify: 1.0.0 - jayson: 4.1.3(bufferutil@4.0.8)(utf-8-validate@6.0.5) + jayson: 4.1.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) node-fetch: 2.7.0 rpc-websockets: 9.0.4 superstruct: 2.0.2 @@ -3077,6 +3078,10 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.4.0: + dependencies: + ms: 2.1.3 + decamelize@1.2.0: {} decode-uri-component@0.2.2: {} @@ -3420,7 +3425,7 @@ snapshots: dependencies: ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) - jayson@4.1.3(bufferutil@4.0.8)(utf-8-validate@6.0.5): + jayson@4.1.3(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@types/connect': 3.4.38 '@types/node': 12.20.55 diff --git a/package.json b/package.json index 8020cb75..a27b3886 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ }, "dependencies": { "@bigmi/core": "^0.0.5", - "@lifi/types": "^16.3.1", + "@lifi/types": "^16.4.1", "@noble/curves": "^1.7.0", "@noble/hashes": "^1.6.1", "@solana/wallet-adapter-base": "^0.9.23", @@ -114,7 +114,7 @@ "husky": "^9.1.7", "lint-staged": "^15.2.10", "madge": "^8.0.0", - "msw": "^2.6.6", + "msw": "^2.6.8", "pinst": "^3.0.0", "standard-version": "^9.5.0", "ts-node": "^10.9.2", @@ -134,5 +134,5 @@ "postbump": "node scripts/version.js && git add ." } }, - "packageManager": "pnpm@9.14.2" + "packageManager": "pnpm@9.15.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f7da5753..fe22d118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,10 +10,10 @@ importers: dependencies: '@bigmi/core': specifier: ^0.0.5 - version: 0.0.5(bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2))(bs58@6.0.0)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)) + version: 0.0.5(bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2))(bs58@6.0.0)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) '@lifi/types': - specifier: ^16.3.1 - version: 16.3.1 + specifier: ^16.4.1 + version: 16.4.1 '@noble/curves': specifier: ^1.7.0 version: 1.7.0 @@ -56,7 +56,7 @@ importers: version: 8.5.13 '@vitest/coverage-v8': specifier: ^2.1.8 - version: 2.1.8(vitest@2.1.8(@types/node@22.10.1)(msw@2.6.6(@types/node@22.10.1)(typescript@5.7.2))) + version: 2.1.8(vitest@2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2))) fs-extra: specifier: ^11.2.0 version: 11.2.0 @@ -70,8 +70,8 @@ importers: specifier: ^8.0.0 version: 8.0.0(typescript@5.7.2) msw: - specifier: ^2.6.6 - version: 2.6.6(@types/node@22.10.1)(typescript@5.7.2) + specifier: ^2.6.8 + version: 2.6.8(@types/node@22.9.1)(typescript@5.7.2) pinst: specifier: ^3.0.0 version: 3.0.0 @@ -86,7 +86,7 @@ importers: version: 5.7.2 vitest: specifier: ^2.1.8 - version: 2.1.8(@types/node@22.10.1)(msw@2.6.6(@types/node@22.10.1)(typescript@5.7.2)) + version: 2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2)) packages: @@ -417,108 +417,18 @@ packages: cpu: [x64] os: [win32] - '@ethersproject/abi@5.7.0': - resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} - - '@ethersproject/abstract-provider@5.7.0': - resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} - - '@ethersproject/abstract-signer@5.7.0': - resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} - - '@ethersproject/address@5.7.0': - resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} - - '@ethersproject/base64@5.7.0': - resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} - - '@ethersproject/basex@5.7.0': - resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} - - '@ethersproject/bignumber@5.7.0': - resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} - - '@ethersproject/bytes@5.7.0': - resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} - - '@ethersproject/constants@5.7.0': - resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} - - '@ethersproject/contracts@5.7.0': - resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} - - '@ethersproject/hash@5.7.0': - resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} - - '@ethersproject/hdnode@5.7.0': - resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} - - '@ethersproject/json-wallets@5.7.0': - resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} - - '@ethersproject/keccak256@5.7.0': - resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} - - '@ethersproject/logger@5.7.0': - resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} - - '@ethersproject/networks@5.7.1': - resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} - - '@ethersproject/pbkdf2@5.7.0': - resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} - - '@ethersproject/properties@5.7.0': - resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} - - '@ethersproject/providers@5.7.2': - resolution: {integrity: sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==} - - '@ethersproject/random@5.7.0': - resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} - - '@ethersproject/rlp@5.7.0': - resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} - - '@ethersproject/sha2@5.7.0': - resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} - - '@ethersproject/signing-key@5.7.0': - resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} - - '@ethersproject/solidity@5.7.0': - resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} - - '@ethersproject/strings@5.7.0': - resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} - - '@ethersproject/transactions@5.7.0': - resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} - - '@ethersproject/units@5.7.0': - resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} - - '@ethersproject/wallet@5.7.0': - resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} - - '@ethersproject/web@5.7.1': - resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} - - '@ethersproject/wordlists@5.7.0': - resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} - '@hutson/parse-repository-url@3.0.2': resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} engines: {node: '>=6.9.0'} - '@inquirer/confirm@5.0.2': - resolution: {integrity: sha512-KJLUHOaKnNCYzwVbryj3TNBxyZIrr56fR5N45v6K9IPrbT6B7DcudBMfylkV1A8PUdJE15mybkEQyp2/ZUpxUA==} + '@inquirer/confirm@5.1.0': + resolution: {integrity: sha512-osaBbIMEqVFjTX5exoqPXs6PilWQdjaLhGtMDXMXg/yxkHXNq43GlxGyTA35lK2HpzUgDN+Cjh/2AmqCN0QJpw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' - '@inquirer/core@10.1.0': - resolution: {integrity: sha512-I+ETk2AL+yAVbvuKx5AJpQmoaWhpiTFOg/UJb7ZkMAK4blmtG8ATh5ct+T/8xNld0CZG/2UhtkdMwpgvld92XQ==} + '@inquirer/core@10.1.1': + resolution: {integrity: sha512-rmZVXy9iZvO3ZStEe/ayuuwIJ23LSF13aPMlLMTQARX6lGUBDHGV8UB5i9MRrfy0+mZwt5/9bdy8llszSD3NQA==} engines: {node: '>=18'} '@inquirer/figures@1.0.8': @@ -560,8 +470,8 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@lifi/types@16.3.1': - resolution: {integrity: sha512-5mA+opWGt3YwmxjkppQ5chkyfyZKJrK4CH1wvLD9DlYrLBA3zq89jpCffaGqtA6rmsnMYaUbRUPxFFmd6rTfYw==} + '@lifi/types@16.4.1': + resolution: {integrity: sha512-iSqT7KDNk8O4iFO1PjY8InqDXTLUQv77KyUiiN5aLTbik4YwrXKaKxZI0cz6Wxx94WJkfEjFgmyTbfN1hgHHwA==} '@mswjs/interceptors@0.37.3': resolution: {integrity: sha512-USvgCL/uOGFtVa6SVyRrC8kIAedzRohxIXN5LISlg5C5vLZCn7dgMFVSNhSF9cuBEFrm/O2spDWEZeMnw4ZXYg==} @@ -910,9 +820,6 @@ packages: add-stream@1.0.0: resolution: {integrity: sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==} - aes-js@3.0.0: - resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} - agentkeepalive@4.5.0: resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} @@ -991,9 +898,6 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - bech32@1.1.4: - resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} - bech32@2.0.0: resolution: {integrity: sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==} @@ -1015,9 +919,6 @@ packages: bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - bn.js@4.12.1: - resolution: {integrity: sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==} - bn.js@5.2.1: resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} @@ -1034,9 +935,6 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - brorand@1.1.0: - resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} - bs58@4.0.1: resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} @@ -1095,9 +993,6 @@ packages: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} - citty@0.1.6: - resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} - cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -1169,10 +1064,6 @@ packages: resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} engines: {'0': node >= 6.0} - consola@3.2.3: - resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} - engines: {node: ^14.18.0 || >=16.10.0} - conventional-changelog-angular@5.0.13: resolution: {integrity: sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==} engines: {node: '>=10'} @@ -1409,9 +1300,6 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - elliptic@6.5.4: - resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} - emoji-regex@10.4.0: resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} @@ -1490,9 +1378,6 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - ethers@5.7.2: - resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} - eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} @@ -1677,9 +1562,6 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - hash.js@1.1.7: - resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} - hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -1687,9 +1569,6 @@ packages: headers-polyfill@4.0.3: resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} - hmac-drbg@1.0.1: - resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} - hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -1865,9 +1744,6 @@ packages: resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} hasBin: true - js-sha3@0.8.0: - resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} - js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -2060,12 +1936,6 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} - minimalistic-assert@1.0.1: - resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - - minimalistic-crypto-utils@1.0.1: - resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} - minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -2101,8 +1971,8 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - msw@2.6.6: - resolution: {integrity: sha512-npfIIVRHKQX3Lw4aLWX4wBh+lQwpqdZNyJYB5K/+ktK8NhtkdsTxGK7WDrgknozcVyRI7TOqY6yBS9j2FTR+YQ==} + msw@2.6.8: + resolution: {integrity: sha512-nxXxnH6WALZ9a7rsQp4HU2AaD4iGAiouMmE/MY4al7pXTibgA6OZOuKhmN2WBIM6w9qMKwRtX8p2iOb45B2M/Q==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -2491,9 +2361,6 @@ packages: engines: {node: '>=18'} hasBin: true - scrypt-js@3.0.1: - resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} - semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -2691,9 +2558,6 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - tiny-invariant@1.3.3: - resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} - tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -2969,18 +2833,6 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@7.4.6: - resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==} - engines: {node: '>=8.3.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - ws@7.5.10: resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} engines: {node: '>=8.3.0'} @@ -3095,7 +2947,7 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@bigmi/core@0.0.5(bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2))(bs58@6.0.0)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5))': + '@bigmi/core@0.0.5(bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2))(bs58@6.0.0)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: '@noble/hashes': 1.6.1 bech32: 2.0.0 @@ -3339,270 +3191,15 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true - '@ethersproject/abi@5.7.0': - dependencies: - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - - '@ethersproject/abstract-provider@5.7.0': - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/properties': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/web': 5.7.1 - - '@ethersproject/abstract-signer@5.7.0': - dependencies: - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - - '@ethersproject/address@5.7.0': - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/rlp': 5.7.0 - - '@ethersproject/base64@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - - '@ethersproject/basex@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/properties': 5.7.0 - - '@ethersproject/bignumber@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - bn.js: 5.2.1 - - '@ethersproject/bytes@5.7.0': - dependencies: - '@ethersproject/logger': 5.7.0 - - '@ethersproject/constants@5.7.0': - dependencies: - '@ethersproject/bignumber': 5.7.0 - - '@ethersproject/contracts@5.7.0': - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/transactions': 5.7.0 - - '@ethersproject/hash@5.7.0': - dependencies: - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - - '@ethersproject/hdnode@5.7.0': - dependencies: - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/basex': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/pbkdf2': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/wordlists': 5.7.0 - - '@ethersproject/json-wallets@5.7.0': - dependencies: - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/hdnode': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/pbkdf2': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/random': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - aes-js: 3.0.0 - scrypt-js: 3.0.1 - - '@ethersproject/keccak256@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - js-sha3: 0.8.0 - - '@ethersproject/logger@5.7.0': {} - - '@ethersproject/networks@5.7.1': - dependencies: - '@ethersproject/logger': 5.7.0 - - '@ethersproject/pbkdf2@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/sha2': 5.7.0 - - '@ethersproject/properties@5.7.0': - dependencies: - '@ethersproject/logger': 5.7.0 - - '@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)': - dependencies: - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/basex': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/properties': 5.7.0 - '@ethersproject/random': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/web': 5.7.1 - bech32: 1.1.4 - ws: 7.4.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - '@ethersproject/random@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - - '@ethersproject/rlp@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - - '@ethersproject/sha2@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - hash.js: 1.1.7 - - '@ethersproject/signing-key@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - bn.js: 5.2.1 - elliptic: 6.5.4 - hash.js: 1.1.7 - - '@ethersproject/solidity@5.7.0': - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/strings': 5.7.0 - - '@ethersproject/strings@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/logger': 5.7.0 - - '@ethersproject/transactions@5.7.0': - dependencies: - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - - '@ethersproject/units@5.7.0': - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/logger': 5.7.0 - - '@ethersproject/wallet@5.7.0': - dependencies: - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/hdnode': 5.7.0 - '@ethersproject/json-wallets': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/random': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/wordlists': 5.7.0 - - '@ethersproject/web@5.7.1': - dependencies: - '@ethersproject/base64': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - - '@ethersproject/wordlists@5.7.0': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@hutson/parse-repository-url@3.0.2': {} - '@inquirer/confirm@5.0.2(@types/node@22.10.1)': + '@inquirer/confirm@5.1.0(@types/node@22.9.1)': dependencies: - '@inquirer/core': 10.1.0(@types/node@22.10.1) - '@inquirer/type': 3.0.1(@types/node@22.10.1) - '@types/node': 22.10.1 + '@inquirer/core': 10.1.1(@types/node@22.9.1) + '@inquirer/type': 3.0.1(@types/node@22.9.1) + '@types/node': 22.9.1 - '@inquirer/core@10.1.0(@types/node@22.10.1)': + '@inquirer/core@10.1.1(@types/node@22.9.1)': dependencies: '@inquirer/figures': 1.0.8 '@inquirer/type': 3.0.1(@types/node@22.10.1) @@ -3655,7 +3252,7 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@lifi/types@16.3.1': {} + '@lifi/types@16.4.1': {} '@mswjs/interceptors@0.37.3': dependencies: @@ -3910,7 +3507,7 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 - '@vitest/coverage-v8@2.1.8(vitest@2.1.8(@types/node@22.10.1)(msw@2.6.6(@types/node@22.10.1)(typescript@5.7.2)))': + '@vitest/coverage-v8@2.1.8(vitest@2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -3924,7 +3521,7 @@ snapshots: std-env: 3.8.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.8(@types/node@22.10.1)(msw@2.6.6(@types/node@22.10.1)(typescript@5.7.2)) + vitest: 2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2)) transitivePeerDependencies: - supports-color @@ -3935,14 +3532,14 @@ snapshots: chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.8(msw@2.6.6(@types/node@22.10.1)(typescript@5.7.2))(vite@5.4.11(@types/node@22.10.1))': + '@vitest/mocker@2.1.8(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2))(vite@5.4.11(@types/node@22.9.1))': dependencies: '@vitest/spy': 2.1.8 estree-walker: 3.0.3 magic-string: 0.30.14 optionalDependencies: - msw: 2.6.6(@types/node@22.10.1)(typescript@5.7.2) - vite: 5.4.11(@types/node@22.10.1) + msw: 2.6.8(@types/node@22.9.1)(typescript@5.7.2) + vite: 5.4.11(@types/node@22.9.1) '@vitest/pretty-format@2.1.8': dependencies: @@ -4024,8 +3621,6 @@ snapshots: add-stream@1.0.0: {} - aes-js@3.0.0: {} - agentkeepalive@4.5.0: dependencies: humanize-ms: 1.2.1 @@ -4087,8 +3682,6 @@ snapshots: base64-js@1.5.1: {} - bech32@1.1.4: {} - bech32@2.0.0: {} bigint-buffer@1.1.5: @@ -4122,8 +3715,6 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - bn.js@4.12.1: {} - bn.js@5.2.1: {} borsh@0.7.0: @@ -4145,8 +3736,6 @@ snapshots: dependencies: fill-range: 7.1.1 - brorand@1.1.0: {} - bs58@4.0.1: dependencies: base-x: 3.0.10 @@ -4212,10 +3801,6 @@ snapshots: check-error@2.1.1: {} - citty@0.1.6: - dependencies: - consola: 3.2.3 - cli-cursor@3.1.0: dependencies: restore-cursor: 3.1.0 @@ -4283,8 +3868,6 @@ snapshots: readable-stream: 3.6.2 typedarray: 0.0.6 - consola@3.2.3: {} - conventional-changelog-angular@5.0.13: dependencies: compare-func: 2.0.0 @@ -4558,16 +4141,6 @@ snapshots: eastasianwidth@0.2.0: {} - elliptic@6.5.4: - dependencies: - bn.js: 4.12.1 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - emoji-regex@10.4.0: {} emoji-regex@8.0.0: {} @@ -4649,42 +4222,6 @@ snapshots: esutils@2.0.3: {} - ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/basex': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/contracts': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/hdnode': 5.7.0 - '@ethersproject/json-wallets': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/pbkdf2': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@ethersproject/random': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - '@ethersproject/solidity': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/units': 5.7.0 - '@ethersproject/wallet': 5.7.0 - '@ethersproject/web': 5.7.1 - '@ethersproject/wordlists': 5.7.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - eventemitter3@4.0.7: {} eventemitter3@5.0.1: {} @@ -4895,23 +4432,12 @@ snapshots: has-flag@4.0.0: {} - hash.js@1.1.7: - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - hasown@2.0.2: dependencies: function-bind: 1.1.2 headers-polyfill@4.0.3: {} - hmac-drbg@1.0.1: - dependencies: - hash.js: 1.1.7 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - hosted-git-info@2.8.9: {} hosted-git-info@4.1.0: @@ -5061,8 +4587,6 @@ snapshots: jiti@1.21.6: {} - js-sha3@0.8.0: {} - js-tokens@4.0.0: {} js-yaml@4.1.0: @@ -5261,10 +4785,6 @@ snapshots: min-indent@1.0.1: {} - minimalistic-assert@1.0.1: {} - - minimalistic-crypto-utils@1.0.1: {} - minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -5299,12 +4819,12 @@ snapshots: ms@2.1.3: {} - msw@2.6.6(@types/node@22.10.1)(typescript@5.7.2): + msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2): dependencies: '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.0.2(@types/node@22.10.1) + '@inquirer/confirm': 5.1.0(@types/node@22.9.1) '@mswjs/interceptors': 0.37.3 '@open-draft/deferred-promise': 2.2.0 '@open-draft/until': 2.1.0 @@ -5715,8 +5235,6 @@ snapshots: dependencies: commander: 12.1.0 - scrypt-js@3.0.1: {} - semver@5.7.2: {} semver@6.3.1: {} @@ -5899,7 +5417,7 @@ snapshots: through@2.3.8: {} - tiny-invariant@1.3.3: {} + tinybench@2.9.0: {} tinyexec@0.3.1: {} @@ -6071,10 +5589,10 @@ snapshots: '@types/node': 22.10.1 fsevents: 2.3.3 - vitest@2.1.8(@types/node@22.10.1)(msw@2.6.6(@types/node@22.10.1)(typescript@5.7.2)): + vitest@2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2)): dependencies: '@vitest/expect': 2.1.8 - '@vitest/mocker': 2.1.8(msw@2.6.6(@types/node@22.10.1)(typescript@5.7.2))(vite@5.4.11(@types/node@22.10.1)) + '@vitest/mocker': 2.1.8(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2))(vite@5.4.11(@types/node@22.9.1)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.8 '@vitest/snapshot': 2.1.8 @@ -6161,10 +5679,10 @@ snapshots: wrappy@1.0.2: {} - ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.5): + ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 - utf-8-validate: 6.0.5 + utf-8-validate: 5.0.10 ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: diff --git a/src/core/EVM/EVMStepExecutor.ts b/src/core/EVM/EVMStepExecutor.ts index 88877ce5..e1013099 100644 --- a/src/core/EVM/EVMStepExecutor.ts +++ b/src/core/EVM/EVMStepExecutor.ts @@ -11,7 +11,6 @@ import type { SendTransactionParameters, TransactionReceipt, } from 'viem' -import { encodeFunctionData, multicall3Abi } from 'viem' import { estimateGas, getAddresses, sendTransaction } from 'viem/actions' import { getCapabilities, sendCalls } from 'viem/experimental' import { config } from '../../config.js' @@ -35,7 +34,7 @@ import { getNativePermit } from './getNativePermit.js' import { parseEVMErrors } from './parseEVMErrors.js' import { signPermitMessage } from './signPermitMessage.js' import { switchChain } from './switchChain.js' -import { getMaxPriorityFeePerGas, getMulticallAddress } from './utils.js' +import { getMaxPriorityFeePerGas } from './utils.js' import { type WalletCallReceipt, waitForBatchTransactionReceipt, @@ -49,12 +48,6 @@ export type Call = { chainId?: number } -export type Aggregate3Call = { - allowFailure: boolean - callData: Hex - target: Address -} - export interface EVMStepExecutorOptions extends StepExecutorOptions { client: Client } @@ -138,9 +131,6 @@ export class EVMStepExecutor extends BaseStepExecutor { const fromChain = await config.getChainById(step.action.fromChainId) const toChain = await config.getChainById(step.action.toChainId) - const multicallAddress = await getMulticallAddress(fromChain.id) - const multicallSupported = !!multicallAddress - let atomicBatchSupported = false try { const capabilities = await getCapabilities(this.client) @@ -150,12 +140,12 @@ export class EVMStepExecutor extends BaseStepExecutor { } const calls: Call[] = [] - const multicallCalls: Aggregate3Call[] = [] const isBridgeExecution = fromChain.id !== toChain.id const currentProcessType = isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP' // STEP 1: Check allowance + // Find existing swap/bridge process const existingProcess = step.execution.process.find( (p) => p.type === currentProcessType ) @@ -176,44 +166,37 @@ export class EVMStepExecutor extends BaseStepExecutor { !!fromChain.permit2Proxy && nativePermit.supported && !atomicBatchSupported - // Check if chain has Permit2 contract deployed, not available for atomic batch + // Check if chain has Permit2 contract deployed. Permit2 should not be available for atomic batch. const permit2Supported = !!fromChain.permit2 && !!fromChain.permit2Proxy && !atomicBatchSupported // Token supports either native permits or Permit2 const permitSupported = permit2Supported || nativePermitSupported - // We need to check allowance only if: - // 1. No existing transaction is pending - // 2. Token is not native (address is not zero) - // 3. Token doesn't support native permits (we'll use permit instead of approve) const checkForAllowance = + // No existing swap/bridgetransaction is pending !existingProcess?.txHash && + // Token is not native (address is not zero) !isZeroAddress(step.action.fromToken.address) && + // Token doesn't support native permits !nativePermitSupported - // TODO: wait for existing approval tx hash? + if (checkForAllowance) { - // Check if token needs approval and get approval transaction data if atomic batch is supported - const data = await checkAllowance( - this.client, - fromChain, + // Check if token needs approval and get approval transaction or message data when available + const data = await checkAllowance({ + client: this.client, + chain: fromChain, step, - this.statusManager, - this.executionOptions, - this.allowUserInteraction, - atomicBatchSupported || multicallSupported, - permit2Supported - ) + statusManager: this.statusManager, + executionOptions: this.executionOptions, + allowUserInteraction: this.allowUserInteraction, + atomicBatchSupported, + permit2Supported, + }) if (data) { // Create approval transaction call // No value needed since we're only approving ERC20 tokens - if (multicallSupported) { - multicallCalls.push({ - target: step.action.fromToken.address as Address, - callData: data, - allowFailure: true, - }) - } else if (atomicBatchSupported) { + if (atomicBatchSupported) { calls.push({ chainId: step.action.fromToken.chainId, to: step.action.fromToken.address as Address, @@ -323,7 +306,7 @@ export class EVMStepExecutor extends BaseStepExecutor { process = this.statusManager.updateProcess( step, process.type, - 'ACTION_REQUIRED' + permitSupported ? 'PERMIT_REQUIRED' : 'ACTION_REQUIRED' ) if (!this.allowUserInteraction) { @@ -352,28 +335,11 @@ export class EVMStepExecutor extends BaseStepExecutor { fromChain, step.action.fromToken.address as Address, BigInt(step.action.fromAmount), - nativePermit, - multicallSupported + nativePermit ) - multicallCalls.push({ - target: fromChain.permit2Proxy as Address, - callData: data, - allowFailure: true, - }) - - const multicallData = encodeFunctionData({ - abi: multicall3Abi, - functionName: 'aggregate3', - args: [multicallCalls], - }) - - // Update transaction request to call permit2 proxy - transactionRequest.to = multicallAddress - transactionRequest.data = multicallData - - // transactionRequest.to = fromChain.permit2Proxy - // transactionRequest.data = data + transactionRequest.to = fromChain.permit2Proxy + transactionRequest.data = data try { // Try to re-estimate the gas due to additional Permit data @@ -387,6 +353,12 @@ export class EVMStepExecutor extends BaseStepExecutor { // Let the wallet estimate the gas in case of failure transactionRequest.gas = undefined } + + process = this.statusManager.updateProcess( + step, + process.type, + 'ACTION_REQUIRED' + ) } txHash = await sendTransaction(this.client, { diff --git a/src/core/EVM/checkAllowance.ts b/src/core/EVM/checkAllowance.ts index ddd47dc1..8db520c3 100644 --- a/src/core/EVM/checkAllowance.ts +++ b/src/core/EVM/checkAllowance.ts @@ -8,16 +8,27 @@ import { parseEVMErrors } from './parseEVMErrors.js' import { setAllowance } from './setAllowance.js' import { waitForTransactionReceipt } from './waitForTransactionReceipt.js' -export const checkAllowance = async ( - client: Client, - chain: ExtendedChain, - step: LiFiStep, - statusManager: StatusManager, - settings?: ExecutionOptions, +export type CheckAllowanceParams = { + client: Client + chain: ExtendedChain + step: LiFiStep + statusManager: StatusManager + executionOptions?: ExecutionOptions + allowUserInteraction?: boolean + atomicBatchSupported?: boolean + permit2Supported?: boolean +} + +export const checkAllowance = async ({ + client, + chain, + step, + statusManager, + executionOptions, allowUserInteraction = false, atomicBatchSupported = false, - permit2Supported = false -): Promise => { + permit2Supported = false, +}: CheckAllowanceParams): Promise => { // Find existing or create new allowance process const allowanceProcess: Process = statusManager.findOrCreateProcess({ step, @@ -64,6 +75,8 @@ export const checkAllowance = async ( return } + statusManager.updateProcess(step, allowanceProcess.type, 'ACTION_REQUIRED') + // Set new allowance const approveAmount = permit2Supported ? MaxUint256 : fromAmount const approveTxHash = await setAllowance( @@ -71,7 +84,7 @@ export const checkAllowance = async ( step.action.fromToken.address as Address, spenderAddress as Address, approveAmount, - settings, + executionOptions, atomicBatchSupported ) diff --git a/src/core/EVM/setAllowance.ts b/src/core/EVM/setAllowance.ts index 12870cb6..165a296b 100644 --- a/src/core/EVM/setAllowance.ts +++ b/src/core/EVM/setAllowance.ts @@ -13,7 +13,7 @@ export const setAllowance = async ( tokenAddress: Address, contractAddress: Address, amount: bigint, - settings?: ExecutionOptions, + executionOptions?: ExecutionOptions, returnPopulatedTransaction?: boolean ): Promise => { const data = encodeFunctionData({ @@ -35,9 +35,9 @@ export const setAllowance = async ( : undefined, } - if (settings?.updateTransactionRequestHook) { + if (executionOptions?.updateTransactionRequestHook) { const customizedTransactionRequest: TransactionParameters = - await settings.updateTransactionRequestHook({ + await executionOptions.updateTransactionRequestHook({ requestType: 'approve', ...transactionRequest, }) diff --git a/src/core/EVM/signPermitMessage.ts b/src/core/EVM/signPermitMessage.ts index 1d381fbd..87f66f83 100644 --- a/src/core/EVM/signPermitMessage.ts +++ b/src/core/EVM/signPermitMessage.ts @@ -150,7 +150,7 @@ export const signPermit2WitnessMessage = async ( deadline: BigInt(Math.floor(Date.now() / 1000) + 30 * 60), // 30 minutes } - // Create witness data for the LIFI call + // Create witness data for the LI.FI call const witness = { witness: { tokenReceiver: chain.permit2Proxy as Address, From 7bdd175a1fa078cfa50db138cda7fffb13dacb71 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 10 Dec 2024 11:11:48 +0100 Subject: [PATCH 03/26] fix: lock files --- examples/node/pnpm-lock.yaml | 206 ++++++++++++++++++----------------- pnpm-lock.yaml | 169 ++++++++++++++-------------- 2 files changed, 195 insertions(+), 180 deletions(-) diff --git a/examples/node/pnpm-lock.yaml b/examples/node/pnpm-lock.yaml index cc410ad2..5b6e8c01 100644 --- a/examples/node/pnpm-lock.yaml +++ b/examples/node/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: '9.0' settings: - autoInstallPeers: false + autoInstallPeers: true excludeLinksFromLockfile: false importers: @@ -13,19 +13,19 @@ importers: version: 5.16.0 '@lifi/sdk': specifier: ^3.4.2 - version: 3.4.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) + version: 3.4.2(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)))(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typescript@5.7.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) '@wagmi/connectors': specifier: ^5.5.3 - version: 5.5.3(@wagmi/core@2.15.2(typescript@5.7.2)(use-sync-external-store@1.2.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)))(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)) + version: 5.5.3(@wagmi/core@2.15.2(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(react@18.3.1)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) '@wagmi/core': specifier: ^2.15.2 - version: 2.15.2(typescript@5.7.2)(use-sync-external-store@1.2.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)) + version: 2.15.2(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) dotenv: specifier: ^16.4.7 version: 16.4.7 viem: specifier: ^2.21.54 - version: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) + version: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) devDependencies: '@types/node': specifier: ^22.10.1 @@ -49,6 +49,8 @@ packages: '@bigmi/core@0.0.5': resolution: {integrity: sha512-6SdkB/8AKx3VEqcJngJo3WEN7RsqQmJLBvcIRFLw52ejpWIO4Y4PCqysGQ0SdWZ/bFc955g1ZRqMXzcudxbufw==} peerDependencies: + bitcoinjs-lib: ^7.0.0-rc.0 + bs58: ^6.0.0 viem: ^2.21.0 '@coinbase/wallet-sdk@3.9.3': @@ -229,6 +231,8 @@ packages: '@lifi/sdk@3.4.2': resolution: {integrity: sha512-CJW+GX0BE+nEN0ZRNPySoWdElgcQYxYOCa8OcPqyPOt4oUTiADElaSzMuIEhOG7D8g6ucz1wtM8sQnWUNpF7ZQ==} peerDependencies: + '@solana/wallet-adapter-base': ^0.9.0 + '@solana/web3.js': ^1.93.0 viem: ^2.16.0 '@lifi/types@16.4.0': @@ -1078,8 +1082,8 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - gopd@1.2.0: - resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + gopd@1.1.0: + resolution: {integrity: sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==} engines: {node: '>= 0.4'} h3@1.13.0: @@ -1223,6 +1227,9 @@ packages: resolution: {integrity: sha512-yPBThwecp1wS9DmoA4x4KR2h3QoslacnDR8ypuFM962kI4/456Iy1oHx2RAgh4jfZNdn0bctsdadceiBUgpU1g==} hasBin: true + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + json-rpc-engine@6.1.0: resolution: {integrity: sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==} engines: {node: '>=10.0.0'} @@ -1264,6 +1271,10 @@ packages: lodash.isequal@4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -1467,6 +1478,10 @@ packages: radix3@1.1.2: resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} + react@18.3.1: + resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + engines: {node: '>=0.10.0'} + readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} @@ -1710,10 +1725,6 @@ packages: resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} engines: {node: '>=6.14.2'} - utf-8-validate@6.0.5: - resolution: {integrity: sha512-EYZR+OpIXp9Y1eG1iueg8KRsY8TuT8VNgnanZ0uA3STqhHQTLwbl+WX76/9X5OY12yQubymBpaBSmMPkSTQcKA==} - engines: {node: '>=6.14.2'} - util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -1871,15 +1882,13 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 - '@bigmi/core@0.0.5(typescript@5.7.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@bigmi/core@0.0.5(bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2))(bs58@6.0.0)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: '@noble/hashes': 1.6.1 bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.2) bs58: 6.0.0 - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) - transitivePeerDependencies: - - typescript + viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) '@coinbase/wallet-sdk@3.9.3': dependencies: @@ -2002,9 +2011,9 @@ snapshots: dependencies: '@lifi/types': 16.4.0 - '@lifi/sdk@3.4.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@lifi/sdk@3.4.2(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)))(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typescript@5.7.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: - '@bigmi/core': 0.0.5(typescript@5.7.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) + '@bigmi/core': 0.0.5(bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2))(bs58@6.0.0)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) '@lifi/types': 16.4.0 '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 @@ -2013,12 +2022,9 @@ snapshots: bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.2) bs58: 6.0.0 - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) + viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) transitivePeerDependencies: - - bufferutil - - encoding - typescript - - utf-8-validate '@lifi/types@16.4.0': {} @@ -2098,7 +2104,7 @@ snapshots: '@metamask/safe-event-emitter@3.1.2': {} - '@metamask/sdk-communication-layer@0.31.0(cross-fetch@4.0.0)(eciesjs@0.4.12)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@6.0.5))': + '@metamask/sdk-communication-layer@0.31.0(cross-fetch@4.0.0)(eciesjs@0.4.12)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))': dependencies: bufferutil: 4.0.8 cross-fetch: 4.0.0 @@ -2107,7 +2113,7 @@ snapshots: eciesjs: 0.4.12 eventemitter2: 6.4.9 readable-stream: 3.6.2 - socket.io-client: 4.8.1(bufferutil@4.0.8)(utf-8-validate@6.0.5) + socket.io-client: 4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) utf-8-validate: 5.0.10 uuid: 8.3.2 transitivePeerDependencies: @@ -2117,12 +2123,12 @@ snapshots: dependencies: '@paulmillr/qr': 0.2.1 - '@metamask/sdk@0.31.1(bufferutil@4.0.8)(utf-8-validate@6.0.5)': + '@metamask/sdk@0.31.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 '@metamask/onboarding': 1.0.1 '@metamask/providers': 16.1.0 - '@metamask/sdk-communication-layer': 0.31.0(cross-fetch@4.0.0)(eciesjs@0.4.12)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@6.0.5)) + '@metamask/sdk-communication-layer': 0.31.0(cross-fetch@4.0.0)(eciesjs@0.4.12)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) '@metamask/sdk-install-modal-web': 0.31.1 '@paulmillr/qr': 0.2.1 bowser: 2.11.0 @@ -2134,7 +2140,7 @@ snapshots: obj-multiplex: 1.0.0 pump: 3.0.2 readable-stream: 3.6.2 - socket.io-client: 4.8.1(bufferutil@4.0.8)(utf-8-validate@6.0.5) + socket.io-client: 4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) tslib: 2.8.1 util: 0.12.5 uuid: 8.3.2 @@ -2312,9 +2318,9 @@ snapshots: '@paulmillr/qr@0.2.1': {} - '@safe-global/safe-apps-provider@0.18.4(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)': + '@safe-global/safe-apps-provider@0.18.4(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)': dependencies: - '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) events: 3.3.0 transitivePeerDependencies: - bufferutil @@ -2322,10 +2328,10 @@ snapshots: - utf-8-validate - zod - '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)': + '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)': dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.22.4 - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) + viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript @@ -2513,16 +2519,16 @@ snapshots: dependencies: '@types/node': 22.10.1 - '@wagmi/connectors@5.5.3(@wagmi/core@2.15.2(typescript@5.7.2)(use-sync-external-store@1.2.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)))(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5))': + '@wagmi/connectors@5.5.3(@wagmi/core@2.15.2(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(react@18.3.1)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: '@coinbase/wallet-sdk': 4.2.3 - '@metamask/sdk': 0.31.1(bufferutil@4.0.8)(utf-8-validate@6.0.5) - '@safe-global/safe-apps-provider': 0.18.4(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) - '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) - '@wagmi/core': 2.15.2(typescript@5.7.2)(use-sync-external-store@1.2.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5)) - '@walletconnect/ethereum-provider': 2.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + '@metamask/sdk': 0.31.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-provider': 0.18.4(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + '@wagmi/core': 2.15.2(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) + '@walletconnect/ethereum-provider': 2.17.0(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) cbw-sdk: '@coinbase/wallet-sdk@3.9.3' - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) + viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -2547,12 +2553,12 @@ snapshots: - utf-8-validate - zod - '@wagmi/core@2.15.2(typescript@5.7.2)(use-sync-external-store@1.2.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5))': + '@wagmi/core@2.15.2(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.7.2) - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) - zustand: 5.0.0(use-sync-external-store@1.2.2) + viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + zustand: 5.0.0(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -2567,13 +2573,13 @@ snapshots: dependencies: '@wallet-standard/base': 1.1.0 - '@walletconnect/core@2.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)': + '@walletconnect/core@2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-provider': 1.0.14 '@walletconnect/jsonrpc-types': 1.0.4 '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/jsonrpc-ws-connection': 1.0.14(bufferutil@4.0.8)(utf-8-validate@6.0.5) + '@walletconnect/jsonrpc-ws-connection': 1.0.14(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/keyvaluestorage': 1.1.1 '@walletconnect/logger': 2.1.2 '@walletconnect/relay-api': 1.0.11 @@ -2606,16 +2612,16 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/ethereum-provider@2.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)': + '@walletconnect/ethereum-provider@2.17.0(bufferutil@4.0.8)(react@18.3.1)(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.7.0 - '@walletconnect/sign-client': 2.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + '@walletconnect/modal': 2.7.0(react@18.3.1) + '@walletconnect/sign-client': 2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/types': 2.17.0 - '@walletconnect/universal-provider': 2.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + '@walletconnect/universal-provider': 2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/utils': 2.17.0 events: 3.3.0 transitivePeerDependencies: @@ -2675,12 +2681,12 @@ snapshots: '@walletconnect/jsonrpc-types': 1.0.4 tslib: 1.14.1 - '@walletconnect/jsonrpc-ws-connection@1.0.14(bufferutil@4.0.8)(utf-8-validate@6.0.5)': + '@walletconnect/jsonrpc-ws-connection@1.0.14(bufferutil@4.0.8)(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.8)(utf-8-validate@6.0.5) + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -2709,16 +2715,16 @@ snapshots: '@walletconnect/safe-json': 1.0.2 pino: 7.11.0 - '@walletconnect/modal-core@2.7.0': + '@walletconnect/modal-core@2.7.0(react@18.3.1)': dependencies: - valtio: 1.11.2 + valtio: 1.11.2(react@18.3.1) transitivePeerDependencies: - '@types/react' - react - '@walletconnect/modal-ui@2.7.0': + '@walletconnect/modal-ui@2.7.0(react@18.3.1)': dependencies: - '@walletconnect/modal-core': 2.7.0 + '@walletconnect/modal-core': 2.7.0(react@18.3.1) lit: 2.8.0 motion: 10.16.2 qrcode: 1.5.3 @@ -2726,10 +2732,10 @@ snapshots: - '@types/react' - react - '@walletconnect/modal@2.7.0': + '@walletconnect/modal@2.7.0(react@18.3.1)': dependencies: - '@walletconnect/modal-core': 2.7.0 - '@walletconnect/modal-ui': 2.7.0 + '@walletconnect/modal-core': 2.7.0(react@18.3.1) + '@walletconnect/modal-ui': 2.7.0(react@18.3.1) transitivePeerDependencies: - '@types/react' - react @@ -2751,9 +2757,9 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/sign-client@2.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)': + '@walletconnect/sign-client@2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@walletconnect/core': 2.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + '@walletconnect/core': 2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-utils': 1.0.8 @@ -2806,14 +2812,14 @@ snapshots: - '@vercel/kv' - ioredis - '@walletconnect/universal-provider@2.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)': + '@walletconnect/universal-provider@2.17.0(bufferutil@4.0.8)(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/logger': 2.1.2 - '@walletconnect/sign-client': 2.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + '@walletconnect/sign-client': 2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/types': 2.17.0 '@walletconnect/utils': 2.17.0 events: 3.3.0 @@ -3090,7 +3096,7 @@ snapshots: dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 - gopd: 1.2.0 + gopd: 1.1.0 defu@6.1.4: {} @@ -3138,12 +3144,12 @@ snapshots: dependencies: once: 1.4.0 - engine.io-client@6.6.2(bufferutil@4.0.8)(utf-8-validate@6.0.5): + engine.io-client@6.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@socket.io/component-emitter': 3.1.2 debug: 4.3.7 engine.io-parser: 5.2.3 - ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@6.0.5) + ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) xmlhttprequest-ssl: 2.1.2 transitivePeerDependencies: - bufferutil @@ -3304,7 +3310,9 @@ snapshots: dependencies: is-glob: 4.0.3 - gopd@1.2.0: {} + gopd@1.1.0: + dependencies: + get-intrinsic: 1.2.4 h3@1.13.0: dependencies: @@ -3417,13 +3425,13 @@ snapshots: isexe@2.0.0: {} - isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.5)): + isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.5) + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) - isows@1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)): + isows@1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) jayson@4.1.3(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: @@ -3435,16 +3443,18 @@ snapshots: delay: 5.0.0 es6-promisify: 5.0.0 eyes: 0.1.8 - isomorphic-ws: 4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.5)) + isomorphic-ws: 4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)) json-stringify-safe: 5.0.1 uuid: 8.3.2 - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.5) + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate jiti@2.4.1: {} + js-tokens@4.0.0: {} + json-rpc-engine@6.1.0: dependencies: '@metamask/safe-event-emitter': 2.0.0 @@ -3507,6 +3517,10 @@ snapshots: lodash.isequal@4.5.0: {} + loose-envify@1.4.0: + dependencies: + js-tokens: 4.0.0 + lru-cache@10.4.3: {} merge-stream@2.0.0: {} @@ -3696,6 +3710,10 @@ snapshots: radix3@1.1.2: {} + react@18.3.1: + dependencies: + loose-envify: 1.4.0 + readable-stream@2.3.8: dependencies: core-util-is: 1.0.3 @@ -3755,7 +3773,7 @@ snapshots: es-errors: 1.3.0 function-bind: 1.1.2 get-intrinsic: 1.2.4 - gopd: 1.2.0 + gopd: 1.1.0 has-property-descriptors: 1.0.2 sha.js@2.4.11: @@ -3771,11 +3789,11 @@ snapshots: signal-exit@4.1.0: {} - socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@6.0.5): + socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@socket.io/component-emitter': 3.1.2 debug: 4.3.7 - engine.io-client: 6.6.2(bufferutil@4.0.8)(utf-8-validate@6.0.5) + engine.io-client: 6.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) socket.io-parser: 4.2.4 transitivePeerDependencies: - bufferutil @@ -3901,20 +3919,14 @@ snapshots: uqr@0.1.2: {} - use-sync-external-store@1.2.0: {} - - use-sync-external-store@1.2.2: - optional: true + use-sync-external-store@1.2.0(react@18.3.1): + dependencies: + react: 18.3.1 utf-8-validate@5.0.10: dependencies: node-gyp-build: 4.8.4 - utf-8-validate@6.0.5: - dependencies: - node-gyp-build: 4.8.4 - optional: true - util-deprecate@1.0.2: {} util@0.12.5: @@ -3933,26 +3945,28 @@ snapshots: optionalDependencies: typescript: 5.7.2 - valtio@1.11.2: + valtio@1.11.2(react@18.3.1): dependencies: proxy-compare: 2.5.1 - use-sync-external-store: 1.2.0 + use-sync-external-store: 1.2.0(react@18.3.1) + optionalDependencies: + react: 18.3.1 varuint-bitcoin@2.0.0: dependencies: uint8array-tools: 0.0.8 - viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5): + viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10): dependencies: '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 '@scure/bip32': 1.6.0 '@scure/bip39': 1.5.0 abitype: 1.0.7(typescript@5.7.2) - isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)) + isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) ox: 0.1.2(typescript@5.7.2) webauthn-p256: 0.0.10 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3981,7 +3995,7 @@ snapshots: available-typed-arrays: 1.0.7 call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.2.0 + gopd: 1.1.0 has-tostringtag: 1.0.2 which@2.0.2: @@ -3996,26 +4010,21 @@ snapshots: wrappy@1.0.2: {} - ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.5): + ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 - utf-8-validate: 6.0.5 + utf-8-validate: 5.0.10 - ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@6.0.5): + ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 - utf-8-validate: 6.0.5 + utf-8-validate: 5.0.10 ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 utf-8-validate: 5.0.10 - ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 6.0.5 - xmlhttprequest-ssl@2.1.2: {} xtend@4.0.2: {} @@ -4041,6 +4050,7 @@ snapshots: y18n: 4.0.3 yargs-parser: 18.1.3 - zustand@5.0.0(use-sync-external-store@1.2.2): + zustand@5.0.0(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)): optionalDependencies: - use-sync-external-store: 1.2.2 + react: 18.3.1 + use-sync-external-store: 1.2.0(react@18.3.1) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe22d118..3550b5a3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,10 +22,10 @@ importers: version: 1.6.1 '@solana/wallet-adapter-base': specifier: ^0.9.23 - version: 0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@6.0.5)) + version: 0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)) '@solana/web3.js': specifier: ^1.95.8 - version: 1.95.8(bufferutil@4.0.8)(utf-8-validate@6.0.5) + version: 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) bech32: specifier: ^2.0.0 version: 2.0.0 @@ -37,14 +37,14 @@ importers: version: 6.0.0 viem: specifier: ^2.21.54 - version: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) + version: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) devDependencies: '@biomejs/biome': specifier: ^1.9.4 version: 1.9.4 '@commitlint/cli': specifier: ^19.6.0 - version: 19.6.0(@types/node@22.10.1)(typescript@5.7.2) + version: 19.6.0(@types/node@22.9.1)(typescript@5.7.2) '@commitlint/config-conventional': specifier: ^19.6.0 version: 19.6.0 @@ -80,7 +80,7 @@ importers: version: 9.5.0 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) + version: 10.9.2(@types/node@22.9.1)(typescript@5.7.2) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -101,6 +101,10 @@ packages: resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.25.7': + resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} + engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.25.9': resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} @@ -117,8 +121,13 @@ packages: resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.26.3': - resolution: {integrity: sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==} + '@babel/parser@7.25.7': + resolution: {integrity: sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/parser@7.26.2': + resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} engines: {node: '>=6.0.0'} hasBin: true @@ -126,8 +135,12 @@ packages: resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} - '@babel/types@7.26.3': - resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==} + '@babel/types@7.25.7': + resolution: {integrity: sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.26.0': + resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@0.2.3': @@ -664,8 +677,8 @@ packages: '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} - '@types/conventional-commits-parser@5.0.1': - resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==} + '@types/conventional-commits-parser@5.0.0': + resolution: {integrity: sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==} '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} @@ -685,9 +698,6 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@22.10.1': - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} - '@types/node@22.7.4': resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} @@ -2576,6 +2586,10 @@ packages: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} + to-fast-properties@2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -2666,9 +2680,6 @@ packages: undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - undici-types@6.20.0: - resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - unicorn-magic@0.1.0: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} engines: {node: '>=18'} @@ -2688,10 +2699,6 @@ packages: resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} engines: {node: '>=6.14.2'} - utf-8-validate@6.0.5: - resolution: {integrity: sha512-EYZR+OpIXp9Y1eG1iueg8KRsY8TuT8VNgnanZ0uA3STqhHQTLwbl+WX76/9X5OY12yQubymBpaBSmMPkSTQcKA==} - engines: {node: '>=6.14.2'} - util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -2919,6 +2926,8 @@ snapshots: '@babel/highlight': 7.25.7 picocolors: 1.1.0 + '@babel/helper-string-parser@7.25.7': {} + '@babel/helper-string-parser@7.25.9': {} '@babel/helper-validator-identifier@7.25.7': {} @@ -2932,15 +2941,25 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.0 - '@babel/parser@7.26.3': + '@babel/parser@7.25.7': + dependencies: + '@babel/types': 7.25.7 + + '@babel/parser@7.26.2': dependencies: - '@babel/types': 7.26.3 + '@babel/types': 7.26.0 '@babel/runtime@7.26.0': dependencies: regenerator-runtime: 0.14.1 - '@babel/types@7.26.3': + '@babel/types@7.25.7': + dependencies: + '@babel/helper-string-parser': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 + to-fast-properties: 2.0.0 + + '@babel/types@7.26.0': dependencies: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 @@ -2953,7 +2972,7 @@ snapshots: bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.2) bs58: 6.0.0 - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5) + viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) '@biomejs/biome@1.9.4': optionalDependencies: @@ -3003,11 +3022,11 @@ snapshots: '@types/tough-cookie': 4.0.5 tough-cookie: 4.1.4 - '@commitlint/cli@19.6.0(@types/node@22.10.1)(typescript@5.7.2)': + '@commitlint/cli@19.6.0(@types/node@22.9.1)(typescript@5.7.2)': dependencies: '@commitlint/format': 19.5.0 '@commitlint/lint': 19.6.0 - '@commitlint/load': 19.5.0(@types/node@22.10.1)(typescript@5.7.2) + '@commitlint/load': 19.5.0(@types/node@22.9.1)(typescript@5.7.2) '@commitlint/read': 19.5.0 '@commitlint/types': 19.5.0 tinyexec: 0.3.1 @@ -3054,7 +3073,7 @@ snapshots: '@commitlint/rules': 19.6.0 '@commitlint/types': 19.5.0 - '@commitlint/load@19.5.0(@types/node@22.10.1)(typescript@5.7.2)': + '@commitlint/load@19.5.0(@types/node@22.9.1)(typescript@5.7.2)': dependencies: '@commitlint/config-validator': 19.5.0 '@commitlint/execute-rule': 19.5.0 @@ -3062,7 +3081,7 @@ snapshots: '@commitlint/types': 19.5.0 chalk: 5.3.0 cosmiconfig: 9.0.0(typescript@5.7.2) - cosmiconfig-typescript-loader: 5.1.0(@types/node@22.10.1)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2) + cosmiconfig-typescript-loader: 5.1.0(@types/node@22.9.1)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -3110,7 +3129,7 @@ snapshots: '@commitlint/types@19.5.0': dependencies: - '@types/conventional-commits-parser': 5.0.1 + '@types/conventional-commits-parser': 5.0.0 chalk: 5.3.0 '@cspotcode/source-map-support@0.8.1': @@ -3202,7 +3221,7 @@ snapshots: '@inquirer/core@10.1.1(@types/node@22.9.1)': dependencies: '@inquirer/figures': 1.0.8 - '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@inquirer/type': 3.0.1(@types/node@22.9.1) ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -3215,9 +3234,9 @@ snapshots: '@inquirer/figures@1.0.8': {} - '@inquirer/type@3.0.1(@types/node@22.10.1)': + '@inquirer/type@3.0.1(@types/node@22.9.1)': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.9.1 '@isaacs/cliui@8.0.2': dependencies: @@ -3366,10 +3385,10 @@ snapshots: dependencies: buffer: 6.0.3 - '@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@6.0.5))': + '@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))': dependencies: '@solana/wallet-standard-features': 1.2.0 - '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@6.0.5) + '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@wallet-standard/base': 1.0.1 '@wallet-standard/features': 1.0.3 eventemitter3: 4.0.7 @@ -3379,7 +3398,7 @@ snapshots: '@wallet-standard/base': 1.0.1 '@wallet-standard/features': 1.0.3 - '@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@6.0.5)': + '@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 '@noble/curves': 1.7.0 @@ -3392,7 +3411,7 @@ snapshots: bs58: 4.0.1 buffer: 6.0.3 fast-stable-stringify: 1.0.0 - jayson: 4.1.3(bufferutil@4.0.8)(utf-8-validate@6.0.5) + jayson: 4.1.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) node-fetch: 2.7.0 rpc-websockets: 9.0.4 superstruct: 2.0.2 @@ -3432,9 +3451,9 @@ snapshots: dependencies: '@types/node': 12.20.55 - '@types/conventional-commits-parser@5.0.1': + '@types/conventional-commits-parser@5.0.0': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.9.1 '@types/cookie@0.6.0': {} @@ -3453,10 +3472,6 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@22.10.1': - dependencies: - undici-types: 6.20.0 - '@types/node@22.7.4': dependencies: undici-types: 6.19.8 @@ -3483,7 +3498,7 @@ snapshots: '@types/ws@8.5.13': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.9.0 '@typescript-eslint/types@7.18.0': {} @@ -3568,7 +3583,7 @@ snapshots: '@vue/compiler-core@3.5.11': dependencies: - '@babel/parser': 7.26.3 + '@babel/parser': 7.25.7 '@vue/shared': 3.5.11 entities: 4.5.0 estree-walker: 2.0.2 @@ -3581,7 +3596,7 @@ snapshots: '@vue/compiler-sfc@3.5.11': dependencies: - '@babel/parser': 7.26.3 + '@babel/parser': 7.25.7 '@vue/compiler-core': 3.5.11 '@vue/compiler-dom': 3.5.11 '@vue/compiler-ssr': 3.5.11 @@ -3999,9 +4014,9 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@5.1.0(@types/node@22.10.1)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2): + cosmiconfig-typescript-loader@5.1.0(@types/node@22.9.1)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2): dependencies: - '@types/node': 22.10.1 + '@types/node': 22.9.1 cosmiconfig: 9.0.0(typescript@5.7.2) jiti: 1.21.6 typescript: 5.7.2 @@ -4532,13 +4547,13 @@ snapshots: isexe@2.0.0: {} - isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.5)): + isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.5) + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) - isows@1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)): + isows@1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) istanbul-lib-coverage@3.2.2: {} @@ -4567,7 +4582,7 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jayson@4.1.3(bufferutil@4.0.8)(utf-8-validate@6.0.5): + jayson@4.1.3(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@types/connect': 3.4.38 '@types/node': 12.20.55 @@ -4577,10 +4592,10 @@ snapshots: delay: 5.0.0 es6-promisify: 5.0.0 eyes: 0.1.8 - isomorphic-ws: 4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.5)) + isomorphic-ws: 4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)) json-stringify-safe: 5.0.1 uuid: 8.3.2 - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.5) + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -4738,8 +4753,8 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.26.3 - '@babel/types': 7.26.3 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 source-map-js: 1.2.1 make-dir@4.0.0: @@ -4861,7 +4876,7 @@ snapshots: node-source-walk@7.0.0: dependencies: - '@babel/parser': 7.26.3 + '@babel/parser': 7.25.7 normalize-package-data@2.5.0: dependencies: @@ -5427,6 +5442,8 @@ snapshots: tinyspy@3.0.2: {} + to-fast-properties@2.0.0: {} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -5453,14 +5470,14 @@ snapshots: '@ts-graphviz/common': 2.1.4 '@ts-graphviz/core': 2.0.5 - ts-node@10.9.2(@types/node@22.10.1)(typescript@5.7.2): + ts-node@10.9.2(@types/node@22.9.1)(typescript@5.7.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.10.1 + '@types/node': 22.9.1 acorn: 8.12.1 acorn-walk: 8.3.4 arg: 4.1.3 @@ -5502,8 +5519,6 @@ snapshots: undici-types@6.19.8: {} - undici-types@6.20.0: {} - unicorn-magic@0.1.0: {} universalify@0.2.0: {} @@ -5520,11 +5535,6 @@ snapshots: node-gyp-build: 4.8.4 optional: true - utf-8-validate@6.0.5: - dependencies: - node-gyp-build: 4.8.4 - optional: true - util-deprecate@1.0.2: {} uuid@8.3.2: {} @@ -5544,17 +5554,17 @@ snapshots: dependencies: uint8array-tools: 0.0.8 - viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@6.0.5): + viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10): dependencies: '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 '@scure/bip32': 1.6.0 '@scure/bip39': 1.5.0 abitype: 1.0.7(typescript@5.7.2) - isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)) + isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) ox: 0.1.2(typescript@5.7.2) webauthn-p256: 0.0.10 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -5562,13 +5572,13 @@ snapshots: - utf-8-validate - zod - vite-node@2.1.8(@types/node@22.10.1): + vite-node@2.1.8(@types/node@22.9.1): dependencies: cac: 6.7.14 debug: 4.3.7 es-module-lexer: 1.5.4 pathe: 1.1.2 - vite: 5.4.11(@types/node@22.10.1) + vite: 5.4.11(@types/node@22.9.1) transitivePeerDependencies: - '@types/node' - less @@ -5580,13 +5590,13 @@ snapshots: - supports-color - terser - vite@5.4.11(@types/node@22.10.1): + vite@5.4.11(@types/node@22.9.1): dependencies: esbuild: 0.21.5 postcss: 8.4.49 rollup: 4.28.0 optionalDependencies: - '@types/node': 22.10.1 + '@types/node': 22.9.1 fsevents: 2.3.3 vitest@2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2)): @@ -5608,11 +5618,11 @@ snapshots: tinyexec: 0.3.1 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.11(@types/node@22.10.1) - vite-node: 2.1.8(@types/node@22.10.1) + vite: 5.4.11(@types/node@22.9.1) + vite-node: 2.1.8(@types/node@22.9.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.1 + '@types/node': 22.9.1 transitivePeerDependencies: - less - lightningcss @@ -5689,11 +5699,6 @@ snapshots: bufferutil: 4.0.8 utf-8-validate: 5.0.10 - ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 6.0.5 - xtend@4.0.2: {} y18n@5.0.8: {} From c9a1c608e42d90b66464213333c42f8afae43691 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 10 Dec 2024 11:21:14 +0100 Subject: [PATCH 04/26] fix: test types --- src/core/EVM/getAllowance.int.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/EVM/getAllowance.int.spec.ts b/src/core/EVM/getAllowance.int.spec.ts index 16ad4b5c..a4635744 100644 --- a/src/core/EVM/getAllowance.int.spec.ts +++ b/src/core/EVM/getAllowance.int.spec.ts @@ -1,4 +1,5 @@ import { ChainId, CoinKey } from '@lifi/types' +import type { Address } from 'viem' import { beforeAll, describe, expect, it } from 'vitest' import { setupTestEnvironment } from '../../../tests/setup.js' import { findDefaultToken } from '../../../tests/tokens.js' @@ -33,7 +34,7 @@ describe('allowance integration tests', () => { async () => { const allowance = await getAllowance( memeToken.chainId, - memeToken.address, + memeToken.address as Address, defaultWalletAddress, defaultSpenderAddress ) @@ -50,7 +51,7 @@ describe('allowance integration tests', () => { const allowance = await getAllowance( token.chainId, - token.address, + token.address as Address, defaultWalletAddress, defaultSpenderAddress ) @@ -68,7 +69,7 @@ describe('allowance integration tests', () => { const allowance = await getAllowance( invalidToken.chainId, - invalidToken.address, + invalidToken.address as Address, defaultWalletAddress, defaultSpenderAddress ) From c0926848ded51f47fedccadb141fba2a8b1e6114 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 10 Dec 2024 13:38:09 +0100 Subject: [PATCH 05/26] chore(release): 3.5.0-beta.0 --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a27b3886..39f75405 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/sdk", - "version": "3.4.2", + "version": "3.5.0-beta.0", "description": "LI.FI Any-to-Any Cross-Chain-Swap SDK", "keywords": [ "bridge", diff --git a/src/version.ts b/src/version.ts index 21c59ec6..357120fa 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ export const name = '@lifi/sdk' -export const version = '3.4.2' +export const version = '3.5.0-beta.0' From 66d2ccff808abb399ed96e9fdeaaa616c2be8321 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Fri, 20 Dec 2024 13:34:39 +0100 Subject: [PATCH 06/26] fix: remove token receiver --- src/core/EVM/signPermitMessage.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/EVM/signPermitMessage.ts b/src/core/EVM/signPermitMessage.ts index 87f66f83..fbd22e91 100644 --- a/src/core/EVM/signPermitMessage.ts +++ b/src/core/EVM/signPermitMessage.ts @@ -153,7 +153,6 @@ export const signPermit2WitnessMessage = async ( // Create witness data for the LI.FI call const witness = { witness: { - tokenReceiver: chain.permit2Proxy as Address, diamondAddress: chain.diamondAddress as Address, diamondCalldataHash: keccak256(transactionRequest.data as Hex), }, From a6b822c126fe8663f3e80481b344f354190d6120 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Thu, 2 Jan 2025 12:26:27 +0100 Subject: [PATCH 07/26] feat: add relayer service (draft) --- examples/node/package.json | 12 +- examples/node/pnpm-lock.yaml | 1016 ++++++----------- package.json | 14 +- pnpm-lock.yaml | 256 +++-- src/core/EVM/EVMStepExecutor.ts | 91 +- src/core/EVM/parseEVMErrors.ts | 2 +- src/core/EVM/signPermitMessage.ts | 125 +- src/core/EVM/typeguards.ts | 7 + src/core/EVM/types.ts | 13 +- .../EVM/waitForRelayedTransactionReceipt.ts | 47 + src/createConfig.ts | 2 +- src/helper.unit.spec.ts | 73 -- src/helpers.ts | 75 -- src/index.ts | 9 +- src/services/api.ts | 383 +++++-- src/utils/checkPackageUpdates.ts | 22 + src/utils/checkPackageUpdates.unit.spec.ts | 71 ++ src/utils/convertQuoteToRoute.ts | 42 + src/utils/fetchTxErrorDetails.ts | 10 + 19 files changed, 1105 insertions(+), 1165 deletions(-) create mode 100644 src/core/EVM/typeguards.ts create mode 100644 src/core/EVM/waitForRelayedTransactionReceipt.ts delete mode 100644 src/helper.unit.spec.ts delete mode 100644 src/helpers.ts create mode 100644 src/utils/checkPackageUpdates.ts create mode 100644 src/utils/checkPackageUpdates.unit.spec.ts create mode 100644 src/utils/convertQuoteToRoute.ts create mode 100644 src/utils/fetchTxErrorDetails.ts diff --git a/examples/node/package.json b/examples/node/package.json index b7f7b168..90ca07a6 100644 --- a/examples/node/package.json +++ b/examples/node/package.json @@ -7,12 +7,12 @@ "author": "LI.FI ", "license": "MIT", "dependencies": { - "@lifi/data-types": "^5.16.0", - "@lifi/sdk": "^3.4.2", - "@wagmi/connectors": "^5.5.3", - "@wagmi/core": "^2.15.2", + "@lifi/data-types": "^5.19.0", + "@lifi/sdk": "^3.4.4", + "@wagmi/connectors": "^5.7.3", + "@wagmi/core": "^2.16.3", "dotenv": "^16.4.7", - "viem": "^2.21.54" + "viem": "^2.22.1" }, "scripts": { "example:swap": "tsx examples/swap.ts", @@ -24,7 +24,7 @@ "example:yearn": "tsx examples/yearnDeposit.ts" }, "devDependencies": { - "@types/node": "^22.10.1", + "@types/node": "^22.10.3", "tsx": "^4.19.2", "typescript": "^5.7.2" } diff --git a/examples/node/pnpm-lock.yaml b/examples/node/pnpm-lock.yaml index 5b6e8c01..2bda1722 100644 --- a/examples/node/pnpm-lock.yaml +++ b/examples/node/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: '9.0' settings: - autoInstallPeers: true + autoInstallPeers: false excludeLinksFromLockfile: false importers: @@ -9,27 +9,27 @@ importers: .: dependencies: '@lifi/data-types': - specifier: ^5.16.0 - version: 5.16.0 + specifier: ^5.19.0 + version: 5.19.0 '@lifi/sdk': - specifier: ^3.4.2 - version: 3.4.2(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)))(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typescript@5.7.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) + specifier: ^3.4.4 + version: 3.4.4(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)) '@wagmi/connectors': - specifier: ^5.5.3 - version: 5.5.3(@wagmi/core@2.15.2(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(react@18.3.1)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) + specifier: ^5.7.3 + version: 5.7.3(@wagmi/core@2.16.3(typescript@5.7.2)(use-sync-external-store@1.2.0)(viem@2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)) '@wagmi/core': - specifier: ^2.15.2 - version: 2.15.2(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) + specifier: ^2.16.3 + version: 2.16.3(typescript@5.7.2)(use-sync-external-store@1.2.0)(viem@2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)) dotenv: specifier: ^16.4.7 version: 16.4.7 viem: - specifier: ^2.21.54 - version: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + specifier: ^2.22.1 + version: 2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) devDependencies: '@types/node': - specifier: ^22.10.1 - version: 22.10.1 + specifier: ^22.10.3 + version: 22.10.3 tsx: specifier: ^4.19.2 version: 4.19.2 @@ -46,12 +46,8 @@ packages: resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} - '@bigmi/core@0.0.5': - resolution: {integrity: sha512-6SdkB/8AKx3VEqcJngJo3WEN7RsqQmJLBvcIRFLw52ejpWIO4Y4PCqysGQ0SdWZ/bFc955g1ZRqMXzcudxbufw==} - peerDependencies: - bitcoinjs-lib: ^7.0.0-rc.0 - bs58: ^6.0.0 - viem: ^2.21.0 + '@bigmi/core@0.0.7': + resolution: {integrity: sha512-X9YdZRSBcIJkbiklqQZ/5zHeltzskuc9UBnDqQ1ea4Xbh7X/oP60nE46blSfQJwf3YdV1nm78Yi//tPsTVGNFQ==} '@coinbase/wallet-sdk@3.9.3': resolution: {integrity: sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==} @@ -225,18 +221,16 @@ packages: resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} engines: {node: '>=14'} - '@lifi/data-types@5.16.0': - resolution: {integrity: sha512-xwrGmZndFssr50KLckdk8ntew8HWpa+JVN6iQ31xP54E5a1+arhRak5KAw2n7r4CrypMU+Ei8NHRI7lQgJ69CQ==} + '@lifi/data-types@5.19.0': + resolution: {integrity: sha512-00bSvQXENsAjTuSfZbVmPxeiBSN7dFMVssNoCLTZV0nOvgJuxjWL8vLMGEasg+zC5wxEBvO43EEkdHQoMI0BHg==} - '@lifi/sdk@3.4.2': - resolution: {integrity: sha512-CJW+GX0BE+nEN0ZRNPySoWdElgcQYxYOCa8OcPqyPOt4oUTiADElaSzMuIEhOG7D8g6ucz1wtM8sQnWUNpF7ZQ==} + '@lifi/sdk@3.4.4': + resolution: {integrity: sha512-npXE0PqDlaDbN0RV4oPiwrdnjqOWjm8l6a6NSVsaR9QZ5+bnEoQUIoSFDnAWnkiCPK9lJPbx9sSO28ImAdAXOQ==} peerDependencies: - '@solana/wallet-adapter-base': ^0.9.0 - '@solana/web3.js': ^1.93.0 - viem: ^2.16.0 + viem: ^2.21.0 - '@lifi/types@16.4.0': - resolution: {integrity: sha512-eZKDEXQ6LHYqMXxeQHEspPcB//74P1nYUmz+QNJe5Rh2LTus8lC1y4nZnMLVe5243vXgO/ggcXDEzCmgV3dhDw==} + '@lifi/types@16.5.0': + resolution: {integrity: sha512-DqDNnVZiyOrtFdn3Jlloni5J2QDnVfHiS5n3bD9qX9l2ISrgp7YBTJRfNGucHfStvegSNSyuG0/THJ4Kh4f08A==} '@lit-labs/ssr-dom-shim@1.2.1': resolution: {integrity: sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==} @@ -291,11 +285,11 @@ packages: readable-stream: ^3.6.2 socket.io-client: ^4.5.1 - '@metamask/sdk-install-modal-web@0.31.1': - resolution: {integrity: sha512-J83K6jN2V3xkTb+/5eyASatlgqHdpzjkTVU6cC+Z/YA9cE32zX8vE0EQweGmExgv+kJ5zz/BiqSZZbMfuilRfQ==} + '@metamask/sdk-install-modal-web@0.31.2': + resolution: {integrity: sha512-KPv36kQjmTwErU8g2neuHHSgkD5+1hp4D6ERfk5Kc2r73aOYNCdG9wDGRUmFmcY2MKkeK1EuDyZfJ4FPU30fxQ==} - '@metamask/sdk@0.31.1': - resolution: {integrity: sha512-olU3TYRAxIZP5ZXDmi5Y53zXikkPySNiTuBI4QD+2hWYomVlMV2SjOKHSRR6gPuI+fFEg/Z+ImrxDthQfMODwA==} + '@metamask/sdk@0.31.4': + resolution: {integrity: sha512-HLUN4IZGdyiy5YeebXmXi+ndpmrl6zslCQLdR2QHplIy4JmUL/eDyKNFiK7eBLVKXVVIDYFIb6g1iSEb+i8Kew==} '@metamask/superstruct@3.1.0': resolution: {integrity: sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA==} @@ -361,99 +355,11 @@ packages: resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==} engines: {node: ^14.21.3 || >=16} - '@parcel/watcher-android-arm64@2.5.0': - resolution: {integrity: sha512-qlX4eS28bUcQCdribHkg/herLe+0A9RyYC+mm2PXpncit8z5b3nSqGVzMNR3CmtAOgRutiZ02eIJJgP/b1iEFQ==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [android] - - '@parcel/watcher-darwin-arm64@2.5.0': - resolution: {integrity: sha512-hyZ3TANnzGfLpRA2s/4U1kbw2ZI4qGxaRJbBH2DCSREFfubMswheh8TeiC1sGZ3z2jUf3s37P0BBlrD3sjVTUw==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [darwin] - - '@parcel/watcher-darwin-x64@2.5.0': - resolution: {integrity: sha512-9rhlwd78saKf18fT869/poydQK8YqlU26TMiNg7AIu7eBp9adqbJZqmdFOsbZ5cnLp5XvRo9wcFmNHgHdWaGYA==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [darwin] - - '@parcel/watcher-freebsd-x64@2.5.0': - resolution: {integrity: sha512-syvfhZzyM8kErg3VF0xpV8dixJ+RzbUaaGaeb7uDuz0D3FK97/mZ5AJQ3XNnDsXX7KkFNtyQyFrXZzQIcN49Tw==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [freebsd] - - '@parcel/watcher-linux-arm-glibc@2.5.0': - resolution: {integrity: sha512-0VQY1K35DQET3dVYWpOaPFecqOT9dbuCfzjxoQyif1Wc574t3kOSkKevULddcR9znz1TcklCE7Ht6NIxjvTqLA==} - engines: {node: '>= 10.0.0'} - cpu: [arm] - os: [linux] - - '@parcel/watcher-linux-arm-musl@2.5.0': - resolution: {integrity: sha512-6uHywSIzz8+vi2lAzFeltnYbdHsDm3iIB57d4g5oaB9vKwjb6N6dRIgZMujw4nm5r6v9/BQH0noq6DzHrqr2pA==} - engines: {node: '>= 10.0.0'} - cpu: [arm] - os: [linux] - - '@parcel/watcher-linux-arm64-glibc@2.5.0': - resolution: {integrity: sha512-BfNjXwZKxBy4WibDb/LDCriWSKLz+jJRL3cM/DllnHH5QUyoiUNEp3GmL80ZqxeumoADfCCP19+qiYiC8gUBjA==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [linux] - - '@parcel/watcher-linux-arm64-musl@2.5.0': - resolution: {integrity: sha512-S1qARKOphxfiBEkwLUbHjCY9BWPdWnW9j7f7Hb2jPplu8UZ3nes7zpPOW9bkLbHRvWM0WDTsjdOTUgW0xLBN1Q==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [linux] - - '@parcel/watcher-linux-x64-glibc@2.5.0': - resolution: {integrity: sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [linux] - - '@parcel/watcher-linux-x64-musl@2.5.0': - resolution: {integrity: sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [linux] - - '@parcel/watcher-wasm@2.5.0': - resolution: {integrity: sha512-Z4ouuR8Pfggk1EYYbTaIoxc+Yv4o7cGQnH0Xy8+pQ+HbiW+ZnwhcD2LPf/prfq1nIWpAxjOkQ8uSMFWMtBLiVQ==} - engines: {node: '>= 10.0.0'} - bundledDependencies: - - napi-wasm - - '@parcel/watcher-win32-arm64@2.5.0': - resolution: {integrity: sha512-twtft1d+JRNkM5YbmexfcH/N4znDtjgysFaV9zvZmmJezQsKpkfLYJ+JFV3uygugK6AtIM2oADPkB2AdhBrNig==} - engines: {node: '>= 10.0.0'} - cpu: [arm64] - os: [win32] - - '@parcel/watcher-win32-ia32@2.5.0': - resolution: {integrity: sha512-+rgpsNRKwo8A53elqbbHXdOMtY/tAtTzManTWShB5Kk54N8Q9mzNWV7tV+IbGueCbcj826MfWGU3mprWtuf1TA==} - engines: {node: '>= 10.0.0'} - cpu: [ia32] - os: [win32] - - '@parcel/watcher-win32-x64@2.5.0': - resolution: {integrity: sha512-lPrxve92zEHdgeff3aiu4gDOIt4u7sJYha6wbdEZDCDUhtjTsOMiaJzG5lMY4GkWH8p0fMmO2Ppq5G5XXG+DQw==} - engines: {node: '>= 10.0.0'} - cpu: [x64] - os: [win32] - - '@parcel/watcher@2.5.0': - resolution: {integrity: sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==} - engines: {node: '>= 10.0.0'} - '@paulmillr/qr@0.2.1': resolution: {integrity: sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ==} - '@safe-global/safe-apps-provider@0.18.4': - resolution: {integrity: sha512-SWYeG3gyTO6wGHMSokfHakZ9isByn2mHsM0VohIorYFFEyGGmJ89btnTm+DqDUSoQtvWAatZB7XNy6CaYMvqtg==} + '@safe-global/safe-apps-provider@0.18.5': + resolution: {integrity: sha512-9v9wjBi3TwLsEJ3C2ujYoexp3pFJ0omDLH/GX91e2QB+uwCKTBYyhxFSrTQ9qzoyQd+bfsk4gjOGW87QcJhf7g==} '@safe-global/safe-apps-sdk@9.1.0': resolution: {integrity: sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q==} @@ -497,8 +403,8 @@ packages: resolution: {integrity: sha512-tUd9srDLkRpe1BYg7we+c4UhRQkq+XQWswsr/L1xfGmoRDF47BPSXf4zE7ZU2GRBGvxtGt7lwJVAufQyQYhxTQ==} engines: {node: '>=16'} - '@solana/web3.js@1.95.8': - resolution: {integrity: sha512-sBHzNh7dHMrmNS5xPD1d0Xa2QffW/RXaxu/OysRXBfwTp+LYqGGmMtCYYwrHPrN5rjAmJCsQRNAwv4FM0t3B6g==} + '@solana/web3.js@1.98.0': + resolution: {integrity: sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA==} '@stablelib/aead@1.0.1': resolution: {integrity: sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg==} @@ -569,8 +475,8 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@22.10.1': - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + '@types/node@22.10.3': + resolution: {integrity: sha512-DifAyw4BkrufCILvD3ucnuN8eydUfc/C1GlyrnI+LK6543w5/L3VeVgf05o3B4fqSXP1dKYLOZsKfutpxPzZrw==} '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} @@ -584,18 +490,18 @@ packages: '@types/ws@8.5.13': resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} - '@wagmi/connectors@5.5.3': - resolution: {integrity: sha512-ADXcNuNtONh4PNzs5tWiYzl77P4UohXC7ozYecGvbn3Fkdk6x4tfsF9Wy3Ag5WcVbbp89MPpJ2+VK2ckBgtLAg==} + '@wagmi/connectors@5.7.3': + resolution: {integrity: sha512-i7Gk5M/Fc9gMvkVHbqw2kGtXvY8POsSY798/9I5npyglVjBddxoVk3xTYmcYTB1VIa4Fi0T2gLTHpQnpLrq1CQ==} peerDependencies: - '@wagmi/core': 2.15.2 + '@wagmi/core': 2.16.3 typescript: '>=5.0.4' viem: 2.x peerDependenciesMeta: typescript: optional: true - '@wagmi/core@2.15.2': - resolution: {integrity: sha512-4Bu1JA3HqtKvmBBsesvJ3HyqyLk69XYP0lwmG8jFqa5osfqn9iD8pvjsq5VHbIus+ZFM/UL6ydp9WWdtPNjH7w==} + '@wagmi/core@2.16.3': + resolution: {integrity: sha512-SVovoWHaQ2AIkmGf+ucNijT6AHXcTMffFcLmcFF6++y21x+ge7Gkh3UoJiU91SDDv8n08eTQ9jbyia3GEgU5jQ==} peerDependencies: '@tanstack/query-core': '>=5.0.0' typescript: '>=5.0.4' @@ -710,11 +616,6 @@ packages: zod: optional: true - acorn@8.14.0: - resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} - engines: {node: '>=0.4.0'} - hasBin: true - agentkeepalive@4.5.0: resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} @@ -808,8 +709,20 @@ packages: resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} engines: {node: '>=6.14.2'} - call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + bufferutil@4.0.9: + resolution: {integrity: sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==} + engines: {node: '>=6.14.2'} + + call-bind-apply-helpers@1.0.1: + resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==} + engines: {node: '>= 0.4'} + + call-bind@1.0.8: + resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} + engines: {node: '>= 0.4'} + + call-bound@1.0.3: + resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} engines: {node: '>= 0.4'} camelcase@5.3.1: @@ -820,13 +733,6 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} - citty@0.1.6: - resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} - - clipboardy@4.0.0: - resolution: {integrity: sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w==} - engines: {node: '>=18'} - cliui@6.0.0: resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} @@ -844,11 +750,8 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - confbox@0.1.8: - resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} - - consola@3.2.3: - resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + consola@3.3.3: + resolution: {integrity: sha512-Qil5KwghMzlqd51UXM0b6fyaGHtOC22scxrwrz4A2882LyUMwQjnvaedN1HAeXzphspQ6CpHkzMAWxBTUruDLg==} engines: {node: ^14.18.0 || >=16.10.0} cookie-es@1.2.2: @@ -862,15 +765,11 @@ packages: engines: {node: '>=0.8'} hasBin: true - cross-fetch@3.1.8: - resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} - - cross-fetch@4.0.0: - resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} + cross-fetch@3.2.0: + resolution: {integrity: sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q==} - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} + cross-fetch@4.1.0: + resolution: {integrity: sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==} crossws@0.3.1: resolution: {integrity: sha512-HsZgeVYaG+b5zA+9PbIPGq4+J/CJynJuearykPsXx4V/eMhyQ5EDVg3Ak2FBZtVXCiOLu/U7IiwDHTr9MA+IKw==} @@ -922,11 +821,6 @@ packages: detect-browser@5.3.0: resolution: {integrity: sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==} - detect-libc@1.0.3: - resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} - engines: {node: '>=0.10'} - hasBin: true - dijkstrajs@1.0.3: resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==} @@ -934,11 +828,15 @@ packages: resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + duplexify@4.1.3: resolution: {integrity: sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==} - eciesjs@0.4.12: - resolution: {integrity: sha512-DGejvMCihsRAmKRFQiL6KZDE34vWVd0gvXlykFq1aEzJy/rD65AVyAIUZKZOvgvaP9ATQRcHGEZV5DfgrgjA4w==} + eciesjs@0.4.13: + resolution: {integrity: sha512-zBdtR4K+wbj10bWPpIOF9DW+eFYQu8miU5ypunh0t4Bvt83ZPlEWgT5Dq/0G6uwEXumZKjfb5BZxYUZQ2Hzn/Q==} engines: {bun: '>=1', deno: '>=2', node: '>=16'} elliptic@6.6.1: @@ -960,14 +858,18 @@ packages: resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==} engines: {node: '>=10.0.0'} - es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} engines: {node: '>= 0.4'} es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es-object-atoms@1.0.0: + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} + es6-promise@4.2.8: resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} @@ -1009,10 +911,6 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - execa@8.0.1: - resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} - engines: {node: '>=16.17'} - extension-port-stream@3.0.0: resolution: {integrity: sha512-an2S5quJMiy5bnZKEf6AkfH/7r8CzHvhchU40gxN+OM6HPhe7Z9T1FUychcf2M9PpPOO0Hf7BAEfJkw2TDIBDw==} engines: {node: '>=12.0.0'} @@ -1064,17 +962,10 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + get-intrinsic@1.2.6: + resolution: {integrity: sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==} engines: {node: '>= 0.4'} - get-port-please@3.1.2: - resolution: {integrity: sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ==} - - get-stream@8.0.1: - resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} - engines: {node: '>=16'} - get-tsconfig@4.8.1: resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} @@ -1082,8 +973,8 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - gopd@1.1.0: - resolution: {integrity: sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} h3@1.13.0: @@ -1092,10 +983,6 @@ packages: has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} - has-proto@1.1.0: - resolution: {integrity: sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==} - engines: {node: '>= 0.4'} - has-symbols@1.1.0: resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} @@ -1117,14 +1004,6 @@ packages: hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} - http-shutdown@1.2.2: - resolution: {integrity: sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw==} - engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - - human-signals@5.0.0: - resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} - engines: {node: '>=16.17.0'} - humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} @@ -1140,8 +1019,8 @@ packages: iron-webcrypto@1.2.1: resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} - is-arguments@1.1.1: - resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + is-arguments@1.2.0: + resolution: {integrity: sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==} engines: {node: '>= 0.4'} is-binary-path@2.1.0: @@ -1152,11 +1031,6 @@ packages: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - is-docker@3.0.0: - resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - hasBin: true - is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -1173,11 +1047,6 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} - is-inside-container@1.0.0: - resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} - engines: {node: '>=14.16'} - hasBin: true - is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -1186,28 +1055,13 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - is-stream@3.0.0: - resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - is-typed-array@1.1.13: - resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + is-typed-array@1.1.15: + resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} engines: {node: '>= 0.4'} - is-wsl@3.1.0: - resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} - engines: {node: '>=16'} - - is64bit@2.0.0: - resolution: {integrity: sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw==} - engines: {node: '>=18'} - isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - isomorphic-ws@4.0.1: resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} peerDependencies: @@ -1223,13 +1077,6 @@ packages: engines: {node: '>=8'} hasBin: true - jiti@2.4.1: - resolution: {integrity: sha512-yPBThwecp1wS9DmoA4x4KR2h3QoslacnDR8ypuFM962kI4/456Iy1oHx2RAgh4jfZNdn0bctsdadceiBUgpU1g==} - hasBin: true - - js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - json-rpc-engine@6.1.0: resolution: {integrity: sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==} engines: {node: '>=10.0.0'} @@ -1251,10 +1098,6 @@ packages: keyvaluestorage-interface@1.0.0: resolution: {integrity: sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g==} - listhen@1.9.0: - resolution: {integrity: sha512-I8oW2+QL5KJo8zXNWX046M134WchxsXC7SawLPvRQpogCbkyQIaFxPE89A2HiwR7vAK2Dm2ERBAmyjTYGYEpBg==} - hasBin: true - lit-element@3.3.3: resolution: {integrity: sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==} @@ -1271,32 +1114,21 @@ packages: lodash.isequal@4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - loose-envify@1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true - lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} micro-ftch@0.3.1: resolution: {integrity: sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==} - micromatch@4.0.8: - resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} - engines: {node: '>=8.6'} - mime@3.0.0: resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} engines: {node: '>=10.0.0'} hasBin: true - mimic-fn@4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} - minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} @@ -1311,9 +1143,6 @@ packages: typescript: optional: true - mlly@1.7.3: - resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} - motion@10.16.2: resolution: {integrity: sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ==} @@ -1326,9 +1155,6 @@ packages: node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} - node-addon-api@7.1.1: - resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} - node-fetch-native@1.6.4: resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} @@ -1341,10 +1167,6 @@ packages: encoding: optional: true - node-forge@1.3.1: - resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} - engines: {node: '>= 6.13.0'} - node-gyp-build@4.8.4: resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} hasBin: true @@ -1353,10 +1175,6 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - npm-run-path@5.3.0: - resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - obj-multiplex@1.0.0: resolution: {integrity: sha512-0GNJAOsHoBHeNTvl5Vt6IWnpUEcc3uSRxzBri7EDyIcMgYvnY2JL2qdeV5zTMjWQX5OHcD5amcW2HFfDh0gjIA==} @@ -1372,12 +1190,8 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - onetime@6.0.0: - resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} - engines: {node: '>=12'} - - ox@0.1.2: - resolution: {integrity: sha512-ak/8K0Rtphg9vnRJlbOdaX9R7cmxD2MiSthjWGaQdMk3D7hrAlDoM+6Lxn7hN52Za3vrXfZ7enfke/5WjolDww==} + ox@0.6.0: + resolution: {integrity: sha512-blUzTLidvUlshv0O02CnLFqBLidNzPoAZdIth894avUAotTuWziznv6IENv5idRuOSSP3dH8WzcYw84zVdu0Aw==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: @@ -1400,14 +1214,6 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - path-key@4.0.0: - resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} - engines: {node: '>=12'} - pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -1433,9 +1239,6 @@ packages: resolution: {integrity: sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==} hasBin: true - pkg-types@1.2.1: - resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==} - pngjs@5.0.0: resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} engines: {node: '>=10.13.0'} @@ -1448,8 +1251,8 @@ packages: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} - preact@10.25.1: - resolution: {integrity: sha512-frxeZV2vhQSohQwJ7FvlqC40ze89+8friponWUFeVEkaCfhC6Eu4V0iND5C9CXz8JLndV07QRDeXzH1+Anz5Og==} + preact@10.25.4: + resolution: {integrity: sha512-jLdZDb+Q+odkHJ+MpW/9U5cODzqnB+fy2EiHSZES7ldV5LK7yjlVzTp7R8Xy6W6y75kfK8iWYtFVH7lvjwrCMA==} process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} @@ -1478,10 +1281,6 @@ packages: radix3@1.1.2: resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} - react@18.3.1: - resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} - engines: {node: '>=0.10.0'} - readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} @@ -1539,18 +1338,6 @@ packages: resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} hasBin: true - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - socket.io-client@4.8.1: resolution: {integrity: sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==} engines: {node: '>=10.0.0'} @@ -1570,9 +1357,6 @@ packages: resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} engines: {node: '>= 10.x'} - std-env@3.8.0: - resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} - stream-shift@1.0.3: resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} @@ -1594,10 +1378,6 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} - strip-final-newline@3.0.0: - resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} - engines: {node: '>=12'} - superstruct@1.0.4: resolution: {integrity: sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==} engines: {node: '>=14.0.0'} @@ -1606,10 +1386,6 @@ packages: resolution: {integrity: sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==} engines: {node: '>=14.0.0'} - system-architecture@0.1.0: - resolution: {integrity: sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==} - engines: {node: '>=18'} - text-encoding-utf-8@1.0.2: resolution: {integrity: sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==} @@ -1665,22 +1441,27 @@ packages: unenv@1.10.0: resolution: {integrity: sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ==} - unstorage@1.13.1: - resolution: {integrity: sha512-ELexQHUrG05QVIM/iUeQNdl9FXDZhqLJ4yP59fnmn2jGUh0TEulwOgov1ubOb3Gt2ZGK/VMchJwPDNVEGWQpRg==} + unstorage@1.14.4: + resolution: {integrity: sha512-1SYeamwuYeQJtJ/USE1x4l17LkmQBzg7deBJ+U9qOBoHo15d1cDxG4jM31zKRgF7pG0kirZy4wVMX6WL6Zoscg==} peerDependencies: - '@azure/app-configuration': ^1.7.0 - '@azure/cosmos': ^4.1.1 - '@azure/data-tables': ^13.2.2 + '@azure/app-configuration': ^1.8.0 + '@azure/cosmos': ^4.2.0 + '@azure/data-tables': ^13.3.0 '@azure/identity': ^4.5.0 '@azure/keyvault-secrets': ^4.9.0 - '@azure/storage-blob': ^12.25.0 - '@capacitor/preferences': ^6.0.2 + '@azure/storage-blob': ^12.26.0 + '@capacitor/preferences': ^6.0.3 + '@deno/kv': '>=0.8.4' '@netlify/blobs': ^6.5.0 || ^7.0.0 || ^8.1.0 '@planetscale/database': ^1.19.0 '@upstash/redis': ^1.34.3 + '@vercel/blob': '>=0.27.0' '@vercel/kv': ^1.0.1 + aws4fetch: ^1.0.20 + db0: '>=0.2.1' idb-keyval: ^6.2.1 - ioredis: ^5.4.1 + ioredis: ^5.4.2 + uploadthing: ^7.4.1 peerDependenciesMeta: '@azure/app-configuration': optional: true @@ -1696,25 +1477,28 @@ packages: optional: true '@capacitor/preferences': optional: true + '@deno/kv': + optional: true '@netlify/blobs': optional: true '@planetscale/database': optional: true '@upstash/redis': optional: true + '@vercel/blob': + optional: true '@vercel/kv': optional: true + aws4fetch: + optional: true + db0: + optional: true idb-keyval: optional: true ioredis: optional: true - - untun@0.1.3: - resolution: {integrity: sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ==} - hasBin: true - - uqr@0.1.2: - resolution: {integrity: sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA==} + uploadthing: + optional: true use-sync-external-store@1.2.0: resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} @@ -1762,8 +1546,8 @@ packages: varuint-bitcoin@2.0.0: resolution: {integrity: sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==} - viem@2.21.54: - resolution: {integrity: sha512-G9mmtbua3UtnVY9BqAtWdNp+3AO+oWhD0B9KaEsZb6gcrOWgmA4rz02yqEMg+qW9m6KgKGie7q3zcHqJIw6AqA==} + viem@2.22.1: + resolution: {integrity: sha512-Dlul3ps87ErRSlAVuLQXQjquk0ECy/BCKATEErwHkVd0KQZvj80T5BUU0cDABo4axNF3+78Q060y6VFiT0+SqQ==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -1785,15 +1569,10 @@ packages: which-module@2.0.1: resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} - which-typed-array@1.1.16: - resolution: {integrity: sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==} + which-typed-array@1.1.18: + resolution: {integrity: sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==} engines: {node: '>= 0.4'} - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -1882,13 +1661,18 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 - '@bigmi/core@0.0.5(bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2))(bs58@6.0.0)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@bigmi/core@0.0.7(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)': dependencies: '@noble/hashes': 1.6.1 bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.2) bs58: 6.0.0 - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + viem: 2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod '@coinbase/wallet-sdk@3.9.3': dependencies: @@ -1899,7 +1683,7 @@ snapshots: eth-json-rpc-filters: 6.0.1 eventemitter3: 5.0.1 keccak: 3.0.4 - preact: 10.25.1 + preact: 10.25.4 sha.js: 2.4.11 transitivePeerDependencies: - supports-color @@ -1909,7 +1693,7 @@ snapshots: '@noble/hashes': 1.6.1 clsx: 1.2.1 eventemitter3: 5.0.1 - preact: 10.25.1 + preact: 10.25.4 '@ecies/ciphers@0.2.2(@noble/ciphers@1.1.3)': dependencies: @@ -2007,26 +1791,30 @@ snapshots: ethereum-cryptography: 2.2.1 micro-ftch: 0.3.1 - '@lifi/data-types@5.16.0': + '@lifi/data-types@5.19.0': dependencies: - '@lifi/types': 16.4.0 + '@lifi/types': 16.5.0 - '@lifi/sdk@3.4.2(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)))(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(typescript@5.7.2)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@lifi/sdk@3.4.4(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: - '@bigmi/core': 0.0.5(bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2))(bs58@6.0.0)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) - '@lifi/types': 16.4.0 + '@bigmi/core': 0.0.7(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + '@lifi/types': 16.5.0 '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 - '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.2) bs58: 6.0.0 - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + viem: 2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) transitivePeerDependencies: + - bufferutil + - encoding - typescript + - utf-8-validate + - zod - '@lifi/types@16.4.0': {} + '@lifi/types@16.5.0': {} '@lit-labs/ssr-dom-shim@1.2.1': {} @@ -2104,43 +1892,43 @@ snapshots: '@metamask/safe-event-emitter@3.1.2': {} - '@metamask/sdk-communication-layer@0.31.0(cross-fetch@4.0.0)(eciesjs@0.4.12)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + '@metamask/sdk-communication-layer@0.31.0(cross-fetch@4.1.0)(eciesjs@0.4.13)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: - bufferutil: 4.0.8 - cross-fetch: 4.0.0 + bufferutil: 4.0.9 + cross-fetch: 4.1.0 date-fns: 2.30.0 - debug: 4.3.7 - eciesjs: 0.4.12 + debug: 4.4.0 + eciesjs: 0.4.13 eventemitter2: 6.4.9 readable-stream: 3.6.2 - socket.io-client: 4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + socket.io-client: 4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) utf-8-validate: 5.0.10 uuid: 8.3.2 transitivePeerDependencies: - supports-color - '@metamask/sdk-install-modal-web@0.31.1': + '@metamask/sdk-install-modal-web@0.31.2': dependencies: '@paulmillr/qr': 0.2.1 - '@metamask/sdk@0.31.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@metamask/sdk@0.31.4(bufferutil@4.0.9)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 '@metamask/onboarding': 1.0.1 '@metamask/providers': 16.1.0 - '@metamask/sdk-communication-layer': 0.31.0(cross-fetch@4.0.0)(eciesjs@0.4.12)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@metamask/sdk-install-modal-web': 0.31.1 + '@metamask/sdk-communication-layer': 0.31.0(cross-fetch@4.1.0)(eciesjs@0.4.13)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@metamask/sdk-install-modal-web': 0.31.2 '@paulmillr/qr': 0.2.1 bowser: 2.11.0 - cross-fetch: 4.0.0 - debug: 4.3.7 - eciesjs: 0.4.12 + cross-fetch: 4.1.0 + debug: 4.4.0 + eciesjs: 0.4.13 eth-rpc-errors: 4.0.3 eventemitter2: 6.4.9 obj-multiplex: 1.0.0 pump: 3.0.2 readable-stream: 3.6.2 - socket.io-client: 4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + socket.io-client: 4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) tslib: 2.8.1 util: 0.12.5 uuid: 8.3.2 @@ -2169,7 +1957,7 @@ snapshots: '@noble/hashes': 1.6.1 '@scure/base': 1.2.1 '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.4.0 pony-cause: 2.1.11 semver: 7.6.3 uuid: 9.0.1 @@ -2183,7 +1971,7 @@ snapshots: '@noble/hashes': 1.6.1 '@scure/base': 1.2.1 '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.4.0 pony-cause: 2.1.11 semver: 7.6.3 uuid: 9.0.1 @@ -2251,76 +2039,11 @@ snapshots: '@noble/hashes@1.6.1': {} - '@parcel/watcher-android-arm64@2.5.0': - optional: true - - '@parcel/watcher-darwin-arm64@2.5.0': - optional: true - - '@parcel/watcher-darwin-x64@2.5.0': - optional: true - - '@parcel/watcher-freebsd-x64@2.5.0': - optional: true - - '@parcel/watcher-linux-arm-glibc@2.5.0': - optional: true - - '@parcel/watcher-linux-arm-musl@2.5.0': - optional: true - - '@parcel/watcher-linux-arm64-glibc@2.5.0': - optional: true - - '@parcel/watcher-linux-arm64-musl@2.5.0': - optional: true - - '@parcel/watcher-linux-x64-glibc@2.5.0': - optional: true - - '@parcel/watcher-linux-x64-musl@2.5.0': - optional: true - - '@parcel/watcher-wasm@2.5.0': - dependencies: - is-glob: 4.0.3 - micromatch: 4.0.8 - - '@parcel/watcher-win32-arm64@2.5.0': - optional: true - - '@parcel/watcher-win32-ia32@2.5.0': - optional: true - - '@parcel/watcher-win32-x64@2.5.0': - optional: true - - '@parcel/watcher@2.5.0': - dependencies: - detect-libc: 1.0.3 - is-glob: 4.0.3 - micromatch: 4.0.8 - node-addon-api: 7.1.1 - optionalDependencies: - '@parcel/watcher-android-arm64': 2.5.0 - '@parcel/watcher-darwin-arm64': 2.5.0 - '@parcel/watcher-darwin-x64': 2.5.0 - '@parcel/watcher-freebsd-x64': 2.5.0 - '@parcel/watcher-linux-arm-glibc': 2.5.0 - '@parcel/watcher-linux-arm-musl': 2.5.0 - '@parcel/watcher-linux-arm64-glibc': 2.5.0 - '@parcel/watcher-linux-arm64-musl': 2.5.0 - '@parcel/watcher-linux-x64-glibc': 2.5.0 - '@parcel/watcher-linux-x64-musl': 2.5.0 - '@parcel/watcher-win32-arm64': 2.5.0 - '@parcel/watcher-win32-ia32': 2.5.0 - '@parcel/watcher-win32-x64': 2.5.0 - '@paulmillr/qr@0.2.1': {} - '@safe-global/safe-apps-provider@0.18.4(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)': + '@safe-global/safe-apps-provider@0.18.5(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)': dependencies: - '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) events: 3.3.0 transitivePeerDependencies: - bufferutil @@ -2328,10 +2051,10 @@ snapshots: - utf-8-validate - zod - '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)': + '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)': dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.22.4 - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + viem: 2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript @@ -2372,10 +2095,10 @@ snapshots: dependencies: buffer: 6.0.3 - '@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + '@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/wallet-standard-features': 1.2.0 - '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@wallet-standard/base': 1.1.0 '@wallet-standard/features': 1.1.0 eventemitter3: 4.0.7 @@ -2385,7 +2108,7 @@ snapshots: '@wallet-standard/base': 1.1.0 '@wallet-standard/features': 1.1.0 - '@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 '@noble/curves': 1.7.0 @@ -2398,7 +2121,7 @@ snapshots: bs58: 4.0.1 buffer: 6.0.3 fast-stable-stringify: 1.0.0 - jayson: 4.1.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + jayson: 4.1.3(bufferutil@4.0.9)(utf-8-validate@5.0.10) node-fetch: 2.7.0 rpc-websockets: 9.0.4 superstruct: 2.0.2 @@ -2493,7 +2216,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.3 '@types/debug@4.1.12': dependencies: @@ -2503,7 +2226,7 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@22.10.1': + '@types/node@22.10.3': dependencies: undici-types: 6.20.0 @@ -2513,22 +2236,22 @@ snapshots: '@types/ws@7.4.7': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.3 '@types/ws@8.5.13': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.3 - '@wagmi/connectors@5.5.3(@wagmi/core@2.15.2(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(react@18.3.1)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@wagmi/connectors@5.7.3(@wagmi/core@2.16.3(typescript@5.7.2)(use-sync-external-store@1.2.0)(viem@2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: '@coinbase/wallet-sdk': 4.2.3 - '@metamask/sdk': 0.31.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@safe-global/safe-apps-provider': 0.18.4(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) - '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) - '@wagmi/core': 2.15.2(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) - '@walletconnect/ethereum-provider': 2.17.0(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + '@metamask/sdk': 0.31.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-provider': 0.18.5(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + '@wagmi/core': 2.16.3(typescript@5.7.2)(use-sync-external-store@1.2.0)(viem@2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)) + '@walletconnect/ethereum-provider': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) cbw-sdk: '@coinbase/wallet-sdk@3.9.3' - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + viem: 2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -2539,26 +2262,31 @@ snapshots: - '@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/core@2.15.2(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@wagmi/core@2.16.3(typescript@5.7.2)(use-sync-external-store@1.2.0)(viem@2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.7.2) - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) - zustand: 5.0.0(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)) + viem: 2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + zustand: 5.0.0(use-sync-external-store@1.2.0) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -2573,13 +2301,13 @@ snapshots: dependencies: '@wallet-standard/base': 1.1.0 - '@walletconnect/core@2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@walletconnect/core@2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': dependencies: '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-provider': 1.0.14 '@walletconnect/jsonrpc-types': 1.0.4 '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/jsonrpc-ws-connection': 1.0.14(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@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 @@ -2599,29 +2327,34 @@ snapshots: - '@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 - ioredis + - uploadthing - utf-8-validate '@walletconnect/environment@1.0.1': dependencies: tslib: 1.14.1 - '@walletconnect/ethereum-provider@2.17.0(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10)': + '@walletconnect/ethereum-provider@2.17.0(bufferutil@4.0.9)(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.7.0(react@18.3.1) - '@walletconnect/sign-client': 2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/modal': 2.7.0 + '@walletconnect/sign-client': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@walletconnect/types': 2.17.0 - '@walletconnect/universal-provider': 2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/universal-provider': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@walletconnect/utils': 2.17.0 events: 3.3.0 transitivePeerDependencies: @@ -2632,16 +2365,21 @@ snapshots: - '@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/events@1.0.1': @@ -2659,7 +2397,7 @@ snapshots: dependencies: '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/safe-json': 1.0.2 - cross-fetch: 3.1.8 + cross-fetch: 3.2.0 events: 3.3.0 transitivePeerDependencies: - encoding @@ -2681,12 +2419,12 @@ snapshots: '@walletconnect/jsonrpc-types': 1.0.4 tslib: 1.14.1 - '@walletconnect/jsonrpc-ws-connection@1.0.14(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@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.8)(utf-8-validate@5.0.10) + ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -2695,7 +2433,7 @@ snapshots: dependencies: '@walletconnect/safe-json': 1.0.2 idb-keyval: 6.2.1 - unstorage: 1.13.1(idb-keyval@6.2.1) + unstorage: 1.14.4(idb-keyval@6.2.1) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -2704,27 +2442,32 @@ snapshots: - '@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/logger@2.1.2': dependencies: '@walletconnect/safe-json': 1.0.2 pino: 7.11.0 - '@walletconnect/modal-core@2.7.0(react@18.3.1)': + '@walletconnect/modal-core@2.7.0': dependencies: - valtio: 1.11.2(react@18.3.1) + valtio: 1.11.2 transitivePeerDependencies: - '@types/react' - react - '@walletconnect/modal-ui@2.7.0(react@18.3.1)': + '@walletconnect/modal-ui@2.7.0': dependencies: - '@walletconnect/modal-core': 2.7.0(react@18.3.1) + '@walletconnect/modal-core': 2.7.0 lit: 2.8.0 motion: 10.16.2 qrcode: 1.5.3 @@ -2732,10 +2475,10 @@ snapshots: - '@types/react' - react - '@walletconnect/modal@2.7.0(react@18.3.1)': + '@walletconnect/modal@2.7.0': dependencies: - '@walletconnect/modal-core': 2.7.0(react@18.3.1) - '@walletconnect/modal-ui': 2.7.0(react@18.3.1) + '@walletconnect/modal-core': 2.7.0 + '@walletconnect/modal-ui': 2.7.0 transitivePeerDependencies: - '@types/react' - react @@ -2757,9 +2500,9 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/sign-client@2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@walletconnect/sign-client@2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': dependencies: - '@walletconnect/core': 2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/core': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.2 '@walletconnect/jsonrpc-utils': 1.0.8 @@ -2776,13 +2519,18 @@ snapshots: - '@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 - ioredis + - uploadthing - utf-8-validate '@walletconnect/time@1.0.2': @@ -2805,21 +2553,26 @@ snapshots: - '@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/universal-provider@2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@walletconnect/universal-provider@2.17.0(bufferutil@4.0.9)(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/logger': 2.1.2 - '@walletconnect/sign-client': 2.17.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/sign-client': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@walletconnect/types': 2.17.0 '@walletconnect/utils': 2.17.0 events: 3.3.0 @@ -2831,14 +2584,19 @@ snapshots: - '@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/utils@2.17.0': @@ -2867,12 +2625,17 @@ snapshots: - '@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/window-getters@1.0.1': dependencies: @@ -2892,8 +2655,6 @@ snapshots: optionalDependencies: typescript: 5.7.2 - acorn@8.14.0: {} - agentkeepalive@4.5.0: dependencies: humanize-ms: 1.2.1 @@ -2995,15 +2756,29 @@ snapshots: bufferutil@4.0.8: dependencies: node-gyp-build: 4.8.4 + optional: true - call-bind@1.0.7: + bufferutil@4.0.9: + dependencies: + node-gyp-build: 4.8.4 + + call-bind-apply-helpers@1.0.1: dependencies: - es-define-property: 1.0.0 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.4 + + call-bind@1.0.8: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.1 + get-intrinsic: 1.2.6 set-function-length: 1.2.2 + call-bound@1.0.3: + dependencies: + call-bind-apply-helpers: 1.0.1 + get-intrinsic: 1.2.6 + camelcase@5.3.1: {} chokidar@3.6.0: @@ -3018,16 +2793,6 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - citty@0.1.6: - dependencies: - consola: 3.2.3 - - clipboardy@4.0.0: - dependencies: - execa: 8.0.1 - is-wsl: 3.1.0 - is64bit: 2.0.0 - cliui@6.0.0: dependencies: string-width: 4.2.3 @@ -3044,9 +2809,7 @@ snapshots: commander@2.20.3: {} - confbox@0.1.8: {} - - consola@3.2.3: {} + consola@3.3.3: {} cookie-es@1.2.2: {} @@ -3054,24 +2817,18 @@ snapshots: crc-32@1.2.2: {} - cross-fetch@3.1.8: + cross-fetch@3.2.0: dependencies: node-fetch: 2.7.0 transitivePeerDependencies: - encoding - cross-fetch@4.0.0: + cross-fetch@4.1.0: dependencies: node-fetch: 2.7.0 transitivePeerDependencies: - encoding - cross-spawn@7.0.6: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - crossws@0.3.1: dependencies: uncrypto: 0.1.3 @@ -3094,9 +2851,9 @@ snapshots: define-data-property@1.1.4: dependencies: - es-define-property: 1.0.0 + es-define-property: 1.0.1 es-errors: 1.3.0 - gopd: 1.1.0 + gopd: 1.2.0 defu@6.1.4: {} @@ -3106,12 +2863,16 @@ snapshots: detect-browser@5.3.0: {} - detect-libc@1.0.3: {} - dijkstrajs@1.0.3: {} dotenv@16.4.7: {} + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + duplexify@4.1.3: dependencies: end-of-stream: 1.4.4 @@ -3119,7 +2880,7 @@ snapshots: readable-stream: 3.6.2 stream-shift: 1.0.3 - eciesjs@0.4.12: + eciesjs@0.4.13: dependencies: '@ecies/ciphers': 0.2.2(@noble/ciphers@1.1.3) '@noble/ciphers': 1.1.3 @@ -3144,12 +2905,12 @@ snapshots: dependencies: once: 1.4.0 - engine.io-client@6.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): + engine.io-client@6.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10): dependencies: '@socket.io/component-emitter': 3.1.2 debug: 4.3.7 engine.io-parser: 5.2.3 - ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.17.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) xmlhttprequest-ssl: 2.1.2 transitivePeerDependencies: - bufferutil @@ -3158,12 +2919,14 @@ snapshots: engine.io-parser@5.2.3: {} - es-define-property@1.0.0: - dependencies: - get-intrinsic: 1.2.4 + es-define-property@1.0.1: {} es-errors@1.3.0: {} + es-object-atoms@1.0.0: + dependencies: + es-errors: 1.3.0 + es6-promise@4.2.8: {} es6-promisify@5.0.0: @@ -3239,18 +3002,6 @@ snapshots: events@3.3.0: {} - execa@8.0.1: - dependencies: - cross-spawn: 7.0.6 - get-stream: 8.0.1 - human-signals: 5.0.0 - is-stream: 3.0.0 - merge-stream: 2.0.0 - npm-run-path: 5.3.0 - onetime: 6.0.0 - signal-exit: 4.1.0 - strip-final-newline: 3.0.0 - extension-port-stream@3.0.0: dependencies: readable-stream: 3.6.2 @@ -3290,17 +3041,18 @@ snapshots: get-caller-file@2.0.5: {} - get-intrinsic@1.2.4: + get-intrinsic@1.2.6: dependencies: + call-bind-apply-helpers: 1.0.1 + dunder-proto: 1.0.1 + es-define-property: 1.0.1 es-errors: 1.3.0 + es-object-atoms: 1.0.0 function-bind: 1.1.2 - has-proto: 1.1.0 + gopd: 1.2.0 has-symbols: 1.1.0 hasown: 2.0.2 - - get-port-please@3.1.2: {} - - get-stream@8.0.1: {} + math-intrinsics: 1.1.0 get-tsconfig@4.8.1: dependencies: @@ -3310,9 +3062,7 @@ snapshots: dependencies: is-glob: 4.0.3 - gopd@1.1.0: - dependencies: - get-intrinsic: 1.2.4 + gopd@1.2.0: {} h3@1.13.0: dependencies: @@ -3329,11 +3079,7 @@ snapshots: has-property-descriptors@1.0.2: dependencies: - es-define-property: 1.0.0 - - has-proto@1.1.0: - dependencies: - call-bind: 1.0.7 + es-define-property: 1.0.1 has-symbols@1.1.0: {} @@ -3358,10 +3104,6 @@ snapshots: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - http-shutdown@1.2.2: {} - - human-signals@5.0.0: {} - humanize-ms@1.2.1: dependencies: ms: 2.1.3 @@ -3374,9 +3116,9 @@ snapshots: iron-webcrypto@1.2.1: {} - is-arguments@1.1.1: + is-arguments@1.2.0: dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 has-tostringtag: 1.0.2 is-binary-path@2.1.0: @@ -3385,8 +3127,6 @@ snapshots: is-callable@1.2.7: {} - is-docker@3.0.0: {} - is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -3399,41 +3139,25 @@ snapshots: dependencies: is-extglob: 2.1.1 - is-inside-container@1.0.0: - dependencies: - is-docker: 3.0.0 - is-number@7.0.0: {} is-stream@2.0.1: {} - is-stream@3.0.0: {} - - is-typed-array@1.1.13: - dependencies: - which-typed-array: 1.1.16 - - is-wsl@3.1.0: + is-typed-array@1.1.15: dependencies: - is-inside-container: 1.0.0 - - is64bit@2.0.0: - dependencies: - system-architecture: 0.1.0 + which-typed-array: 1.1.18 isarray@1.0.0: {} - isexe@2.0.0: {} - - isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10)): dependencies: - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) - isows@1.0.6(ws@8.18.0(bufferutil@4.0.8)(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.8)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) - jayson@4.1.3(bufferutil@4.0.8)(utf-8-validate@5.0.10): + jayson@4.1.3(bufferutil@4.0.9)(utf-8-validate@5.0.10): dependencies: '@types/connect': 3.4.38 '@types/node': 12.20.55 @@ -3443,18 +3167,14 @@ snapshots: delay: 5.0.0 es6-promisify: 5.0.0 eyes: 0.1.8 - isomorphic-ws: 4.0.1(ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + isomorphic-ws: 4.0.1(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10)) json-stringify-safe: 5.0.1 uuid: 8.3.2 - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate - jiti@2.4.1: {} - - js-tokens@4.0.0: {} - json-rpc-engine@6.1.0: dependencies: '@metamask/safe-event-emitter': 2.0.0 @@ -3474,27 +3194,6 @@ snapshots: keyvaluestorage-interface@1.0.0: {} - listhen@1.9.0: - dependencies: - '@parcel/watcher': 2.5.0 - '@parcel/watcher-wasm': 2.5.0 - citty: 0.1.6 - clipboardy: 4.0.0 - consola: 3.2.3 - crossws: 0.3.1 - defu: 6.1.4 - get-port-please: 3.1.2 - h3: 1.13.0 - http-shutdown: 1.2.2 - jiti: 2.4.1 - mlly: 1.7.3 - node-forge: 1.3.1 - pathe: 1.1.2 - std-env: 3.8.0 - ufo: 1.5.4 - untun: 0.1.3 - uqr: 0.1.2 - lit-element@3.3.3: dependencies: '@lit-labs/ssr-dom-shim': 1.2.1 @@ -3517,25 +3216,14 @@ snapshots: lodash.isequal@4.5.0: {} - loose-envify@1.4.0: - dependencies: - js-tokens: 4.0.0 - lru-cache@10.4.3: {} - merge-stream@2.0.0: {} + math-intrinsics@1.1.0: {} micro-ftch@0.3.1: {} - micromatch@4.0.8: - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - mime@3.0.0: {} - mimic-fn@4.0.0: {} - minimalistic-assert@1.0.1: {} minimalistic-crypto-utils@1.0.1: {} @@ -3544,13 +3232,6 @@ snapshots: optionalDependencies: typescript: 5.7.2 - mlly@1.7.3: - dependencies: - acorn: 8.14.0 - pathe: 1.1.2 - pkg-types: 1.2.1 - ufo: 1.5.4 - motion@10.16.2: dependencies: '@motionone/animation': 10.18.0 @@ -3566,24 +3247,16 @@ snapshots: node-addon-api@2.0.2: {} - node-addon-api@7.1.1: {} - node-fetch-native@1.6.4: {} node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 - node-forge@1.3.1: {} - node-gyp-build@4.8.4: {} normalize-path@3.0.0: {} - npm-run-path@5.3.0: - dependencies: - path-key: 4.0.0 - obj-multiplex@1.0.0: dependencies: end-of-stream: 1.4.4 @@ -3604,11 +3277,7 @@ snapshots: dependencies: wrappy: 1.0.2 - onetime@6.0.0: - dependencies: - mimic-fn: 4.0.0 - - ox@0.1.2(typescript@5.7.2): + ox@0.6.0(typescript@5.7.2): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.7.0 @@ -3634,10 +3303,6 @@ snapshots: path-exists@4.0.0: {} - path-key@3.1.1: {} - - path-key@4.0.0: {} - pathe@1.1.2: {} picomatch@2.3.1: {} @@ -3667,19 +3332,13 @@ snapshots: sonic-boom: 2.8.0 thread-stream: 0.15.2 - pkg-types@1.2.1: - dependencies: - confbox: 0.1.8 - mlly: 1.7.3 - pathe: 1.1.2 - pngjs@5.0.0: {} pony-cause@2.1.11: {} possible-typed-array-names@1.0.0: {} - preact@10.25.1: {} + preact@10.25.4: {} process-nextick-args@2.0.1: {} @@ -3710,10 +3369,6 @@ snapshots: radix3@1.1.2: {} - react@18.3.1: - dependencies: - loose-envify: 1.4.0 - readable-stream@2.3.8: dependencies: core-util-is: 1.0.3 @@ -3772,8 +3427,8 @@ snapshots: define-data-property: 1.1.4 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.4 - gopd: 1.1.0 + get-intrinsic: 1.2.6 + gopd: 1.2.0 has-property-descriptors: 1.0.2 sha.js@2.4.11: @@ -3781,19 +3436,11 @@ snapshots: inherits: 2.0.4 safe-buffer: 5.2.1 - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@3.0.0: {} - - signal-exit@4.1.0: {} - - socket.io-client@4.8.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): + socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): dependencies: '@socket.io/component-emitter': 3.1.2 debug: 4.3.7 - engine.io-client: 6.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + engine.io-client: 6.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) socket.io-parser: 4.2.4 transitivePeerDependencies: - bufferutil @@ -3815,8 +3462,6 @@ snapshots: split2@4.2.0: {} - std-env@3.8.0: {} - stream-shift@1.0.3: {} strict-uri-encode@2.0.0: {} @@ -3839,14 +3484,10 @@ snapshots: dependencies: ansi-regex: 5.0.1 - strip-final-newline@3.0.0: {} - superstruct@1.0.4: {} superstruct@2.0.2: {} - system-architecture@0.1.0: {} - text-encoding-utf-8@1.0.2: {} thread-stream@0.15.2: @@ -3890,20 +3531,18 @@ snapshots: unenv@1.10.0: dependencies: - consola: 3.2.3 + consola: 3.3.3 defu: 6.1.4 mime: 3.0.0 node-fetch-native: 1.6.4 pathe: 1.1.2 - unstorage@1.13.1(idb-keyval@6.2.1): + unstorage@1.14.4(idb-keyval@6.2.1): dependencies: anymatch: 3.1.3 chokidar: 3.6.0 - citty: 0.1.6 destr: 2.0.3 h3: 1.13.0 - listhen: 1.9.0 lru-cache: 10.4.3 node-fetch-native: 1.6.4 ofetch: 1.4.1 @@ -3911,17 +3550,7 @@ snapshots: optionalDependencies: idb-keyval: 6.2.1 - untun@0.1.3: - dependencies: - citty: 0.1.6 - consola: 3.2.3 - pathe: 1.1.2 - - uqr@0.1.2: {} - - use-sync-external-store@1.2.0(react@18.3.1): - dependencies: - react: 18.3.1 + use-sync-external-store@1.2.0: {} utf-8-validate@5.0.10: dependencies: @@ -3932,10 +3561,10 @@ snapshots: util@0.12.5: dependencies: inherits: 2.0.4 - is-arguments: 1.1.1 + is-arguments: 1.2.0 is-generator-function: 1.0.10 - is-typed-array: 1.1.13 - which-typed-array: 1.1.16 + is-typed-array: 1.1.15 + which-typed-array: 1.1.18 uuid@8.3.2: {} @@ -3945,28 +3574,26 @@ snapshots: optionalDependencies: typescript: 5.7.2 - valtio@1.11.2(react@18.3.1): + valtio@1.11.2: dependencies: proxy-compare: 2.5.1 - use-sync-external-store: 1.2.0(react@18.3.1) - optionalDependencies: - react: 18.3.1 + use-sync-external-store: 1.2.0 varuint-bitcoin@2.0.0: dependencies: uint8array-tools: 0.0.8 - viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10): + viem@2.22.1(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10): dependencies: '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 '@scure/bip32': 1.6.0 '@scure/bip39': 1.5.0 abitype: 1.0.7(typescript@5.7.2) - isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ox: 0.1.2(typescript@5.7.2) + isows: 1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + ox: 0.6.0(typescript@5.7.2) webauthn-p256: 0.0.10 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3990,18 +3617,15 @@ snapshots: which-module@2.0.1: {} - which-typed-array@1.1.16: + which-typed-array@1.1.18: dependencies: available-typed-arrays: 1.0.7 - call-bind: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 for-each: 0.3.3 - gopd: 1.1.0 + gopd: 1.2.0 has-tostringtag: 1.0.2 - which@2.0.2: - dependencies: - isexe: 2.0.0 - wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0 @@ -4010,14 +3634,14 @@ snapshots: wrappy@1.0.2: {} - ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): + ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10): optionalDependencies: - bufferutil: 4.0.8 + bufferutil: 4.0.9 utf-8-validate: 5.0.10 - ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): + ws@8.17.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): optionalDependencies: - bufferutil: 4.0.8 + bufferutil: 4.0.9 utf-8-validate: 5.0.10 ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): @@ -4025,6 +3649,11 @@ snapshots: bufferutil: 4.0.8 utf-8-validate: 5.0.10 + ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.9 + utf-8-validate: 5.0.10 + xmlhttprequest-ssl@2.1.2: {} xtend@4.0.2: {} @@ -4050,7 +3679,6 @@ snapshots: y18n: 4.0.3 yargs-parser: 18.1.3 - zustand@5.0.0(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)): + zustand@5.0.0(use-sync-external-store@1.2.0): optionalDependencies: - react: 18.3.1 - use-sync-external-store: 1.2.0(react@18.3.1) + use-sync-external-store: 1.2.0 diff --git a/package.json b/package.json index 39f75405..4e6367c9 100644 --- a/package.json +++ b/package.json @@ -92,29 +92,29 @@ ] }, "dependencies": { - "@bigmi/core": "^0.0.5", - "@lifi/types": "^16.4.1", + "@bigmi/core": "^0.1.0", + "@lifi/types": "^16.5.0", "@noble/curves": "^1.7.0", "@noble/hashes": "^1.6.1", "@solana/wallet-adapter-base": "^0.9.23", - "@solana/web3.js": "^1.95.8", + "@solana/web3.js": "^1.98.0", "bech32": "^2.0.0", "bitcoinjs-lib": "^7.0.0-rc.0", "bs58": "^6.0.0", - "viem": "^2.21.54" + "viem": "^2.22.1" }, "devDependencies": { "@biomejs/biome": "^1.9.4", - "@commitlint/cli": "^19.6.0", + "@commitlint/cli": "^19.6.1", "@commitlint/config-conventional": "^19.6.0", "@types/fs-extra": "^11.0.4", "@types/ws": "^8.5.13", "@vitest/coverage-v8": "^2.1.8", "fs-extra": "^11.2.0", "husky": "^9.1.7", - "lint-staged": "^15.2.10", + "lint-staged": "^15.3.0", "madge": "^8.0.0", - "msw": "^2.6.8", + "msw": "^2.7.0", "pinst": "^3.0.0", "standard-version": "^9.5.0", "ts-node": "^10.9.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3550b5a3..a57fb1a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: dependencies: '@bigmi/core': - specifier: ^0.0.5 - version: 0.0.5(bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2))(bs58@6.0.0)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) + specifier: ^0.1.0 + version: 0.1.0(bs58@6.0.0)(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) '@lifi/types': - specifier: ^16.4.1 - version: 16.4.1 + specifier: ^16.5.0 + version: 16.5.0 '@noble/curves': specifier: ^1.7.0 version: 1.7.0 @@ -22,10 +22,10 @@ importers: version: 1.6.1 '@solana/wallet-adapter-base': specifier: ^0.9.23 - version: 0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) '@solana/web3.js': - specifier: ^1.95.8 - version: 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) + specifier: ^1.98.0 + version: 1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bech32: specifier: ^2.0.0 version: 2.0.0 @@ -36,15 +36,15 @@ importers: specifier: ^6.0.0 version: 6.0.0 viem: - specifier: ^2.21.54 - version: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + specifier: ^2.22.1 + version: 2.22.1(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) devDependencies: '@biomejs/biome': specifier: ^1.9.4 version: 1.9.4 '@commitlint/cli': - specifier: ^19.6.0 - version: 19.6.0(@types/node@22.9.1)(typescript@5.7.2) + specifier: ^19.6.1 + version: 19.6.1(@types/node@22.9.1)(typescript@5.7.2) '@commitlint/config-conventional': specifier: ^19.6.0 version: 19.6.0 @@ -56,7 +56,7 @@ importers: version: 8.5.13 '@vitest/coverage-v8': specifier: ^2.1.8 - version: 2.1.8(vitest@2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2))) + version: 2.1.8(vitest@2.1.8(@types/node@22.9.1)(msw@2.7.0(@types/node@22.9.1)(typescript@5.7.2))) fs-extra: specifier: ^11.2.0 version: 11.2.0 @@ -64,14 +64,14 @@ importers: specifier: ^9.1.7 version: 9.1.7 lint-staged: - specifier: ^15.2.10 - version: 15.2.10 + specifier: ^15.3.0 + version: 15.3.0 madge: specifier: ^8.0.0 version: 8.0.0(typescript@5.7.2) msw: - specifier: ^2.6.8 - version: 2.6.8(@types/node@22.9.1)(typescript@5.7.2) + specifier: ^2.7.0 + version: 2.7.0(@types/node@22.9.1)(typescript@5.7.2) pinst: specifier: ^3.0.0 version: 3.0.0 @@ -86,7 +86,7 @@ importers: version: 5.7.2 vitest: specifier: ^2.1.8 - version: 2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2)) + version: 2.1.8(@types/node@22.9.1)(msw@2.7.0(@types/node@22.9.1)(typescript@5.7.2)) packages: @@ -146,12 +146,10 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@bigmi/core@0.0.5': - resolution: {integrity: sha512-6SdkB/8AKx3VEqcJngJo3WEN7RsqQmJLBvcIRFLw52ejpWIO4Y4PCqysGQ0SdWZ/bFc955g1ZRqMXzcudxbufw==} + '@bigmi/core@0.1.0': + resolution: {integrity: sha512-sTCuWsGnCQ8haZjdEmcSA6PPQKNSwpAO36fPqYJauZPTAvd9ChnuwawMD7HlIkj0+KVdCfDRgKYUdCESqnq+bg==} peerDependencies: - bitcoinjs-lib: ^7.0.0-rc.0 bs58: ^6.0.0 - viem: ^2.21.0 '@biomejs/biome@1.9.4': resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} @@ -215,8 +213,8 @@ packages: '@bundled-es-modules/tough-cookie@0.1.6': resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==} - '@commitlint/cli@19.6.0': - resolution: {integrity: sha512-v17BgGD9w5KnthaKxXnEg6KLq6DYiAxyiN44TpiRtqyW8NSq+Kx99mkEG8Qo6uu6cI5eMzMojW2muJxjmPnF8w==} + '@commitlint/cli@19.6.1': + resolution: {integrity: sha512-8hcyA6ZoHwWXC76BoC8qVOSr8xHy00LZhZpauiD0iO0VYbVhMnED0da85lTfIULxl7Lj4c6vZgF0Wu/ed1+jlQ==} engines: {node: '>=v18'} hasBin: true @@ -248,8 +246,8 @@ packages: resolution: {integrity: sha512-LRo7zDkXtcIrpco9RnfhOKeg8PAnE3oDDoalnrVU/EVaKHYBWYL1DlRR7+3AWn0JiBqD8yKOfetVxJGdEtZ0tg==} engines: {node: '>=v18'} - '@commitlint/load@19.5.0': - resolution: {integrity: sha512-INOUhkL/qaKqwcTUvCE8iIUf5XHsEPCLY9looJ/ipzi7jtGhgmtH7OOFiNvwYgH7mA8osUWOUDV8t4E2HAi4xA==} + '@commitlint/load@19.6.1': + resolution: {integrity: sha512-kE4mRKWWNju2QpsCWt428XBvUH55OET2N4QKQ0bF85qS/XbsRGG1MiTByDNlEVpEPceMkDr46LNH95DtRwcsfA==} engines: {node: '>=v18'} '@commitlint/message@19.5.0': @@ -434,22 +432,22 @@ packages: resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} engines: {node: '>=6.9.0'} - '@inquirer/confirm@5.1.0': - resolution: {integrity: sha512-osaBbIMEqVFjTX5exoqPXs6PilWQdjaLhGtMDXMXg/yxkHXNq43GlxGyTA35lK2HpzUgDN+Cjh/2AmqCN0QJpw==} + '@inquirer/confirm@5.1.1': + resolution: {integrity: sha512-vVLSbGci+IKQvDOtzpPTCOiEJCNidHcAq9JYVoWTW0svb5FiwSLotkM+JXNXejfjnzVYV9n0DTBythl9+XgTxg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' - '@inquirer/core@10.1.1': - resolution: {integrity: sha512-rmZVXy9iZvO3ZStEe/ayuuwIJ23LSF13aPMlLMTQARX6lGUBDHGV8UB5i9MRrfy0+mZwt5/9bdy8llszSD3NQA==} + '@inquirer/core@10.1.2': + resolution: {integrity: sha512-bHd96F3ezHg1mf/J0Rb4CV8ndCN0v28kUlrHqP7+ECm1C/A+paB7Xh2lbMk6x+kweQC+rZOxM/YeKikzxco8bQ==} engines: {node: '>=18'} - '@inquirer/figures@1.0.8': - resolution: {integrity: sha512-tKd+jsmhq21AP1LhexC0pPwsCxEhGgAkg28byjJAd+xhmIs8LUX8JbUc3vBf3PhLxWiB5EvyBE5X7JSPAqMAqg==} + '@inquirer/figures@1.0.9': + resolution: {integrity: sha512-BXvGj0ehzrngHTPTDqUoDT3NXL8U0RxUk2zJm2A66RhCEIWdtU1v6GuUqNAgArW4PQ9CinqIWyHdQgdwOj06zQ==} engines: {node: '>=18'} - '@inquirer/type@3.0.1': - resolution: {integrity: sha512-+ksJMIy92sOAiAccGpcKZUc3bYO07cADnscIxHBknEm3uNts3movSmBofc1908BNy5edKscxYeAdaX1NXkHS6A==} + '@inquirer/type@3.0.2': + resolution: {integrity: sha512-ZhQ4TvhwHZF+lGhQ2O/rsjo80XoZR5/5qhOY3t6FJuX5XBg5Be8YzYTvaUGJnc12AUGI2nr4QSUE4PhKSigx7g==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -483,8 +481,8 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@lifi/types@16.4.1': - resolution: {integrity: sha512-iSqT7KDNk8O4iFO1PjY8InqDXTLUQv77KyUiiN5aLTbik4YwrXKaKxZI0cz6Wxx94WJkfEjFgmyTbfN1hgHHwA==} + '@lifi/types@16.5.0': + resolution: {integrity: sha512-DqDNnVZiyOrtFdn3Jlloni5J2QDnVfHiS5n3bD9qX9l2ISrgp7YBTJRfNGucHfStvegSNSyuG0/THJ4Kh4f08A==} '@mswjs/interceptors@0.37.3': resolution: {integrity: sha512-USvgCL/uOGFtVa6SVyRrC8kIAedzRohxIXN5LISlg5C5vLZCn7dgMFVSNhSF9cuBEFrm/O2spDWEZeMnw4ZXYg==} @@ -640,8 +638,8 @@ packages: resolution: {integrity: sha512-tUd9srDLkRpe1BYg7we+c4UhRQkq+XQWswsr/L1xfGmoRDF47BPSXf4zE7ZU2GRBGvxtGt7lwJVAufQyQYhxTQ==} engines: {node: '>=16'} - '@solana/web3.js@1.95.8': - resolution: {integrity: sha512-sBHzNh7dHMrmNS5xPD1d0Xa2QffW/RXaxu/OysRXBfwTp+LYqGGmMtCYYwrHPrN5rjAmJCsQRNAwv4FM0t3B6g==} + '@solana/web3.js@1.98.0': + resolution: {integrity: sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA==} '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} @@ -999,6 +997,10 @@ packages: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + chalk@5.4.1: + resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + check-error@2.1.1: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} @@ -1164,13 +1166,13 @@ packages: core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - cosmiconfig-typescript-loader@5.1.0: - resolution: {integrity: sha512-7PtBB+6FdsOvZyJtlF3hEPpACq7RQX6BVGsgC7/lfVXnKMvNCu/XY3ykreqG5w/rBNdu2z8LCIKoF3kpHHdHlA==} - engines: {node: '>=v16'} + cosmiconfig-typescript-loader@6.1.0: + resolution: {integrity: sha512-tJ1w35ZRUiM5FeTzT7DtYWAFFv37ZLqSRkGi2oeCK1gPhvaWjkAtfXvLmvE1pRfxxp9aQo6ba/Pvg1dKj05D4g==} + engines: {node: '>=v18'} peerDependencies: '@types/node': '*' - cosmiconfig: '>=8.2' - typescript: '>=4' + cosmiconfig: '>=9' + typescript: '>=5' cosmiconfig@9.0.0: resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} @@ -1184,10 +1186,6 @@ packages: create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} - cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -1212,6 +1210,15 @@ packages: supports-color: optional: true + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decamelize-keys@1.1.1: resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} engines: {node: '>=0.10.0'} @@ -1485,8 +1492,8 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-east-asian-width@1.2.0: - resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} + get-east-asian-width@1.3.0: + resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} engines: {node: '>=18'} get-own-enumerable-property-symbols@3.0.2: @@ -1551,8 +1558,8 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphql@16.9.0: - resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} + graphql@16.10.0: + resolution: {integrity: sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} handlebars@4.7.8: @@ -1750,8 +1757,8 @@ packages: engines: {node: '>=8'} hasBin: true - jiti@1.21.6: - resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} hasBin: true js-tokens@4.0.0: @@ -1789,15 +1796,15 @@ packages: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} - lilconfig@3.1.2: - resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + lilconfig@3.1.3: + resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lint-staged@15.2.10: - resolution: {integrity: sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==} + lint-staged@15.3.0: + resolution: {integrity: sha512-vHFahytLoF2enJklgtOtCtIjZrKD/LoxlaUusd5nh7dWv/dkKQJY74ndFSzxCdv7g0ueGg1ORgTSt4Y9LPZn9A==} engines: {node: '>=18.12.0'} hasBin: true @@ -1981,8 +1988,8 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - msw@2.6.8: - resolution: {integrity: sha512-nxXxnH6WALZ9a7rsQp4HU2AaD4iGAiouMmE/MY4al7pXTibgA6OZOuKhmN2WBIM6w9qMKwRtX8p2iOb45B2M/Q==} + msw@2.7.0: + resolution: {integrity: sha512-BIodwZ19RWfCbYTxWTUfTXc+sg4OwjCAgxU1ZsgmggX/7S3LdUifsbUPJs61j0rWb19CZRGY5if77duhc0uXzw==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -2058,8 +2065,8 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} - ox@0.1.2: - resolution: {integrity: sha512-ak/8K0Rtphg9vnRJlbOdaX9R7cmxD2MiSthjWGaQdMk3D7hrAlDoM+6Lxn7hN52Za3vrXfZ7enfke/5WjolDww==} + ox@0.6.0: + resolution: {integrity: sha512-blUzTLidvUlshv0O02CnLFqBLidNzPoAZdIth894avUAotTuWziznv6IENv5idRuOSSP3dH8WzcYw84zVdu0Aw==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: @@ -2652,8 +2659,8 @@ packages: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} engines: {node: '>=8'} - type-fest@4.30.0: - resolution: {integrity: sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==} + type-fest@4.30.2: + resolution: {integrity: sha512-UJShLPYi1aWqCdq9HycOL/gwsuqda1OISdBO3t8RlXQC4QvtuIz4b5FCfe2dQIWEpmlRExKmcTBfP1r9bhY7ig==} engines: {node: '>=16'} typedarray@0.0.6: @@ -2723,8 +2730,8 @@ packages: varuint-bitcoin@2.0.0: resolution: {integrity: sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==} - viem@2.21.54: - resolution: {integrity: sha512-G9mmtbua3UtnVY9BqAtWdNp+3AO+oWhD0B9KaEsZb6gcrOWgmA4rz02yqEMg+qW9m6KgKGie7q3zcHqJIw6AqA==} + viem@2.22.1: + resolution: {integrity: sha512-Dlul3ps87ErRSlAVuLQXQjquk0ECy/BCKATEErwHkVd0KQZvj80T5BUU0cDABo4axNF3+78Q060y6VFiT0+SqQ==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -2875,8 +2882,8 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml@2.5.1: - resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + yaml@2.6.1: + resolution: {integrity: sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==} engines: {node: '>= 14'} hasBin: true @@ -2966,13 +2973,18 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@bigmi/core@0.0.5(bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2))(bs58@6.0.0)(viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@bigmi/core@0.1.0(bs58@6.0.0)(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)': dependencies: '@noble/hashes': 1.6.1 bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.2) bs58: 6.0.0 - viem: 2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + viem: 2.22.1(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod '@biomejs/biome@1.9.4': optionalDependencies: @@ -3022,11 +3034,11 @@ snapshots: '@types/tough-cookie': 4.0.5 tough-cookie: 4.1.4 - '@commitlint/cli@19.6.0(@types/node@22.9.1)(typescript@5.7.2)': + '@commitlint/cli@19.6.1(@types/node@22.9.1)(typescript@5.7.2)': dependencies: '@commitlint/format': 19.5.0 '@commitlint/lint': 19.6.0 - '@commitlint/load': 19.5.0(@types/node@22.9.1)(typescript@5.7.2) + '@commitlint/load': 19.6.1(@types/node@22.9.1)(typescript@5.7.2) '@commitlint/read': 19.5.0 '@commitlint/types': 19.5.0 tinyexec: 0.3.1 @@ -3059,7 +3071,7 @@ snapshots: '@commitlint/format@19.5.0': dependencies: '@commitlint/types': 19.5.0 - chalk: 5.3.0 + chalk: 5.4.1 '@commitlint/is-ignored@19.6.0': dependencies: @@ -3073,15 +3085,15 @@ snapshots: '@commitlint/rules': 19.6.0 '@commitlint/types': 19.5.0 - '@commitlint/load@19.5.0(@types/node@22.9.1)(typescript@5.7.2)': + '@commitlint/load@19.6.1(@types/node@22.9.1)(typescript@5.7.2)': dependencies: '@commitlint/config-validator': 19.5.0 '@commitlint/execute-rule': 19.5.0 '@commitlint/resolve-extends': 19.5.0 '@commitlint/types': 19.5.0 - chalk: 5.3.0 + chalk: 5.4.1 cosmiconfig: 9.0.0(typescript@5.7.2) - cosmiconfig-typescript-loader: 5.1.0(@types/node@22.9.1)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2) + cosmiconfig-typescript-loader: 6.1.0(@types/node@22.9.1)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -3212,16 +3224,16 @@ snapshots: '@hutson/parse-repository-url@3.0.2': {} - '@inquirer/confirm@5.1.0(@types/node@22.9.1)': + '@inquirer/confirm@5.1.1(@types/node@22.9.1)': dependencies: - '@inquirer/core': 10.1.1(@types/node@22.9.1) - '@inquirer/type': 3.0.1(@types/node@22.9.1) + '@inquirer/core': 10.1.2(@types/node@22.9.1) + '@inquirer/type': 3.0.2(@types/node@22.9.1) '@types/node': 22.9.1 - '@inquirer/core@10.1.1(@types/node@22.9.1)': + '@inquirer/core@10.1.2(@types/node@22.9.1)': dependencies: - '@inquirer/figures': 1.0.8 - '@inquirer/type': 3.0.1(@types/node@22.9.1) + '@inquirer/figures': 1.0.9 + '@inquirer/type': 3.0.2(@types/node@22.9.1) ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -3232,9 +3244,9 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@inquirer/figures@1.0.8': {} + '@inquirer/figures@1.0.9': {} - '@inquirer/type@3.0.1(@types/node@22.9.1)': + '@inquirer/type@3.0.2(@types/node@22.9.1)': dependencies: '@types/node': 22.9.1 @@ -3271,7 +3283,7 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@lifi/types@16.4.1': {} + '@lifi/types@16.5.0': {} '@mswjs/interceptors@0.37.3': dependencies: @@ -3385,10 +3397,10 @@ snapshots: dependencies: buffer: 6.0.3 - '@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))': + '@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))': dependencies: '@solana/wallet-standard-features': 1.2.0 - '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/web3.js': 1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@wallet-standard/base': 1.0.1 '@wallet-standard/features': 1.0.3 eventemitter3: 4.0.7 @@ -3398,7 +3410,7 @@ snapshots: '@wallet-standard/base': 1.0.1 '@wallet-standard/features': 1.0.3 - '@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 '@noble/curves': 1.7.0 @@ -3522,7 +3534,7 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 - '@vitest/coverage-v8@2.1.8(vitest@2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2)))': + '@vitest/coverage-v8@2.1.8(vitest@2.1.8(@types/node@22.9.1)(msw@2.7.0(@types/node@22.9.1)(typescript@5.7.2)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -3536,7 +3548,7 @@ snapshots: std-env: 3.8.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2)) + vitest: 2.1.8(@types/node@22.9.1)(msw@2.7.0(@types/node@22.9.1)(typescript@5.7.2)) transitivePeerDependencies: - supports-color @@ -3547,13 +3559,13 @@ snapshots: chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.8(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2))(vite@5.4.11(@types/node@22.9.1))': + '@vitest/mocker@2.1.8(msw@2.7.0(@types/node@22.9.1)(typescript@5.7.2))(vite@5.4.11(@types/node@22.9.1))': dependencies: '@vitest/spy': 2.1.8 estree-walker: 3.0.3 magic-string: 0.30.14 optionalDependencies: - msw: 2.6.8(@types/node@22.9.1)(typescript@5.7.2) + msw: 2.7.0(@types/node@22.9.1)(typescript@5.7.2) vite: 5.4.11(@types/node@22.9.1) '@vitest/pretty-format@2.1.8': @@ -3814,6 +3826,8 @@ snapshots: chalk@5.3.0: {} + chalk@5.4.1: {} + check-error@2.1.1: {} cli-cursor@3.1.0: @@ -4014,11 +4028,11 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@5.1.0(@types/node@22.9.1)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2): + cosmiconfig-typescript-loader@6.1.0(@types/node@22.9.1)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2): dependencies: '@types/node': 22.9.1 cosmiconfig: 9.0.0(typescript@5.7.2) - jiti: 1.21.6 + jiti: 2.4.2 typescript: 5.7.2 cosmiconfig@9.0.0(typescript@5.7.2): @@ -4032,12 +4046,6 @@ snapshots: create-require@1.1.1: {} - cross-spawn@7.0.3: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -4054,6 +4062,10 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.4.0: + dependencies: + ms: 2.1.3 + decamelize-keys@1.1.1: dependencies: decamelize: 1.2.0 @@ -4243,7 +4255,7 @@ snapshots: execa@8.0.1: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 get-stream: 8.0.1 human-signals: 5.0.0 is-stream: 3.0.0 @@ -4348,7 +4360,7 @@ snapshots: get-caller-file@2.0.5: {} - get-east-asian-width@1.2.0: {} + get-east-asian-width@1.3.0: {} get-own-enumerable-property-symbols@3.0.2: {} @@ -4430,7 +4442,7 @@ snapshots: graceful-fs@4.2.11: {} - graphql@16.9.0: {} + graphql@16.10.0: {} handlebars@4.7.8: dependencies: @@ -4507,7 +4519,7 @@ snapshots: is-fullwidth-code-point@5.0.0: dependencies: - get-east-asian-width: 1.2.0 + get-east-asian-width: 1.3.0 is-glob@4.0.3: dependencies: @@ -4600,7 +4612,7 @@ snapshots: - bufferutil - utf-8-validate - jiti@1.21.6: {} + jiti@2.4.2: {} js-tokens@4.0.0: {} @@ -4628,22 +4640,22 @@ snapshots: kind-of@6.0.3: {} - lilconfig@3.1.2: {} + lilconfig@3.1.3: {} lines-and-columns@1.2.4: {} - lint-staged@15.2.10: + lint-staged@15.3.0: dependencies: - chalk: 5.3.0 + chalk: 5.4.1 commander: 12.1.0 - debug: 4.3.7 + debug: 4.4.0 execa: 8.0.1 - lilconfig: 3.1.2 + lilconfig: 3.1.3 listr2: 8.2.5 micromatch: 4.0.8 pidtree: 0.6.0 string-argv: 0.3.2 - yaml: 2.5.1 + yaml: 2.6.1 transitivePeerDependencies: - supports-color @@ -4834,25 +4846,25 @@ snapshots: ms@2.1.3: {} - msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2): + msw@2.7.0(@types/node@22.9.1)(typescript@5.7.2): dependencies: '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.0(@types/node@22.9.1) + '@inquirer/confirm': 5.1.1(@types/node@22.9.1) '@mswjs/interceptors': 0.37.3 '@open-draft/deferred-promise': 2.2.0 '@open-draft/until': 2.1.0 '@types/cookie': 0.6.0 '@types/statuses': 2.0.5 - chalk: 4.1.2 - graphql: 16.9.0 + graphql: 16.10.0 headers-polyfill: 4.0.3 is-node-process: 1.2.0 outvariant: 1.4.3 path-to-regexp: 6.3.0 + picocolors: 1.1.1 strict-event-emitter: 0.5.1 - type-fest: 4.30.0 + type-fest: 4.30.2 yargs: 17.7.2 optionalDependencies: typescript: 5.7.2 @@ -4926,7 +4938,7 @@ snapshots: outvariant@1.4.3: {} - ox@0.1.2(typescript@5.7.2): + ox@0.6.0(typescript@5.7.2): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.7.0 @@ -5354,7 +5366,7 @@ snapshots: string-width@7.2.0: dependencies: emoji-regex: 10.4.0 - get-east-asian-width: 1.2.0 + get-east-asian-width: 1.3.0 strip-ansi: 7.1.0 string_decoder@1.1.1: @@ -5504,7 +5516,7 @@ snapshots: type-fest@0.8.1: {} - type-fest@4.30.0: {} + type-fest@4.30.2: {} typedarray@0.0.6: {} @@ -5554,7 +5566,7 @@ snapshots: dependencies: uint8array-tools: 0.0.8 - viem@2.21.54(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10): + viem@2.22.1(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10): dependencies: '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 @@ -5562,7 +5574,7 @@ snapshots: '@scure/bip39': 1.5.0 abitype: 1.0.7(typescript@5.7.2) isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ox: 0.1.2(typescript@5.7.2) + ox: 0.6.0(typescript@5.7.2) webauthn-p256: 0.0.10 ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: @@ -5599,10 +5611,10 @@ snapshots: '@types/node': 22.9.1 fsevents: 2.3.3 - vitest@2.1.8(@types/node@22.9.1)(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2)): + vitest@2.1.8(@types/node@22.9.1)(msw@2.7.0(@types/node@22.9.1)(typescript@5.7.2)): dependencies: '@vitest/expect': 2.1.8 - '@vitest/mocker': 2.1.8(msw@2.6.8(@types/node@22.9.1)(typescript@5.7.2))(vite@5.4.11(@types/node@22.9.1)) + '@vitest/mocker': 2.1.8(msw@2.7.0(@types/node@22.9.1)(typescript@5.7.2))(vite@5.4.11(@types/node@22.9.1)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.8 '@vitest/snapshot': 2.1.8 @@ -5705,7 +5717,7 @@ snapshots: yallist@4.0.0: {} - yaml@2.5.1: {} + yaml@2.6.1: {} yargs-parser@20.2.9: {} diff --git a/src/core/EVM/EVMStepExecutor.ts b/src/core/EVM/EVMStepExecutor.ts index e1013099..29155881 100644 --- a/src/core/EVM/EVMStepExecutor.ts +++ b/src/core/EVM/EVMStepExecutor.ts @@ -1,6 +1,7 @@ import type { ExtendedTransactionInfo, FullStatusData, + LiFiStep, Process, } from '@lifi/types' import type { @@ -16,7 +17,11 @@ import { getCapabilities, sendCalls } from 'viem/experimental' import { config } from '../../config.js' import { LiFiErrorCode } from '../../errors/constants.js' import { TransactionError } from '../../errors/errors.js' -import { getStepTransaction } from '../../services/api.js' +import { + getRelayerQuote, + getStepTransaction, + relayTransaction, +} from '../../services/api.js' import { getTransactionFailedMessage } from '../../utils/getTransactionMessage.js' import { isZeroAddress } from '../../utils/isZeroAddress.js' import { BaseStepExecutor } from '../BaseStepExecutor.js' @@ -32,13 +37,15 @@ import { waitForReceivingTransaction } from '../waitForReceivingTransaction.js' import { checkAllowance } from './checkAllowance.js' import { getNativePermit } from './getNativePermit.js' import { parseEVMErrors } from './parseEVMErrors.js' -import { signPermitMessage } from './signPermitMessage.js' +import { type PermitSignature, signPermitMessage } from './signPermitMessage.js' import { switchChain } from './switchChain.js' +import { isEVMPermitStep } from './typeguards.js' import { getMaxPriorityFeePerGas } from './utils.js' import { type WalletCallReceipt, waitForBatchTransactionReceipt, } from './waitForBatchTransactionReceipt.js' +import { waitForRelayedTransactionReceipt } from './waitForRelayedTransactionReceipt.js' import { waitForTransactionReceipt } from './waitForTransactionReceipt.js' export type Call = { @@ -150,6 +157,9 @@ export class EVMStepExecutor extends BaseStepExecutor { (p) => p.type === currentProcessType ) + // Check if step requires permit signature and will be used with relayer service + const isPermitStep = isEVMPermitStep(step) + // Check if token requires approval // Native tokens (like ETH) don't need approval since they're not ERC20 tokens // We should support different permit types: @@ -165,7 +175,8 @@ export class EVMStepExecutor extends BaseStepExecutor { const nativePermitSupported = !!fromChain.permit2Proxy && nativePermit.supported && - !atomicBatchSupported + !atomicBatchSupported && + !isPermitStep // Check if chain has Permit2 contract deployed. Permit2 should not be available for atomic batch. const permit2Supported = !!fromChain.permit2 && !!fromChain.permit2Proxy && !atomicBatchSupported @@ -238,7 +249,26 @@ export class EVMStepExecutor extends BaseStepExecutor { // Create new transaction request if (!step.transactionRequest) { const { execution, ...stepBase } = step - const updatedStep = await getStepTransaction(stepBase) + let updatedStep: LiFiStep + if (isPermitStep) { + const updatedRelayedStep = await getRelayerQuote({ + fromChain: stepBase.action.fromChainId, + fromToken: stepBase.action.fromToken.address, + fromAddress: stepBase.action.fromAddress!, + fromAmount: stepBase.action.fromAmount, + toChain: stepBase.action.toChainId, + toToken: stepBase.action.toToken.address, + slippage: stepBase.action.slippage, + toAddress: stepBase.action.toAddress, + allowBridges: [stepBase.tool], + }) + updatedStep = { + ...updatedRelayedStep.data.quote.step, + id: stepBase.id, + } + } else { + updatedStep = await getStepTransaction(stepBase) + } const comparedStep = await stepComparison( this.statusManager, step, @@ -328,18 +358,20 @@ export class EVMStepExecutor extends BaseStepExecutor { calls, })) as Address } else { + let permitSignature: PermitSignature | undefined if (permitSupported) { - const { data } = await signPermitMessage( - this.client, + permitSignature = await signPermitMessage(this.client, { transactionRequest, - fromChain, - step.action.fromToken.address as Address, - BigInt(step.action.fromAmount), - nativePermit - ) + chain: fromChain, + tokenAddress: step.action.fromToken.address as Address, + amount: BigInt(step.action.fromAmount), + nativePermit, + permitData: isPermitStep ? step.permitData : undefined, + useWitness: isPermitStep, + }) transactionRequest.to = fromChain.permit2Proxy - transactionRequest.data = data + transactionRequest.data = permitSignature.data try { // Try to re-estimate the gas due to additional Permit data @@ -360,17 +392,28 @@ export class EVMStepExecutor extends BaseStepExecutor { 'ACTION_REQUIRED' ) } - - txHash = await sendTransaction(this.client, { - to: transactionRequest.to, - account: this.client.account!, - data: transactionRequest.data, - value: transactionRequest.value, - gas: transactionRequest.gas, - gasPrice: transactionRequest.gasPrice, - maxFeePerGas: transactionRequest.maxFeePerGas, - maxPriorityFeePerGas: transactionRequest.maxPriorityFeePerGas, - } as SendTransactionParameters) + if (isPermitStep && permitSignature) { + const relayedTransaction = await relayTransaction({ + tokenOwner: this.client.account!.address, + chainId: fromChain.id, + permit: step.permit, + witness: step.witness, + signedPermitData: permitSignature.signature, + callData: transactionRequest.data!, + }) + txHash = relayedTransaction.data.taskId + } else { + txHash = await sendTransaction(this.client, { + to: transactionRequest.to, + account: this.client.account!, + data: transactionRequest.data, + value: transactionRequest.value, + gas: transactionRequest.gas, + gasPrice: transactionRequest.gasPrice, + maxFeePerGas: transactionRequest.maxFeePerGas, + maxPriorityFeePerGas: transactionRequest.maxPriorityFeePerGas, + } as SendTransactionParameters) + } } // STEP 4: Wait for the transaction @@ -400,6 +443,8 @@ export class EVMStepExecutor extends BaseStepExecutor { this.client, txHash ) + } else if (isPermitStep) { + transactionReceipt = await waitForRelayedTransactionReceipt(txHash) } else { transactionReceipt = await waitForTransactionReceipt({ client: this.client, diff --git a/src/core/EVM/parseEVMErrors.ts b/src/core/EVM/parseEVMErrors.ts index cd5a2d81..7c8e932c 100644 --- a/src/core/EVM/parseEVMErrors.ts +++ b/src/core/EVM/parseEVMErrors.ts @@ -3,7 +3,7 @@ import { SDKError } from '../../errors/SDKError.js' import { BaseError } from '../../errors/baseError.js' import { ErrorMessage, LiFiErrorCode } from '../../errors/constants.js' import { TransactionError, UnknownError } from '../../errors/errors.js' -import { fetchTxErrorDetails } from '../../helpers.js' +import { fetchTxErrorDetails } from '../../utils/fetchTxErrorDetails.js' export const parseEVMErrors = async ( e: Error, diff --git a/src/core/EVM/signPermitMessage.ts b/src/core/EVM/signPermitMessage.ts index fbd22e91..bc0b451e 100644 --- a/src/core/EVM/signPermitMessage.ts +++ b/src/core/EVM/signPermitMessage.ts @@ -9,10 +9,17 @@ import type { TransactionParameters } from '../types.js' import { eip2612Types, permit2ProxyAbi } from './abi.js' import { type NativePermitData, getNativePermit } from './getNativePermit.js' import { + type PermitBatchTransferFromData, type PermitTransferFrom, + type PermitTransferFromData, getPermitData, } from './permit2/signatureTransfer.js' +export interface PermitSignature { + signature: Hex + data: Hex +} + export const signNativePermitMessage = async ( client: Client, transactionRequest: TransactionParameters, @@ -20,7 +27,7 @@ export const signNativePermitMessage = async ( tokenAddress: Address, amount: bigint, nativePermit: NativePermitData -) => { +): Promise => { const deadline = BigInt(Math.floor(Date.now() / 1000) + 30 * 60) // 30 minutes const domain = { @@ -131,53 +138,57 @@ export const signPermit2WitnessMessage = async ( transactionRequest: TransactionParameters, chain: ExtendedChain, tokenAddress: Address, - amount: bigint -) => { - const nonce = await readContract(client, { - address: chain.permit2Proxy as Address, - abi: permit2ProxyAbi, - functionName: 'nextNonce', - args: [client.account!.address], - }) + amount: bigint, + permitData?: PermitTransferFromData | PermitBatchTransferFromData +): Promise => { + let _permitData = permitData + if (!_permitData) { + const nonce = await readContract(client, { + address: chain.permit2Proxy as Address, + abi: permit2ProxyAbi, + functionName: 'nextNonce', + args: [client.account!.address], + }) - const permitTransferFrom: PermitTransferFrom = { - permitted: { - token: tokenAddress, - amount: amount, - }, - spender: chain.permit2Proxy as Address, - nonce: nonce, - deadline: BigInt(Math.floor(Date.now() / 1000) + 30 * 60), // 30 minutes - } + const permitTransferFrom: PermitTransferFrom = { + permitted: { + token: tokenAddress, + amount: amount, + }, + spender: chain.permit2Proxy as Address, + nonce: nonce, + deadline: BigInt(Math.floor(Date.now() / 1000) + 30 * 60), // 30 minutes + } - // Create witness data for the LI.FI call - const witness = { - witness: { - diamondAddress: chain.diamondAddress as Address, - diamondCalldataHash: keccak256(transactionRequest.data as Hex), - }, - witnessTypeName: 'LiFiCall', - witnessType: { - LiFiCall: [ - { name: 'diamondAddress', type: 'address' }, - { name: 'diamondCalldataHash', type: 'bytes32' }, - ], - }, - } + // Create witness data for the LI.FI call + const witness = { + witness: { + diamondAddress: chain.diamondAddress as Address, + diamondCalldataHash: keccak256(transactionRequest.data as Hex), + }, + witnessTypeName: 'LiFiCall', + witnessType: { + LiFiCall: [ + { name: 'diamondAddress', type: 'address' }, + { name: 'diamondCalldataHash', type: 'bytes32' }, + ], + }, + } - const { domain, types, values } = getPermitData( - permitTransferFrom, - chain.permit2 as Address, - chain.id, - witness - ) + _permitData = getPermitData( + permitTransferFrom, + chain.permit2 as Address, + chain.id, + witness + ) + } const signature = await signTypedData(client, { account: client.account!, primaryType: 'PermitWitnessTransferFrom', - domain, - types, - message: { ...values }, + domain: _permitData.domain, + types: _permitData.types, + message: { ..._permitData.values }, }) const data = encodeFunctionData({ @@ -188,8 +199,8 @@ export const signPermit2WitnessMessage = async ( client.account!.address, [ [tokenAddress, amount], - permitTransferFrom.nonce, - permitTransferFrom.deadline, + _permitData.values.nonce, + _permitData.values.deadline, ], signature as Hex, ], @@ -203,13 +214,24 @@ export const signPermit2WitnessMessage = async ( export const signPermitMessage = async ( client: Client, - transactionRequest: TransactionParameters, - chain: ExtendedChain, - tokenAddress: Address, - amount: bigint, - nativePermit?: NativePermitData, - useWitness = false -) => { + { + transactionRequest, + chain, + tokenAddress, + amount, + nativePermit, + permitData, + useWitness = false, + }: { + transactionRequest: TransactionParameters + chain: ExtendedChain + tokenAddress: Address + amount: bigint + nativePermit?: NativePermitData + permitData?: PermitTransferFromData | PermitBatchTransferFromData + useWitness?: boolean + } +): Promise => { let _nativePermit = nativePermit if (!_nativePermit) { @@ -233,7 +255,8 @@ export const signPermitMessage = async ( transactionRequest, chain, tokenAddress, - amount + amount, + permitData ) } diff --git a/src/core/EVM/typeguards.ts b/src/core/EVM/typeguards.ts new file mode 100644 index 00000000..38507a18 --- /dev/null +++ b/src/core/EVM/typeguards.ts @@ -0,0 +1,7 @@ +import type { LiFiStepExtended } from '../types.js' +import type { EVMPermitStep } from './types.js' + +export function isEVMPermitStep(step: LiFiStepExtended): step is EVMPermitStep { + const evmStep = step as EVMPermitStep + return 'permit' in evmStep || 'permitData' in evmStep || 'witness' in evmStep +} diff --git a/src/core/EVM/types.ts b/src/core/EVM/types.ts index 8a769e9c..f065c858 100644 --- a/src/core/EVM/types.ts +++ b/src/core/EVM/types.ts @@ -1,7 +1,12 @@ import { type BaseToken, ChainType } from '@lifi/types' import type { Client } from 'viem' -import type { SwitchChainHook } from '../types.js' +import type { LiFiStepExtended, SwitchChainHook } from '../types.js' import type { SDKProvider } from '../types.js' +import type { PermitData } from './permit2/domain.js' +import type { + PermitTransferFrom, + Witness, +} from './permit2/signatureTransfer.js' export interface EVMProviderOptions { getWalletClient?: () => Promise @@ -48,3 +53,9 @@ export interface RevokeApprovalRequest { token: BaseToken spenderAddress: string } + +export interface EVMPermitStep extends LiFiStepExtended { + permit: PermitTransferFrom + permitData: PermitData + witness: Witness +} diff --git a/src/core/EVM/waitForRelayedTransactionReceipt.ts b/src/core/EVM/waitForRelayedTransactionReceipt.ts new file mode 100644 index 00000000..a42eeba8 --- /dev/null +++ b/src/core/EVM/waitForRelayedTransactionReceipt.ts @@ -0,0 +1,47 @@ +import type { Hash, WalletCallReceipt as _WalletCallReceipt } from 'viem' +import { getRelayedTransactionStatus } from '../../services/api.js' +import { waitForResult } from '../../utils/waitForResult.js' + +export type WalletCallReceipt = _WalletCallReceipt< + bigint, + 'success' | 'reverted' +> + +export const waitForRelayedTransactionReceipt = async ( + taskId: Hash +): Promise => { + return waitForResult(async () => { + const status = await getRelayedTransactionStatus({ + taskId, + }) + + // biome-ignore lint/suspicious/noConsole: + console.log('status', status) + + if (status.status === 'pending') { + return status as any + } + + return undefined + + // if (status.status === 'success') { + // if ( + // !status.receipts?.length || + // !status.receipts.every((receipt) => receipt.transactionHash) || + // status.receipts.some((receipt) => receipt.status === 'reverted') + // ) { + // throw new TransactionError( + // LiFiErrorCode.TransactionFailed, + // 'Transaction was reverted.' + // ) + // } + // const transactionReceipt = callsDetails.receipts.at(-1)! + // return transactionReceipt + // } + + // throw new TransactionError( + // LiFiErrorCode.TransactionFailed, + // 'Transaction not found.' + // ) + }, 3000) +} diff --git a/src/createConfig.ts b/src/createConfig.ts index b26096a2..71784471 100644 --- a/src/createConfig.ts +++ b/src/createConfig.ts @@ -1,8 +1,8 @@ import { ChainType } from '@lifi/types' import { config } from './config.js' -import { checkPackageUpdates } from './helpers.js' import { getChains } from './services/api.js' import type { SDKConfig } from './types/internal.js' +import { checkPackageUpdates } from './utils/checkPackageUpdates.js' import { name, version } from './version.js' function createBaseConfig(options: SDKConfig) { diff --git a/src/helper.unit.spec.ts b/src/helper.unit.spec.ts deleted file mode 100644 index ef95cad0..00000000 --- a/src/helper.unit.spec.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { - type Mock, - afterEach, - beforeEach, - describe, - expect, - it, - vi, -} from 'vitest' -import { checkPackageUpdates } from './helpers.js' - -const latestVersion = '2.5.6' - -describe('helpers', () => { - describe('checkPackageUpdates', () => { - beforeEach(() => { - vi.spyOn(global, 'fetch').mockResolvedValue({ - json: () => Promise.resolve({ version: latestVersion }), - } as Response) - - vi.spyOn(console, 'warn').mockImplementation(() => {}) - }) - - afterEach(() => { - vi.resetAllMocks() - }) - - it('should be able to check the version number against npm', async () => { - const packageName = '@lifi/sdk' - const currentVersion = '0.0.0' - - await checkPackageUpdates(packageName, currentVersion) - - expect(global.fetch as Mock).toBeCalledWith( - `https://registry.npmjs.org/${packageName}/latest` - ) - - expect(console.warn).toBeCalledWith( - `${packageName}: new package version is available. Please update as soon as possible to enjoy the newest features. Current version: ${currentVersion}. Latest version: ${latestVersion}.` - ) - }) - - it('should not report if version matchs the latest on npm', async () => { - const packageName = '@lifi/sdk' - const currentVersion = '2.5.6' - - await checkPackageUpdates(packageName, currentVersion) - - expect(global.fetch as Mock).toBeCalledWith( - `https://registry.npmjs.org/${packageName}/latest` - ) - - expect(console.warn).not.toBeCalled() - }) - - it('should fail sliently if it encounters a problem', async () => { - vi.spyOn(global, 'fetch').mockRejectedValue({ - json: () => Promise.resolve({ version: latestVersion }), - } as Response) - - const packageName = '@lifi/sdk' - const currentVersion = '0.0.0' - - await checkPackageUpdates(packageName, currentVersion) - - expect(global.fetch as Mock).toBeCalledWith( - `https://registry.npmjs.org/${packageName}/latest` - ) - - expect(console.warn).not.toBeCalled() - }) - }) -}) diff --git a/src/helpers.ts b/src/helpers.ts deleted file mode 100644 index 5f8a0f3d..00000000 --- a/src/helpers.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { LiFiStep, Route } from '@lifi/types' -import { SDKError } from './errors/SDKError.js' -import { ValidationError } from './errors/errors.js' -import { name, version } from './version.js' - -export const checkPackageUpdates = async ( - packageName?: string, - packageVersion?: string -) => { - try { - const pkgName = packageName ?? name - const response = await fetch(`https://registry.npmjs.org/${pkgName}/latest`) - const reponseBody = await response.json() - const latestVersion = reponseBody.version - const currentVersion = packageVersion ?? version - - if (latestVersion > currentVersion) { - console.warn( - `${pkgName}: new package version is available. Please update as soon as possible to enjoy the newest features. Current version: ${currentVersion}. Latest version: ${latestVersion}.` - ) - } - } catch (_error) { - // Cannot verify version, might be network error etc. We don't bother showing anything in that case - } -} - -/** - * Converts a quote to Route - * @param step - Step returned from the quote endpoint. - * @param txHash - * @param chainId - * @returns - The route to be executed. - * @throws {BaseError} Throws a ValidationError if the step has missing values. - */ -export const convertQuoteToRoute = (step: LiFiStep): Route => { - if (!step.estimate.fromAmountUSD) { - throw new SDKError( - new ValidationError("Missing 'fromAmountUSD' in step estimate.") - ) - } - - if (!step.estimate.toAmountUSD) { - throw new SDKError( - new ValidationError("Missing 'toAmountUSD' in step estimate.") - ) - } - - const route: Route = { - fromToken: step.action.fromToken, - toToken: step.action.toToken, - fromAmount: step.action.fromAmount, - toAmount: step.estimate.toAmount, - id: step.id, - fromChainId: step.action.fromToken.chainId, - toChainId: step.action.toToken.chainId, - fromAmountUSD: step.estimate.fromAmountUSD, - toAmountUSD: step.estimate.toAmountUSD, - steps: [step], - toAmountMin: step.estimate.toAmountMin, - insurance: { state: 'NOT_INSURABLE', feeAmountUsd: '0' }, - } - - return route -} - -export const fetchTxErrorDetails = async (txHash: string, chainId: number) => { - try { - const response = await fetch( - `https://api.tenderly.co/api/v1/public-contract/${chainId}/tx/${txHash}` - ) - const reponseBody = await response.json() - - return reponseBody - } catch (_) {} -} diff --git a/src/index.ts b/src/index.ts index 8369bbbe..a4c62e5a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -62,17 +62,16 @@ export { UTXO } from './core/UTXO/UTXO.js' export { isUTXO } from './core/UTXO/types.js' export type { UTXOProvider, UTXOProviderOptions } from './core/UTXO/types.js' export { createConfig } from './createConfig.js' -export { - checkPackageUpdates, - convertQuoteToRoute, - fetchTxErrorDetails, -} from './helpers.js' +export { checkPackageUpdates } from './utils/checkPackageUpdates.js' +export { convertQuoteToRoute } from './utils/convertQuoteToRoute.js' +export { fetchTxErrorDetails } from './utils/fetchTxErrorDetails.js' export { getChains, getConnections, getContractCallsQuote, getGasRecommendation, getQuote, + getRelayerQuote, getRoutes, getStatus, getStepTransaction, diff --git a/src/services/api.ts b/src/services/api.ts index 95888ad0..895a007f 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -26,44 +26,53 @@ import { isContractCallsRequestWithFromAmount, isContractCallsRequestWithToAmount, } from '@lifi/types' +import type { Address, Hash, Hex } from 'viem' import { config } from '../config.js' +import type { PermitData } from '../core/EVM/permit2/domain.js' +import type { + PermitTransferFrom, + Witness, +} from '../core/EVM/permit2/signatureTransfer.js' import { SDKError } from '../errors/SDKError.js' import { ValidationError } from '../errors/errors.js' import { request } from '../request.js' import { isRoutesRequest, isStep } from '../typeguards.js' import { withDedupe } from '../utils/withDedupe.js' -/** - * Fetch information about a Token - * @param chain - Id or key of the chain that contains the token - * @param token - Address or symbol of the token on the requested chain - * @param options - Request options - * @throws {LiFiError} - Throws a LiFiError if request fails - * @returns Token information - */ -export const getToken = async ( - chain: ChainKey | ChainId, - token: string, - options?: RequestOptions -): Promise => { - if (!chain) { - throw new SDKError( - new ValidationError('Required parameter "chain" is missing.') - ) - } - if (!token) { - throw new SDKError( - new ValidationError('Required parameter "token" is missing.') - ) - } - return await request( - `${config.get().apiUrl}/token?${new URLSearchParams({ - chain, - token, - } as Record)}`, - { - signal: options?.signal, + +interface TaskStatus { + status: 'pending' | 'processing' | 'success' | 'failed' + transactionHash?: Hash + error?: string +} + +interface RelayStatusRequest { + taskId: Hash +} + +interface RelayRequest { + tokenOwner: Address + chainId: number + permit: PermitTransferFrom + witness: Witness + signedPermitData: Hex + callData: string +} + +interface RelayResponse { + data: { taskId: Hash } +} + +interface RelayerQuoteResponse { + data: { + quote: { + step: LiFiStep + permit: PermitTransferFrom + witness: Witness + permitData: PermitData + tokenOwner: Address + chainId: number } - ) + } } /** @@ -124,6 +133,38 @@ export const getQuote = async ( ) } +/** + * Get a set of routes for a request that describes a transfer of tokens. + * @param params - A description of the transfer. + * @param options - Request options + * @returns The resulting routes that can be used to realize the described transfer of tokens. + * @throws {LiFiError} Throws a LiFiError if request fails. + */ +export const getRoutes = async ( + params: RoutesRequest, + options?: RequestOptions +): Promise => { + if (!isRoutesRequest(params)) { + throw new SDKError(new ValidationError('Invalid routes request.')) + } + const _config = config.get() + // apply defaults + params.options = { + integrator: _config.integrator, + ..._config.routeOptions, + ...params.options, + } + + return await request(`${_config.apiUrl}/advanced/routes`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(params), + signal: options?.signal, + }) +} + /** * Get a quote for a destination contract call * @param params - The configuration of the requested destination call @@ -187,6 +228,35 @@ export const getContractCallsQuote = async ( }) } +/** + * Get the transaction data for a single step of a route + * @param step - The step object. + * @param options - Request options + * @returns The step populated with the transaction data. + * @throws {LiFiError} Throws a LiFiError if request fails. + */ +export const getStepTransaction = async ( + step: LiFiStep, + options?: RequestOptions +): Promise => { + if (!isStep(step)) { + // While the validation fails for some users we should not enforce it + console.warn('SDK Validation: Invalid Step', step) + } + + return await request( + `${config.get().apiUrl}/advanced/stepTransaction`, + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(step), + signal: options?.signal, + } + ) +} + /** * Check the status of a transfer. For cross chain transfers, the "bridge" parameter is required. * @param params - Configuration of the requested status @@ -215,125 +285,165 @@ export const getStatus = async ( } /** - * Get all available chains - * @param params - The configuration of the requested chains + * Get a relayer quote for a token transfer + * @param params - The configuration of the requested quote * @param options - Request options - * @returns A list of all available chains - * @throws {LiFiError} Throws a LiFiError if request fails. + * @throws {LiFiError} - Throws a LiFiError if request fails + * @returns Relayer quote for a token transfer */ -export const getChains = async ( - params?: ChainsRequest, +export const getRelayerQuote = async ( + params: QuoteRequest, options?: RequestOptions -): Promise => { - if (params) { - for (const key of Object.keys(params)) { - if (!params[key as keyof ChainsRequest]) { - delete params[key as keyof ChainsRequest] - } +): Promise => { + const requiredParameters: Array = [ + 'fromChain', + 'fromToken', + 'fromAddress', + 'fromAmount', + 'toChain', + 'toToken', + ] + for (const requiredParameter of requiredParameters) { + if (!params[requiredParameter]) { + throw new SDKError( + new ValidationError( + `Required parameter "${requiredParameter}" is missing.` + ) + ) } } - const urlSearchParams = new URLSearchParams( - params as Record - ).toString() - const response = await withDedupe( - () => - request( - `${config.get().apiUrl}/chains?${urlSearchParams}`, - { - signal: options?.signal, - } - ), - { id: `${getChains.name}.${urlSearchParams}` } + const _config = config.get() + // apply defaults + params.integrator ??= _config.integrator + params.order ??= _config.routeOptions?.order + params.slippage ??= _config.routeOptions?.slippage + params.referrer ??= _config.routeOptions?.referrer + params.fee ??= _config.routeOptions?.fee + params.allowBridges ??= _config.routeOptions?.bridges?.allow + params.denyBridges ??= _config.routeOptions?.bridges?.deny + params.preferBridges ??= _config.routeOptions?.bridges?.prefer + params.allowExchanges ??= _config.routeOptions?.exchanges?.allow + params.denyExchanges ??= _config.routeOptions?.exchanges?.deny + params.preferExchanges ??= _config.routeOptions?.exchanges?.prefer + + for (const key of Object.keys(params)) { + if (!params[key as keyof QuoteRequest]) { + delete params[key as keyof QuoteRequest] + } + } + + return await request( + `${config.get().apiUrl}/relayer/quote?${new URLSearchParams( + params as unknown as Record + )}`, + { + signal: options?.signal, + } ) - return response.chains } /** - * Get a set of routes for a request that describes a transfer of tokens. - * @param params - A description of the transfer. + * Relay a transaction through the relayer service + * @param params - The configuration for the relay request * @param options - Request options - * @returns The resulting routes that can be used to realize the described transfer of tokens. - * @throws {LiFiError} Throws a LiFiError if request fails. + * @throws {LiFiError} - Throws a LiFiError if request fails + * @returns Task ID for the relayed transaction */ -export const getRoutes = async ( - params: RoutesRequest, +export const relayTransaction = async ( + params: RelayRequest, options?: RequestOptions -): Promise => { - if (!isRoutesRequest(params)) { - throw new SDKError(new ValidationError('Invalid routes request.')) - } - const _config = config.get() - // apply defaults - params.options = { - integrator: _config.integrator, - ..._config.routeOptions, - ...params.options, +): Promise => { + const requiredParameters: Array = [ + 'tokenOwner', + 'chainId', + 'permit', + 'witness', + 'signedPermitData', + 'callData', + ] + + for (const requiredParameter of requiredParameters) { + if (!params[requiredParameter]) { + throw new SDKError( + new ValidationError( + `Required parameter "${requiredParameter}" is missing.` + ) + ) + } } - return await request(`${_config.apiUrl}/advanced/routes`, { + return await request(`${config.get().apiUrl}/relayer/relay`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, - body: JSON.stringify(params), + body: JSON.stringify(params, (_, value) => { + if (typeof value === 'bigint') { + return value.toString() + } + return value + }), signal: options?.signal, }) } /** - * Get the transaction data for a single step of a route - * @param step - The step object. + * Get the status of a relayed transaction + * @param params - Parameters for the relay status request * @param options - Request options - * @returns The step populated with the transaction data. - * @throws {LiFiError} Throws a LiFiError if request fails. + * @throws {LiFiError} - Throws a LiFiError if request fails + * @returns Status of the relayed transaction */ -export const getStepTransaction = async ( - step: LiFiStep, +export const getRelayedTransactionStatus = async ( + params: RelayStatusRequest, options?: RequestOptions -): Promise => { - if (!isStep(step)) { - // While the validation fails for some users we should not enforce it - console.warn('SDK Validation: Invalid Step', step) +): Promise => { + if (!params.taskId) { + throw new SDKError( + new ValidationError('Required parameter "taskId" is missing.') + ) } - return await request( - `${config.get().apiUrl}/advanced/stepTransaction`, + return await request( + `${config.get().apiUrl}/relayer/status/${params.taskId}`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify(step), signal: options?.signal, } ) } /** - * Get the available tools to bridge and swap tokens. - * @param params - The configuration of the requested tools + * Get all available chains + * @param params - The configuration of the requested chains * @param options - Request options - * @returns The tools that are available on the requested chains + * @returns A list of all available chains + * @throws {LiFiError} Throws a LiFiError if request fails. */ -export const getTools = async ( - params?: ToolsRequest, +export const getChains = async ( + params?: ChainsRequest, options?: RequestOptions -): Promise => { +): Promise => { if (params) { for (const key of Object.keys(params)) { - if (!params[key as keyof ToolsRequest]) { - delete params[key as keyof ToolsRequest] + if (!params[key as keyof ChainsRequest]) { + delete params[key as keyof ChainsRequest] } } } - return await request( - `${config.get().apiUrl}/tools?${new URLSearchParams( - params as Record - )}`, - { - signal: options?.signal, - } + const urlSearchParams = new URLSearchParams( + params as Record + ).toString() + const response = await withDedupe( + () => + request( + `${config.get().apiUrl}/chains?${urlSearchParams}`, + { + signal: options?.signal, + } + ), + { id: `${getChains.name}.${urlSearchParams}` } ) + return response.chains } /** @@ -369,6 +479,67 @@ export const getTokens = async ( return response } +/** + * Fetch information about a Token + * @param chain - Id or key of the chain that contains the token + * @param token - Address or symbol of the token on the requested chain + * @param options - Request options + * @throws {LiFiError} - Throws a LiFiError if request fails + * @returns Token information + */ +export const getToken = async ( + chain: ChainKey | ChainId, + token: string, + options?: RequestOptions +): Promise => { + if (!chain) { + throw new SDKError( + new ValidationError('Required parameter "chain" is missing.') + ) + } + if (!token) { + throw new SDKError( + new ValidationError('Required parameter "token" is missing.') + ) + } + return await request( + `${config.get().apiUrl}/token?${new URLSearchParams({ + chain, + token, + } as Record)}`, + { + signal: options?.signal, + } + ) +} + +/** + * Get the available tools to bridge and swap tokens. + * @param params - The configuration of the requested tools + * @param options - Request options + * @returns The tools that are available on the requested chains + */ +export const getTools = async ( + params?: ToolsRequest, + options?: RequestOptions +): Promise => { + if (params) { + for (const key of Object.keys(params)) { + if (!params[key as keyof ToolsRequest]) { + delete params[key as keyof ToolsRequest] + } + } + } + return await request( + `${config.get().apiUrl}/tools?${new URLSearchParams( + params as Record + )}`, + { + signal: options?.signal, + } + ) +} + /** * Get gas recommendation for a certain chain * @param params - Configuration of the requested gas recommendation. diff --git a/src/utils/checkPackageUpdates.ts b/src/utils/checkPackageUpdates.ts new file mode 100644 index 00000000..d943e1e9 --- /dev/null +++ b/src/utils/checkPackageUpdates.ts @@ -0,0 +1,22 @@ +import { name, version } from '../version.js' + +export const checkPackageUpdates = async ( + packageName?: string, + packageVersion?: string +) => { + try { + const pkgName = packageName ?? name + const response = await fetch(`https://registry.npmjs.org/${pkgName}/latest`) + const reponseBody = await response.json() + const latestVersion = reponseBody.version + const currentVersion = packageVersion ?? version + + if (latestVersion > currentVersion) { + console.warn( + `${pkgName}: new package version is available. Please update as soon as possible to enjoy the newest features. Current version: ${currentVersion}. Latest version: ${latestVersion}.` + ) + } + } catch (_error) { + // Cannot verify version, might be network error etc. We don't bother showing anything in that case + } +} diff --git a/src/utils/checkPackageUpdates.unit.spec.ts b/src/utils/checkPackageUpdates.unit.spec.ts new file mode 100644 index 00000000..b65102e0 --- /dev/null +++ b/src/utils/checkPackageUpdates.unit.spec.ts @@ -0,0 +1,71 @@ +import { + type Mock, + afterEach, + beforeEach, + describe, + expect, + it, + vi, +} from 'vitest' +import { checkPackageUpdates } from './checkPackageUpdates.js' + +const latestVersion = '2.5.6' + +describe('checkPackageUpdates', () => { + beforeEach(() => { + vi.spyOn(global, 'fetch').mockResolvedValue({ + json: () => Promise.resolve({ version: latestVersion }), + } as Response) + + vi.spyOn(console, 'warn').mockImplementation(() => {}) + }) + + afterEach(() => { + vi.resetAllMocks() + }) + + it('should be able to check the version number against npm', async () => { + const packageName = '@lifi/sdk' + const currentVersion = '0.0.0' + + await checkPackageUpdates(packageName, currentVersion) + + expect(global.fetch as Mock).toBeCalledWith( + `https://registry.npmjs.org/${packageName}/latest` + ) + + expect(console.warn).toBeCalledWith( + `${packageName}: new package version is available. Please update as soon as possible to enjoy the newest features. Current version: ${currentVersion}. Latest version: ${latestVersion}.` + ) + }) + + it('should not report if version matchs the latest on npm', async () => { + const packageName = '@lifi/sdk' + const currentVersion = '2.5.6' + + await checkPackageUpdates(packageName, currentVersion) + + expect(global.fetch as Mock).toBeCalledWith( + `https://registry.npmjs.org/${packageName}/latest` + ) + + expect(console.warn).not.toBeCalled() + }) + + it('should fail sliently if it encounters a problem', async () => { + vi.spyOn(global, 'fetch').mockRejectedValue({ + json: () => Promise.resolve({ version: latestVersion }), + } as Response) + + const packageName = '@lifi/sdk' + const currentVersion = '0.0.0' + + await checkPackageUpdates(packageName, currentVersion) + + expect(global.fetch as Mock).toBeCalledWith( + `https://registry.npmjs.org/${packageName}/latest` + ) + + expect(console.warn).not.toBeCalled() + }) +}) diff --git a/src/utils/convertQuoteToRoute.ts b/src/utils/convertQuoteToRoute.ts new file mode 100644 index 00000000..6165f586 --- /dev/null +++ b/src/utils/convertQuoteToRoute.ts @@ -0,0 +1,42 @@ +import type { LiFiStep, Route } from '@lifi/types' +import { SDKError } from '../errors/SDKError.js' +import { ValidationError } from '../errors/errors.js' + +/** + * Converts a quote to Route + * @param step - Step returned from the quote endpoint. + * @param txHash + * @param chainId + * @returns - The route to be executed. + * @throws {BaseError} Throws a ValidationError if the step has missing values. + */ +export const convertQuoteToRoute = (step: LiFiStep): Route => { + if (!step.estimate.fromAmountUSD) { + throw new SDKError( + new ValidationError("Missing 'fromAmountUSD' in step estimate.") + ) + } + + if (!step.estimate.toAmountUSD) { + throw new SDKError( + new ValidationError("Missing 'toAmountUSD' in step estimate.") + ) + } + + const route: Route = { + fromToken: step.action.fromToken, + toToken: step.action.toToken, + fromAmount: step.action.fromAmount, + toAmount: step.estimate.toAmount, + id: step.id, + fromChainId: step.action.fromToken.chainId, + toChainId: step.action.toToken.chainId, + fromAmountUSD: step.estimate.fromAmountUSD, + toAmountUSD: step.estimate.toAmountUSD, + steps: [step], + toAmountMin: step.estimate.toAmountMin, + insurance: { state: 'NOT_INSURABLE', feeAmountUsd: '0' }, + } + + return route +} diff --git a/src/utils/fetchTxErrorDetails.ts b/src/utils/fetchTxErrorDetails.ts new file mode 100644 index 00000000..9ca3b0c1 --- /dev/null +++ b/src/utils/fetchTxErrorDetails.ts @@ -0,0 +1,10 @@ +export const fetchTxErrorDetails = async (txHash: string, chainId: number) => { + try { + const response = await fetch( + `https://api.tenderly.co/api/v1/public-contract/${chainId}/tx/${txHash}` + ) + const reponseBody = await response.json() + + return reponseBody + } catch (_) {} +} From c35d9cc8f621e2d76f4910ee2bbc743b03a72912 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Thu, 2 Jan 2025 15:41:14 +0100 Subject: [PATCH 08/26] fix: replace more actions with getAction util --- src/core/EVM/EVMStepExecutor.ts | 13 +++++++++++-- src/core/EVM/parseEVMErrors.unit.spec.ts | 2 +- src/core/EVM/waitForBatchTransactionReceipt.ts | 7 ++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/core/EVM/EVMStepExecutor.ts b/src/core/EVM/EVMStepExecutor.ts index 7de248bd..7c78a1a8 100644 --- a/src/core/EVM/EVMStepExecutor.ts +++ b/src/core/EVM/EVMStepExecutor.ts @@ -14,6 +14,7 @@ import type { TransactionReceipt, } from 'viem' import { estimateGas, getAddresses, sendTransaction } from 'viem/actions' +import type { GetCapabilitiesReturnType } from 'viem/experimental' import { getCapabilities, sendCalls } from 'viem/experimental' import { getAction } from 'viem/utils' import { config } from '../../config.js' @@ -146,7 +147,11 @@ export class EVMStepExecutor extends BaseStepExecutor { let atomicBatchSupported = false try { - const capabilities = await getCapabilities(this.client) + const capabilities = (await getAction( + this.client, + getCapabilities, + 'getCapabilities' + )(undefined)) as GetCapabilitiesReturnType atomicBatchSupported = capabilities[fromChain.id]?.atomicBatch?.supported } catch { // If the wallet does not support getCapabilities, we assume that atomic batch is not supported @@ -359,7 +364,11 @@ export class EVMStepExecutor extends BaseStepExecutor { calls.push(transferCall) - txHash = (await sendCalls(this.client, { + txHash = (await getAction( + this.client, + sendCalls, + 'sendCalls' + )({ account: this.client.account!, calls, })) as Address diff --git a/src/core/EVM/parseEVMErrors.unit.spec.ts b/src/core/EVM/parseEVMErrors.unit.spec.ts index a3cd8d4c..fdb01454 100644 --- a/src/core/EVM/parseEVMErrors.unit.spec.ts +++ b/src/core/EVM/parseEVMErrors.unit.spec.ts @@ -10,7 +10,7 @@ import { LiFiErrorCode, } from '../../errors/constants.js' import { TransactionError } from '../../errors/errors.js' -import * as helpers from '../../helpers.js' +import * as helpers from '../../utils/fetchTxErrorDetails.js' import { parseEVMErrors } from './parseEVMErrors.js' beforeAll(setupTestEnvironment) diff --git a/src/core/EVM/waitForBatchTransactionReceipt.ts b/src/core/EVM/waitForBatchTransactionReceipt.ts index 057f13ed..86e01668 100644 --- a/src/core/EVM/waitForBatchTransactionReceipt.ts +++ b/src/core/EVM/waitForBatchTransactionReceipt.ts @@ -4,6 +4,7 @@ import type { WalletCallReceipt as _WalletCallReceipt, } from 'viem' import { getCallsStatus } from 'viem/experimental' +import { getAction } from 'viem/utils' import { LiFiErrorCode } from '../../errors/constants.js' import { TransactionError } from '../../errors/errors.js' import { waitForResult } from '../../utils/waitForResult.js' @@ -18,7 +19,11 @@ export const waitForBatchTransactionReceipt = async ( batchHash: Hash ): Promise => { return waitForResult(async () => { - const callsDetails = await getCallsStatus(client, { + const callsDetails = await getAction( + client, + getCallsStatus, + 'getCallsStatus' + )({ id: batchHash, }) From 90915a9490d0e84feec2dc9ad06888c4c4bbd760 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 7 Jan 2025 17:21:44 +0100 Subject: [PATCH 09/26] fix: add quote update --- src/core/EVM/EVMStepExecutor.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/EVM/EVMStepExecutor.ts b/src/core/EVM/EVMStepExecutor.ts index 21072d27..5e2fc89e 100644 --- a/src/core/EVM/EVMStepExecutor.ts +++ b/src/core/EVM/EVMStepExecutor.ts @@ -266,6 +266,7 @@ export class EVMStepExecutor extends BaseStepExecutor { }) updatedStep = { ...updatedRelayedStep.data.quote.step, + ...updatedRelayedStep.data.quote, id: stepBase.id, } } else { @@ -328,7 +329,6 @@ export class EVMStepExecutor extends BaseStepExecutor { } } - // STEP 3: Send the transaction // Make sure that the chain is still correct const updatedClient = await this.checkClient(step, process) if (!updatedClient) { @@ -426,7 +426,6 @@ export class EVMStepExecutor extends BaseStepExecutor { } } - // STEP 4: Wait for the transaction process = this.statusManager.updateProcess( step, process.type, From faf7a164399c3ba32c51d4c3c7f04a50f1f3a019 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Thu, 9 Jan 2025 17:09:19 +0100 Subject: [PATCH 10/26] fix: relayer status improvements --- examples/node/package.json | 6 +- examples/node/pnpm-lock.yaml | 168 +++++++----------- package.json | 4 +- pnpm-lock.yaml | 142 +++++++-------- src/core/EVM/EVMStepExecutor.ts | 5 +- .../EVM/waitForBatchTransactionReceipt.ts | 65 ++++--- .../EVM/waitForRelayedTransactionReceipt.ts | 61 ++++--- src/core/waitForTransactionStatus.ts | 8 +- src/errors/constants.ts | 1 + src/services/api.ts | 9 +- src/utils/convertQuoteToRoute.ts | 33 ++-- src/utils/waitForResult.ts | 25 ++- src/utils/waitForResult.unit.spec.ts | 57 +++++- 13 files changed, 321 insertions(+), 263 deletions(-) diff --git a/examples/node/package.json b/examples/node/package.json index 86453492..8c0df5ae 100644 --- a/examples/node/package.json +++ b/examples/node/package.json @@ -8,11 +8,11 @@ "license": "MIT", "dependencies": { "@lifi/data-types": "^5.19.1", - "@lifi/sdk": "^3.5.0", + "@lifi/sdk": "^3.5.1", "@wagmi/connectors": "^5.7.3", "@wagmi/core": "^2.16.3", "dotenv": "^16.4.7", - "viem": "^2.22.3" + "viem": "^2.22.5" }, "scripts": { "example:swap": "tsx examples/swap.ts", @@ -26,6 +26,6 @@ "devDependencies": { "@types/node": "^22.10.5", "tsx": "^4.19.2", - "typescript": "^5.7.2" + "typescript": "^5.7.3" } } diff --git a/examples/node/pnpm-lock.yaml b/examples/node/pnpm-lock.yaml index 3743a7d5..98724436 100644 --- a/examples/node/pnpm-lock.yaml +++ b/examples/node/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: '9.0' settings: - autoInstallPeers: true + autoInstallPeers: false excludeLinksFromLockfile: false importers: @@ -12,20 +12,20 @@ importers: specifier: ^5.19.1 version: 5.19.1 '@lifi/sdk': - specifier: ^3.5.0 - version: 3.5.0(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)) + specifier: ^3.5.1 + version: 3.5.1(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) '@wagmi/connectors': specifier: ^5.7.3 - version: 5.7.3(@wagmi/core@2.16.3(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(react@18.3.1)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)) + version: 5.7.3(@wagmi/core@2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) '@wagmi/core': specifier: ^2.16.3 - version: 2.16.3(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)) + version: 2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) dotenv: specifier: ^16.4.7 version: 16.4.7 viem: - specifier: ^2.22.3 - version: 2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + specifier: ^2.22.5 + version: 2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) devDependencies: '@types/node': specifier: ^22.10.5 @@ -34,8 +34,8 @@ importers: specifier: ^4.19.2 version: 4.19.2 typescript: - specifier: ^5.7.2 - version: 5.7.2 + specifier: ^5.7.3 + version: 5.7.3 packages: @@ -48,8 +48,6 @@ packages: '@bigmi/core@0.1.0': resolution: {integrity: sha512-sTCuWsGnCQ8haZjdEmcSA6PPQKNSwpAO36fPqYJauZPTAvd9ChnuwawMD7HlIkj0+KVdCfDRgKYUdCESqnq+bg==} - peerDependencies: - bs58: ^6.0.0 '@coinbase/wallet-sdk@3.9.3': resolution: {integrity: sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==} @@ -226,11 +224,9 @@ packages: '@lifi/data-types@5.19.1': resolution: {integrity: sha512-zR71jEaOBzXtVDULWZFRA+kY9HlEHQxwbzs1fHoH6x+taLSiu3lCESUpsgFHkl1+vxN4ZfthomAjUpt92KJdqQ==} - '@lifi/sdk@3.5.0': - resolution: {integrity: sha512-1YWzyPEzFL2Fd5vklt2cXjxu6z66LIlI9PQkkpLqv2wABZRUP+rrqqCQJ1KfZMlJM5OMDr01gL5gycdBwO0cUQ==} + '@lifi/sdk@3.5.1': + resolution: {integrity: sha512-Kd/WMMGitlusFa/ZMoy3Bl3xsUf1ZYel8qYHzxy8kUQozsXmfbpolPShZpG14JyauuSxa2Na/bzGmeIqYS3UkA==} peerDependencies: - '@solana/wallet-adapter-base': ^0.9.0 - '@solana/web3.js': ^1.98.0 viem: ^2.21.0 '@lifi/types@16.5.0': @@ -1085,9 +1081,6 @@ packages: engines: {node: '>=8'} hasBin: true - js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - json-rpc-engine@6.1.0: resolution: {integrity: sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==} engines: {node: '>=10.0.0'} @@ -1125,10 +1118,6 @@ packages: lodash.isequal@4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - loose-envify@1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true - lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -1296,10 +1285,6 @@ packages: radix3@1.1.2: resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} - react@18.3.1: - resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} - engines: {node: '>=0.10.0'} - readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} @@ -1432,8 +1417,8 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - typescript@5.7.2: - resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} hasBin: true @@ -1565,8 +1550,8 @@ packages: varuint-bitcoin@2.0.0: resolution: {integrity: sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==} - viem@2.22.3: - resolution: {integrity: sha512-lO8K4lL5vWfJ9dmeJo9BfwlJJ0vNDrgLXgwFJNzjLJ6eDfOGXr48yzNhqt96ybYS7SlM7ecT7yhJIVfhZLkOkw==} + viem@2.22.5: + resolution: {integrity: sha512-rked1t/qPQAFNTLoFU18/OCv5KdbIZPwAwlY2X7dtH8unt28kccN6RBrjEjhNrY6wQlbO4phGwslNUzd8a2faw==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -1680,13 +1665,13 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 - '@bigmi/core@0.1.0(bs58@6.0.0)(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)': + '@bigmi/core@0.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)': dependencies: '@noble/hashes': 1.7.0 bech32: 2.0.0 - bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.2) + bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.3) bs58: 6.0.0 - viem: 2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + viem: 2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript @@ -1814,20 +1799,20 @@ snapshots: dependencies: '@lifi/types': 16.5.0 - '@lifi/sdk@3.5.0(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@lifi/sdk@3.5.1(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: - '@bigmi/core': 0.1.0(bs58@6.0.0)(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + '@bigmi/core': 0.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) '@lifi/types': 16.5.0 '@noble/curves': 1.8.0 - '@noble/hashes': 1.7.0 '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) bech32: 2.0.0 - bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.2) + bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.3) bs58: 6.0.0 - viem: 2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + viem: 2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil + - encoding - typescript - utf-8-validate - zod @@ -2065,9 +2050,9 @@ snapshots: '@paulmillr/qr@0.2.1': {} - '@safe-global/safe-apps-provider@0.18.5(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)': + '@safe-global/safe-apps-provider@0.18.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)': dependencies: - '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) events: 3.3.0 transitivePeerDependencies: - bufferutil @@ -2075,10 +2060,10 @@ snapshots: - utf-8-validate - zod - '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)': + '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)': dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.22.4 - viem: 2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + viem: 2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript @@ -2266,18 +2251,18 @@ snapshots: dependencies: '@types/node': 22.10.5 - '@wagmi/connectors@5.7.3(@wagmi/core@2.16.3(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(react@18.3.1)(typescript@5.7.2)(utf-8-validate@5.0.10)(viem@2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@wagmi/connectors@5.7.3(@wagmi/core@2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: '@coinbase/wallet-sdk': 4.2.3 '@metamask/sdk': 0.31.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) - '@safe-global/safe-apps-provider': 0.18.5(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) - '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) - '@wagmi/core': 2.16.3(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10)) - '@walletconnect/ethereum-provider': 2.17.0(bufferutil@4.0.9)(react@18.3.1)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-provider': 0.18.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + '@wagmi/core': 2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) + '@walletconnect/ethereum-provider': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) cbw-sdk: '@coinbase/wallet-sdk@3.9.3' - viem: 2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) + viem: 2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -2305,14 +2290,14 @@ snapshots: - utf-8-validate - zod - '@wagmi/core@2.16.3(react@18.3.1)(typescript@5.7.2)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10))': + '@wagmi/core@2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: eventemitter3: 5.0.1 - mipd: 0.0.7(typescript@5.7.2) - viem: 2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10) - zustand: 5.0.0(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)) + mipd: 0.0.7(typescript@5.7.3) + viem: 2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + zustand: 5.0.0(use-sync-external-store@1.2.0) optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - '@types/react' - immer @@ -2369,13 +2354,13 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/ethereum-provider@2.17.0(bufferutil@4.0.9)(react@18.3.1)(utf-8-validate@5.0.10)': + '@walletconnect/ethereum-provider@2.17.0(bufferutil@4.0.9)(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.7.0(react@18.3.1) + '@walletconnect/modal': 2.7.0 '@walletconnect/sign-client': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@walletconnect/types': 2.17.0 '@walletconnect/universal-provider': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) @@ -2482,16 +2467,16 @@ snapshots: '@walletconnect/safe-json': 1.0.2 pino: 7.11.0 - '@walletconnect/modal-core@2.7.0(react@18.3.1)': + '@walletconnect/modal-core@2.7.0': dependencies: - valtio: 1.11.2(react@18.3.1) + valtio: 1.11.2 transitivePeerDependencies: - '@types/react' - react - '@walletconnect/modal-ui@2.7.0(react@18.3.1)': + '@walletconnect/modal-ui@2.7.0': dependencies: - '@walletconnect/modal-core': 2.7.0(react@18.3.1) + '@walletconnect/modal-core': 2.7.0 lit: 2.8.0 motion: 10.16.2 qrcode: 1.5.3 @@ -2499,10 +2484,10 @@ snapshots: - '@types/react' - react - '@walletconnect/modal@2.7.0(react@18.3.1)': + '@walletconnect/modal@2.7.0': dependencies: - '@walletconnect/modal-core': 2.7.0(react@18.3.1) - '@walletconnect/modal-ui': 2.7.0(react@18.3.1) + '@walletconnect/modal-core': 2.7.0 + '@walletconnect/modal-ui': 2.7.0 transitivePeerDependencies: - '@types/react' - react @@ -2675,9 +2660,9 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 - abitype@1.0.7(typescript@5.7.2): + abitype@1.0.7(typescript@5.7.3): optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 agentkeepalive@4.6.0: dependencies: @@ -2729,14 +2714,14 @@ snapshots: uint8array-tools: 0.0.9 varuint-bitcoin: 2.0.0 - bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2): + bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.3): dependencies: '@noble/hashes': 1.7.0 bech32: 2.0.0 bip174: 3.0.0-rc.1 bs58check: 4.0.0 uint8array-tools: 0.0.9 - valibot: 0.38.0(typescript@5.7.2) + valibot: 0.38.0(typescript@5.7.3) varuint-bitcoin: 2.0.0 transitivePeerDependencies: - typescript @@ -3194,8 +3179,6 @@ snapshots: - bufferutil - utf-8-validate - js-tokens@4.0.0: {} - json-rpc-engine@6.1.0: dependencies: '@metamask/safe-event-emitter': 2.0.0 @@ -3237,10 +3220,6 @@ snapshots: lodash.isequal@4.5.0: {} - loose-envify@1.4.0: - dependencies: - js-tokens: 4.0.0 - lru-cache@10.4.3: {} math-intrinsics@1.1.0: {} @@ -3253,9 +3232,9 @@ snapshots: minimalistic-crypto-utils@1.0.1: {} - mipd@0.0.7(typescript@5.7.2): + mipd@0.0.7(typescript@5.7.3): optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 motion@10.16.2: dependencies: @@ -3302,17 +3281,17 @@ snapshots: dependencies: wrappy: 1.0.2 - ox@0.6.0(typescript@5.7.2): + ox@0.6.0(typescript@5.7.3): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 '@scure/bip32': 1.6.0 '@scure/bip39': 1.5.0 - abitype: 1.0.7(typescript@5.7.2) + abitype: 1.0.7(typescript@5.7.3) eventemitter3: 5.0.1 optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - zod @@ -3394,10 +3373,6 @@ snapshots: radix3@1.1.2: {} - react@18.3.1: - dependencies: - loose-envify: 1.4.0 - readable-stream@2.3.8: dependencies: core-util-is: 1.0.3 @@ -3542,7 +3517,7 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - typescript@5.7.2: {} + typescript@5.7.3: {} ufo@1.5.4: {} @@ -3579,9 +3554,7 @@ snapshots: optionalDependencies: idb-keyval: 6.2.1 - use-sync-external-store@1.2.0(react@18.3.1): - dependencies: - react: 18.3.1 + use-sync-external-store@1.2.0: {} utf-8-validate@5.0.10: dependencies: @@ -3601,34 +3574,32 @@ snapshots: uuid@9.0.1: {} - valibot@0.38.0(typescript@5.7.2): + valibot@0.38.0(typescript@5.7.3): optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 - valtio@1.11.2(react@18.3.1): + valtio@1.11.2: dependencies: proxy-compare: 2.5.1 - use-sync-external-store: 1.2.0(react@18.3.1) - optionalDependencies: - react: 18.3.1 + use-sync-external-store: 1.2.0 varuint-bitcoin@2.0.0: dependencies: uint8array-tools: 0.0.8 - viem@2.22.3(bufferutil@4.0.9)(typescript@5.7.2)(utf-8-validate@5.0.10): + viem@2.22.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10): dependencies: '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 '@scure/bip32': 1.6.0 '@scure/bip39': 1.5.0 - abitype: 1.0.7(typescript@5.7.2) + abitype: 1.0.7(typescript@5.7.3) isows: 1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - ox: 0.6.0(typescript@5.7.2) + ox: 0.6.0(typescript@5.7.3) webauthn-p256: 0.0.10 ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -3707,7 +3678,6 @@ snapshots: y18n: 4.0.3 yargs-parser: 18.1.3 - zustand@5.0.0(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)): + zustand@5.0.0(use-sync-external-store@1.2.0): optionalDependencies: - react: 18.3.1 - use-sync-external-store: 1.2.0(react@18.3.1) + use-sync-external-store: 1.2.0 diff --git a/package.json b/package.json index efb21230..8abd8cdc 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "bech32": "^2.0.0", "bitcoinjs-lib": "^7.0.0-rc.0", "bs58": "^6.0.0", - "viem": "^2.22.3" + "viem": "^2.22.5" }, "devDependencies": { "@biomejs/biome": "^1.9.4", @@ -117,7 +117,7 @@ "pinst": "^3.0.0", "standard-version": "^9.5.0", "ts-node": "^10.9.2", - "typescript": "^5.7.2", + "typescript": "^5.7.3", "vitest": "^2.1.8" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82862837..02e105c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: '@bigmi/core': specifier: ^0.1.0 - version: 0.1.0(bs58@6.0.0)(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + version: 0.1.0(bs58@6.0.0)(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) '@lifi/types': specifier: ^16.5.0 version: 16.5.0 @@ -28,20 +28,20 @@ importers: version: 2.0.0 bitcoinjs-lib: specifier: ^7.0.0-rc.0 - version: 7.0.0-rc.0(typescript@5.7.2) + version: 7.0.0-rc.0(typescript@5.7.3) bs58: specifier: ^6.0.0 version: 6.0.0 viem: - specifier: ^2.22.3 - version: 2.22.3(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + specifier: ^2.22.5 + version: 2.22.5(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) devDependencies: '@biomejs/biome': specifier: ^1.9.4 version: 1.9.4 '@commitlint/cli': specifier: ^19.6.1 - version: 19.6.1(@types/node@22.10.1)(typescript@5.7.2) + version: 19.6.1(@types/node@22.10.1)(typescript@5.7.3) '@commitlint/config-conventional': specifier: ^19.6.0 version: 19.6.0 @@ -53,7 +53,7 @@ importers: version: 8.5.13 '@vitest/coverage-v8': specifier: ^2.1.8 - version: 2.1.8(vitest@2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.2))) + version: 2.1.8(vitest@2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3))) fs-extra: specifier: ^11.2.0 version: 11.2.0 @@ -65,10 +65,10 @@ importers: version: 15.3.0 madge: specifier: ^8.0.0 - version: 8.0.0(typescript@5.7.2) + version: 8.0.0(typescript@5.7.3) msw: specifier: ^2.7.0 - version: 2.7.0(@types/node@22.10.1)(typescript@5.7.2) + version: 2.7.0(@types/node@22.10.1)(typescript@5.7.3) pinst: specifier: ^3.0.0 version: 3.0.0 @@ -77,13 +77,13 @@ importers: version: 9.5.0 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.1)(typescript@5.7.2) + version: 10.9.2(@types/node@22.10.1)(typescript@5.7.3) typescript: - specifier: ^5.7.2 - version: 5.7.2 + specifier: ^5.7.3 + version: 5.7.3 vitest: specifier: ^2.1.8 - version: 2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.2)) + version: 2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3)) packages: @@ -2655,8 +2655,8 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript@5.7.2: - resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} hasBin: true @@ -2722,8 +2722,8 @@ packages: varuint-bitcoin@2.0.0: resolution: {integrity: sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==} - viem@2.22.3: - resolution: {integrity: sha512-lO8K4lL5vWfJ9dmeJo9BfwlJJ0vNDrgLXgwFJNzjLJ6eDfOGXr48yzNhqt96ybYS7SlM7ecT7yhJIVfhZLkOkw==} + viem@2.22.5: + resolution: {integrity: sha512-rked1t/qPQAFNTLoFU18/OCv5KdbIZPwAwlY2X7dtH8unt28kccN6RBrjEjhNrY6wQlbO4phGwslNUzd8a2faw==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -2953,13 +2953,13 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@bigmi/core@0.1.0(bs58@6.0.0)(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)': + '@bigmi/core@0.1.0(bs58@6.0.0)(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)': dependencies: '@noble/hashes': 1.6.1 bech32: 2.0.0 - bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.2) + bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.3) bs58: 6.0.0 - viem: 2.22.3(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) + viem: 2.22.5(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript @@ -3014,11 +3014,11 @@ snapshots: '@types/tough-cookie': 4.0.5 tough-cookie: 4.1.4 - '@commitlint/cli@19.6.1(@types/node@22.10.1)(typescript@5.7.2)': + '@commitlint/cli@19.6.1(@types/node@22.10.1)(typescript@5.7.3)': dependencies: '@commitlint/format': 19.5.0 '@commitlint/lint': 19.6.0 - '@commitlint/load': 19.6.1(@types/node@22.10.1)(typescript@5.7.2) + '@commitlint/load': 19.6.1(@types/node@22.10.1)(typescript@5.7.3) '@commitlint/read': 19.5.0 '@commitlint/types': 19.5.0 tinyexec: 0.3.1 @@ -3065,15 +3065,15 @@ snapshots: '@commitlint/rules': 19.6.0 '@commitlint/types': 19.5.0 - '@commitlint/load@19.6.1(@types/node@22.10.1)(typescript@5.7.2)': + '@commitlint/load@19.6.1(@types/node@22.10.1)(typescript@5.7.3)': dependencies: '@commitlint/config-validator': 19.5.0 '@commitlint/execute-rule': 19.5.0 '@commitlint/resolve-extends': 19.5.0 '@commitlint/types': 19.5.0 chalk: 5.4.0 - cosmiconfig: 9.0.0(typescript@5.7.2) - cosmiconfig-typescript-loader: 6.1.0(@types/node@22.10.1)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2) + cosmiconfig: 9.0.0(typescript@5.7.3) + cosmiconfig-typescript-loader: 6.1.0(@types/node@22.10.1)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -3496,7 +3496,7 @@ snapshots: '@typescript-eslint/types@7.18.0': {} - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.7.2)': + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 @@ -3505,9 +3505,9 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.7.2) + ts-api-utils: 1.3.0(typescript@5.7.3) optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -3516,7 +3516,7 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 - '@vitest/coverage-v8@2.1.8(vitest@2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.2)))': + '@vitest/coverage-v8@2.1.8(vitest@2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -3530,7 +3530,7 @@ snapshots: std-env: 3.8.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.2)) + vitest: 2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3)) transitivePeerDependencies: - supports-color @@ -3541,13 +3541,13 @@ snapshots: chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.8(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.2))(vite@5.4.11(@types/node@22.10.1))': + '@vitest/mocker@2.1.8(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3))(vite@5.4.11(@types/node@22.10.1))': dependencies: '@vitest/spy': 2.1.8 estree-walker: 3.0.3 magic-string: 0.30.14 optionalDependencies: - msw: 2.7.0(@types/node@22.10.1)(typescript@5.7.2) + msw: 2.7.0(@types/node@22.10.1)(typescript@5.7.3) vite: 5.4.11(@types/node@22.10.1) '@vitest/pretty-format@2.1.8': @@ -3618,9 +3618,9 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 - abitype@1.0.7(typescript@5.7.2): + abitype@1.0.7(typescript@5.7.3): optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 acorn-walk@8.3.4: dependencies: @@ -3706,14 +3706,14 @@ snapshots: uint8array-tools: 0.0.9 varuint-bitcoin: 2.0.0 - bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.2): + bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.3): dependencies: '@noble/hashes': 1.6.1 bech32: 2.0.0 bip174: 3.0.0-rc.1 bs58check: 4.0.0 uint8array-tools: 0.0.9 - valibot: 0.38.0(typescript@5.7.2) + valibot: 0.38.0(typescript@5.7.3) varuint-bitcoin: 2.0.0 transitivePeerDependencies: - typescript @@ -4012,21 +4012,21 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@6.1.0(@types/node@22.10.1)(cosmiconfig@9.0.0(typescript@5.7.2))(typescript@5.7.2): + cosmiconfig-typescript-loader@6.1.0(@types/node@22.10.1)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3): dependencies: '@types/node': 22.10.1 - cosmiconfig: 9.0.0(typescript@5.7.2) + cosmiconfig: 9.0.0(typescript@5.7.3) jiti: 2.4.2 - typescript: 5.7.2 + typescript: 5.7.3 - cosmiconfig@9.0.0(typescript@5.7.2): + cosmiconfig@9.0.0(typescript@5.7.3): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 create-require@1.1.1: {} @@ -4072,7 +4072,7 @@ snapshots: commander: 12.1.0 filing-cabinet: 5.0.2 precinct: 12.1.2 - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -4114,24 +4114,24 @@ snapshots: detective-stylus@5.0.0: {} - detective-typescript@13.0.0(typescript@5.7.2): + detective-typescript@13.0.0(typescript@5.7.3): dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.3) ast-module-types: 6.0.0 node-source-walk: 7.0.0 - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - supports-color - detective-vue2@2.0.3(typescript@5.7.2): + detective-vue2@2.0.3(typescript@5.7.3): dependencies: '@vue/compiler-sfc': 3.5.11 detective-es6: 5.0.0 detective-sass: 6.0.0 detective-scss: 5.0.0 detective-stylus: 5.0.0 - detective-typescript: 13.0.0(typescript@5.7.2) - typescript: 5.7.2 + detective-typescript: 13.0.0(typescript@5.7.3) + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -4289,7 +4289,7 @@ snapshots: sass-lookup: 6.0.1 stylus-lookup: 6.0.0 tsconfig-paths: 4.2.0 - typescript: 5.7.2 + typescript: 5.7.3 fill-range@7.1.1: dependencies: @@ -4724,7 +4724,7 @@ snapshots: dependencies: yallist: 4.0.0 - madge@8.0.0(typescript@5.7.2): + madge@8.0.0(typescript@5.7.3): dependencies: chalk: 4.1.2 commander: 7.2.0 @@ -4739,7 +4739,7 @@ snapshots: ts-graphviz: 2.1.4 walkdir: 0.4.1 optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -4830,7 +4830,7 @@ snapshots: ms@2.1.3: {} - msw@2.7.0(@types/node@22.10.1)(typescript@5.7.2): + msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3): dependencies: '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 @@ -4851,7 +4851,7 @@ snapshots: type-fest: 4.30.2 yargs: 17.7.2 optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - '@types/node' @@ -4922,17 +4922,17 @@ snapshots: outvariant@1.4.3: {} - ox@0.6.0(typescript@5.7.2): + ox@0.6.0(typescript@5.7.3): dependencies: '@adraffy/ens-normalize': 1.11.0 '@noble/curves': 1.8.0 '@noble/hashes': 1.6.1 '@scure/bip32': 1.6.0 '@scure/bip39': 1.5.0 - abitype: 1.0.7(typescript@5.7.2) + abitype: 1.0.7(typescript@5.7.3) eventemitter3: 5.0.1 optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - zod @@ -5073,12 +5073,12 @@ snapshots: detective-sass: 6.0.0 detective-scss: 5.0.0 detective-stylus: 5.0.0 - detective-typescript: 13.0.0(typescript@5.7.2) - detective-vue2: 2.0.3(typescript@5.7.2) + detective-typescript: 13.0.0(typescript@5.7.3) + detective-vue2: 2.0.3(typescript@5.7.3) module-definition: 6.0.0 node-source-walk: 7.0.0 postcss: 8.4.47 - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -5453,9 +5453,9 @@ snapshots: trim-newlines@3.0.1: {} - ts-api-utils@1.3.0(typescript@5.7.2): + ts-api-utils@1.3.0(typescript@5.7.3): dependencies: - typescript: 5.7.2 + typescript: 5.7.3 ts-graphviz@2.1.4: dependencies: @@ -5464,7 +5464,7 @@ snapshots: '@ts-graphviz/common': 2.1.4 '@ts-graphviz/core': 2.0.5 - ts-node@10.9.2(@types/node@22.10.1)(typescript@5.7.2): + ts-node@10.9.2(@types/node@22.10.1)(typescript@5.7.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -5478,7 +5478,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.7.2 + typescript: 5.7.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 @@ -5502,7 +5502,7 @@ snapshots: typedarray@0.0.6: {} - typescript@5.7.2: {} + typescript@5.7.3: {} uglify-js@3.19.3: optional: true @@ -5537,9 +5537,9 @@ snapshots: v8-compile-cache-lib@3.0.1: {} - valibot@0.38.0(typescript@5.7.2): + valibot@0.38.0(typescript@5.7.3): optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 validate-npm-package-license@3.0.4: dependencies: @@ -5550,19 +5550,19 @@ snapshots: dependencies: uint8array-tools: 0.0.8 - viem@2.22.3(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10): + viem@2.22.5(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10): dependencies: '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 '@scure/bip32': 1.6.0 '@scure/bip39': 1.5.0 - abitype: 1.0.7(typescript@5.7.2) + abitype: 1.0.7(typescript@5.7.3) isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ox: 0.6.0(typescript@5.7.2) + ox: 0.6.0(typescript@5.7.3) webauthn-p256: 0.0.10 ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -5595,10 +5595,10 @@ snapshots: '@types/node': 22.10.1 fsevents: 2.3.3 - vitest@2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.2)): + vitest@2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3)): dependencies: '@vitest/expect': 2.1.8 - '@vitest/mocker': 2.1.8(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.2))(vite@5.4.11(@types/node@22.10.1)) + '@vitest/mocker': 2.1.8(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3))(vite@5.4.11(@types/node@22.10.1)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.8 '@vitest/snapshot': 2.1.8 diff --git a/src/core/EVM/EVMStepExecutor.ts b/src/core/EVM/EVMStepExecutor.ts index 5e2fc89e..87a2b3bd 100644 --- a/src/core/EVM/EVMStepExecutor.ts +++ b/src/core/EVM/EVMStepExecutor.ts @@ -377,7 +377,10 @@ export class EVMStepExecutor extends BaseStepExecutor { }) transactionRequest.to = fromChain.permit2Proxy - transactionRequest.data = permitSignature.data + // If it's a permit step, we already have everything encoded in the data field + transactionRequest.data = isPermitStep + ? transactionRequest.data + : permitSignature.data try { // Try to re-estimate the gas due to additional Permit data diff --git a/src/core/EVM/waitForBatchTransactionReceipt.ts b/src/core/EVM/waitForBatchTransactionReceipt.ts index 86e01668..2c11227e 100644 --- a/src/core/EVM/waitForBatchTransactionReceipt.ts +++ b/src/core/EVM/waitForBatchTransactionReceipt.ts @@ -18,37 +18,44 @@ export const waitForBatchTransactionReceipt = async ( client: Client, batchHash: Hash ): Promise => { - return waitForResult(async () => { - const callsDetails = await getAction( - client, - getCallsStatus, - 'getCallsStatus' - )({ - id: batchHash, - }) + return waitForResult( + async () => { + const callsDetails = await getAction( + client, + getCallsStatus, + 'getCallsStatus' + )({ + id: batchHash, + }) - if (callsDetails.status === 'PENDING') { - return undefined - } + if (callsDetails.status === 'PENDING') { + return undefined + } - if (callsDetails.status === 'CONFIRMED') { - if ( - !callsDetails.receipts?.length || - !callsDetails.receipts.every((receipt) => receipt.transactionHash) || - callsDetails.receipts.some((receipt) => receipt.status === 'reverted') - ) { - throw new TransactionError( - LiFiErrorCode.TransactionFailed, - 'Transaction was reverted.' - ) + if (callsDetails.status === 'CONFIRMED') { + if ( + !callsDetails.receipts?.length || + !callsDetails.receipts.every((receipt) => receipt.transactionHash) || + callsDetails.receipts.some((receipt) => receipt.status === 'reverted') + ) { + throw new TransactionError( + LiFiErrorCode.TransactionFailed, + 'Transaction was reverted.' + ) + } + const transactionReceipt = callsDetails.receipts.at(-1)! + return transactionReceipt } - const transactionReceipt = callsDetails.receipts.at(-1)! - return transactionReceipt - } - throw new TransactionError( - LiFiErrorCode.TransactionFailed, - 'Transaction not found.' - ) - }, 3000) + throw new TransactionError( + LiFiErrorCode.TransactionNotFound, + 'Transaction not found.' + ) + }, + 5000, + 3, + (_, error) => { + return !(error instanceof TransactionError) + } + ) } diff --git a/src/core/EVM/waitForRelayedTransactionReceipt.ts b/src/core/EVM/waitForRelayedTransactionReceipt.ts index a42eeba8..447a906f 100644 --- a/src/core/EVM/waitForRelayedTransactionReceipt.ts +++ b/src/core/EVM/waitForRelayedTransactionReceipt.ts @@ -1,4 +1,7 @@ +import type { ExtendedTransactionInfo } from '@lifi/types' import type { Hash, WalletCallReceipt as _WalletCallReceipt } from 'viem' +import { LiFiErrorCode } from '../../errors/constants.js' +import { TransactionError } from '../../errors/errors.js' import { getRelayedTransactionStatus } from '../../services/api.js' import { waitForResult } from '../../utils/waitForResult.js' @@ -11,37 +14,37 @@ export const waitForRelayedTransactionReceipt = async ( taskId: Hash ): Promise => { return waitForResult(async () => { - const status = await getRelayedTransactionStatus({ + const result = await getRelayedTransactionStatus({ taskId, + }).catch((e) => { + if (process.env.NODE_ENV === 'development') { + console.debug('Fetching status from relayer failed.', e) + } + return undefined }) - // biome-ignore lint/suspicious/noConsole: - console.log('status', status) - - if (status.status === 'pending') { - return status as any + switch (result?.data.status) { + case 'PENDING': + return undefined + case 'DONE': { + const sending: ExtendedTransactionInfo | undefined = result?.data + .transactionStatus?.sending as ExtendedTransactionInfo + return { + status: 'success', + gasUsed: sending?.gasUsed, + transactionHash: result?.data.metadata.txHash, + } as unknown as WalletCallReceipt + } + case 'FAILED': + throw new TransactionError( + LiFiErrorCode.TransactionFailed, + 'Transaction was reverted.' + ) + default: + throw new TransactionError( + LiFiErrorCode.TransactionNotFound, + 'Transaction not found.' + ) } - - return undefined - - // if (status.status === 'success') { - // if ( - // !status.receipts?.length || - // !status.receipts.every((receipt) => receipt.transactionHash) || - // status.receipts.some((receipt) => receipt.status === 'reverted') - // ) { - // throw new TransactionError( - // LiFiErrorCode.TransactionFailed, - // 'Transaction was reverted.' - // ) - // } - // const transactionReceipt = callsDetails.receipts.at(-1)! - // return transactionReceipt - // } - - // throw new TransactionError( - // LiFiErrorCode.TransactionFailed, - // 'Transaction not found.' - // ) - }, 3000) + }, 5000) } diff --git a/src/core/waitForTransactionStatus.ts b/src/core/waitForTransactionStatus.ts index a3c4eac6..49e25602 100644 --- a/src/core/waitForTransactionStatus.ts +++ b/src/core/waitForTransactionStatus.ts @@ -49,7 +49,9 @@ export async function waitForTransactionStatus( } }) .catch((e) => { - console.debug('Fetching status from backend failed.', e) + if (process.env.NODE_ENV === 'development') { + console.debug('Fetching status from backend failed.', e) + } return undefined }) } @@ -64,7 +66,9 @@ export async function waitForTransactionStatus( const resolvedStatus = await status if (!('receiving' in resolvedStatus)) { - throw new ServerError("Status doesn't contain receiving information.") + throw new ServerError( + "Status doesn't contain destination chain information." + ) } return resolvedStatus diff --git a/src/errors/constants.ts b/src/errors/constants.ts index 8675b685..a4804c1f 100644 --- a/src/errors/constants.ts +++ b/src/errors/constants.ts @@ -35,6 +35,7 @@ export enum LiFiErrorCode { TransactionExpired = 1018, TransactionSimulationFailed = 1019, TransactionConflict = 1020, + TransactionNotFound = 1021, } export enum ErrorMessage { diff --git a/src/services/api.ts b/src/services/api.ts index 895a007f..aa104789 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -40,9 +40,12 @@ import { isRoutesRequest, isStep } from '../typeguards.js' import { withDedupe } from '../utils/withDedupe.js' interface TaskStatus { - status: 'pending' | 'processing' | 'success' | 'failed' - transactionHash?: Hash - error?: string + data: { + status: 'DONE' | 'PENDING' | 'FAILED' + message?: string + metadata: { chainId: number; txHash?: Hash } + transactionStatus?: StatusResponse + } } interface RelayStatusRequest { diff --git a/src/utils/convertQuoteToRoute.ts b/src/utils/convertQuoteToRoute.ts index 6165f586..756478d7 100644 --- a/src/utils/convertQuoteToRoute.ts +++ b/src/utils/convertQuoteToRoute.ts @@ -4,37 +4,40 @@ import { ValidationError } from '../errors/errors.js' /** * Converts a quote to Route - * @param step - Step returned from the quote endpoint. + * @param quote - Step returned from the quote endpoint. * @param txHash * @param chainId * @returns - The route to be executed. * @throws {BaseError} Throws a ValidationError if the step has missing values. */ -export const convertQuoteToRoute = (step: LiFiStep): Route => { - if (!step.estimate.fromAmountUSD) { +export const convertQuoteToRoute = (quote: LiFiStep): Route => { + if (!quote.estimate.fromAmountUSD) { throw new SDKError( new ValidationError("Missing 'fromAmountUSD' in step estimate.") ) } - if (!step.estimate.toAmountUSD) { + if (!quote.estimate.toAmountUSD) { throw new SDKError( new ValidationError("Missing 'toAmountUSD' in step estimate.") ) } const route: Route = { - fromToken: step.action.fromToken, - toToken: step.action.toToken, - fromAmount: step.action.fromAmount, - toAmount: step.estimate.toAmount, - id: step.id, - fromChainId: step.action.fromToken.chainId, - toChainId: step.action.toToken.chainId, - fromAmountUSD: step.estimate.fromAmountUSD, - toAmountUSD: step.estimate.toAmountUSD, - steps: [step], - toAmountMin: step.estimate.toAmountMin, + id: quote.id, + fromChainId: quote.action.fromToken.chainId, + fromToken: quote.action.fromToken, + fromAmount: quote.action.fromAmount, + fromAmountUSD: quote.estimate.fromAmountUSD, + fromAddress: quote.action.fromAddress, + toChainId: quote.action.toToken.chainId, + toToken: quote.action.toToken, + toAmount: quote.estimate.toAmount, + toAmountMin: quote.estimate.toAmountMin, + toAmountUSD: quote.estimate.toAmountUSD, + toAddress: quote.action.toAddress || quote.action.fromAddress, + gasCostUSD: quote.estimate.gasCosts?.[0].amountUSD, + steps: [quote], insurance: { state: 'NOT_INSURABLE', feeAmountUsd: '0' }, } diff --git a/src/utils/waitForResult.ts b/src/utils/waitForResult.ts index b28d8b4c..954e1529 100644 --- a/src/utils/waitForResult.ts +++ b/src/utils/waitForResult.ts @@ -4,18 +4,37 @@ import { sleep } from './sleep.js' * Repeatedly calls a given asynchronous function until it resolves with a value * @param fn The function that should be repeated * @param interval The timeout in milliseconds between retries, defaults to 5000 + * @param maxRetries Maximum number of retries before throwing an error, defaults to 3 + * @param shouldRetry Optional predicate to determine if an error should trigger a retry * @returns The result of the fn function + * @throws Error if maximum retries is reached, if function keeps returning undefined, or if shouldRetry returns false */ export const waitForResult = async ( fn: () => Promise, - interval = 5000 + interval = 5000, + maxRetries = 3, + shouldRetry: (count: number, error: unknown) => boolean = () => true ): Promise => { let result: T | undefined + let attempts = 0 + while (!result) { - result = await fn() - if (!result) { + try { + result = await fn() + if (!result) { + await sleep(interval) + } + } catch (error) { + if (!shouldRetry(attempts, error)) { + throw error + } + attempts++ + if (attempts === maxRetries) { + throw error + } await sleep(interval) } } + return result } diff --git a/src/utils/waitForResult.unit.spec.ts b/src/utils/waitForResult.unit.spec.ts index c1f33e9f..0501a5ca 100644 --- a/src/utils/waitForResult.unit.spec.ts +++ b/src/utils/waitForResult.unit.spec.ts @@ -1,4 +1,4 @@ -import { beforeEach, describe, expect, it, vi } from 'vitest' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { waitForResult } from './waitForResult.js' describe('utils', () => { @@ -7,24 +7,69 @@ describe('utils', () => { beforeEach(() => { mockedFunction = vi.fn() + vi.useFakeTimers() }) - //.mockImplementation(() => Promise.reject(new Error('some error'))) - it('should throw an error if repeat function fails', async () => { - mockedFunction.mockRejectedValue(new Error('some error')) + afterEach(() => { + vi.useRealTimers() + }) + + it('should throw immediately if shouldRetry returns false', async () => { + mockedFunction.mockImplementation(() => Promise.reject('some error')) + const shouldRetry = vi.fn().mockReturnValue(false) + + const promise = waitForResult(mockedFunction, 1000, 3, shouldRetry) - await expect(waitForResult(mockedFunction)).rejects.toThrow('some error') + await expect(promise).rejects.toThrowError('some error') + expect(mockedFunction).toHaveBeenCalledTimes(1) + expect(shouldRetry).toHaveBeenCalledWith(0, 'some error') }) it('should try until repeat function succeeds', async () => { mockedFunction .mockResolvedValueOnce(undefined) .mockResolvedValueOnce(undefined) + .mockResolvedValueOnce('success!') + + const promise = waitForResult(mockedFunction, 1000) + + // Fast-forward through retries + for (let i = 0; i < 2; i++) { + await vi.advanceTimersByTimeAsync(1000) + } + + const result = await promise + expect(result).toEqual('success!') + expect(mockedFunction).toHaveBeenCalledTimes(3) + }) + + it('should respect the interval between retries', async () => { + mockedFunction .mockResolvedValueOnce(undefined) .mockResolvedValueOnce('success!') - const result = await waitForResult(mockedFunction, 10) + const promise = waitForResult(mockedFunction, 2000) + + await vi.advanceTimersByTimeAsync(2000) + const result = await promise + expect(result).toEqual('success!') + expect(mockedFunction).toHaveBeenCalledTimes(2) + }) + + it('should throw an error if repeat function fails and maxRetries is reached', async () => { + mockedFunction.mockImplementation(() => Promise.reject('some error')) + const maxRetries = 2 + + const promise = waitForResult(mockedFunction, 1000, maxRetries) + const expectPromise = expect(promise).rejects.toThrowError('some error') + // Fast-forward through retries + for (let i = 0; i < maxRetries - 1; i++) { + await vi.advanceTimersByTimeAsync(1000) + } + + await expectPromise + expect(mockedFunction).toHaveBeenCalledTimes(maxRetries) }) }) }) From 484f0833c7b68c0024a97ae8db76117a16b4c06e Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Thu, 9 Jan 2025 17:11:08 +0100 Subject: [PATCH 11/26] chore(release): 3.6.0-beta.0 --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3d119285..7d055329 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/sdk", - "version": "3.5.1", + "version": "3.6.0-beta.0", "description": "LI.FI Any-to-Any Cross-Chain-Swap SDK", "keywords": [ "bridge", diff --git a/src/version.ts b/src/version.ts index 219adced..3e8ce9d9 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ export const name = '@lifi/sdk' -export const version = '3.5.1' +export const version = '3.6.0-beta.0' From bbef7f09517f76b496cf830548ba7d9e836579d0 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Mon, 13 Jan 2025 11:21:23 +0100 Subject: [PATCH 12/26] refactor: improve relayed tx handling --- src/core/EVM/EVMStepExecutor.ts | 45 ++++++------ src/core/EVM/signPermitMessage.ts | 22 +++--- .../EVM/waitForRelayedTransactionReceipt.ts | 69 ++++++++++--------- 3 files changed, 70 insertions(+), 66 deletions(-) diff --git a/src/core/EVM/EVMStepExecutor.ts b/src/core/EVM/EVMStepExecutor.ts index 87a2b3bd..7e73b44a 100644 --- a/src/core/EVM/EVMStepExecutor.ts +++ b/src/core/EVM/EVMStepExecutor.ts @@ -375,31 +375,7 @@ export class EVMStepExecutor extends BaseStepExecutor { permitData: isPermitStep ? step.permitData : undefined, useWitness: isPermitStep, }) - transactionRequest.to = fromChain.permit2Proxy - // If it's a permit step, we already have everything encoded in the data field - transactionRequest.data = isPermitStep - ? transactionRequest.data - : permitSignature.data - - try { - // Try to re-estimate the gas due to additional Permit data - transactionRequest.gas = await estimateGas(this.client, { - account: this.client.account!, - to: transactionRequest.to as Address, - data: transactionRequest.data as Hex, - value: transactionRequest.value, - }) - } catch { - // Let the wallet estimate the gas in case of failure - transactionRequest.gas = undefined - } - - process = this.statusManager.updateProcess( - step, - process.type, - 'ACTION_REQUIRED' - ) } if (isPermitStep && permitSignature) { const relayedTransaction = await relayTransaction({ @@ -412,6 +388,27 @@ export class EVMStepExecutor extends BaseStepExecutor { }) txHash = relayedTransaction.data.taskId } else { + if (permitSignature) { + // If we have a permit signature, we need to use updated data + transactionRequest.data = permitSignature.data + try { + // Try to re-estimate the gas due to additional Permit data + transactionRequest.gas = await estimateGas(this.client, { + account: this.client.account!, + to: transactionRequest.to as Address, + data: transactionRequest.data as Hex, + value: transactionRequest.value, + }) + } catch { + // Let the wallet estimate the gas in case of failure + transactionRequest.gas = undefined + } + } + process = this.statusManager.updateProcess( + step, + process.type, + 'ACTION_REQUIRED' + ) txHash = await getAction( this.client, sendTransaction, diff --git a/src/core/EVM/signPermitMessage.ts b/src/core/EVM/signPermitMessage.ts index 96967127..a18fb89d 100644 --- a/src/core/EVM/signPermitMessage.ts +++ b/src/core/EVM/signPermitMessage.ts @@ -242,6 +242,17 @@ export const signPermitMessage = async ( useWitness?: boolean } ): Promise => { + if (useWitness) { + return signPermit2WitnessMessage( + client, + transactionRequest, + chain, + tokenAddress, + amount, + permitData + ) + } + let _nativePermit = nativePermit if (!_nativePermit) { @@ -259,17 +270,6 @@ export const signPermitMessage = async ( ) } - if (useWitness) { - return signPermit2WitnessMessage( - client, - transactionRequest, - chain, - tokenAddress, - amount, - permitData - ) - } - return signPermit2Message( client, transactionRequest, diff --git a/src/core/EVM/waitForRelayedTransactionReceipt.ts b/src/core/EVM/waitForRelayedTransactionReceipt.ts index 447a906f..265f2236 100644 --- a/src/core/EVM/waitForRelayedTransactionReceipt.ts +++ b/src/core/EVM/waitForRelayedTransactionReceipt.ts @@ -13,38 +13,45 @@ export type WalletCallReceipt = _WalletCallReceipt< export const waitForRelayedTransactionReceipt = async ( taskId: Hash ): Promise => { - return waitForResult(async () => { - const result = await getRelayedTransactionStatus({ - taskId, - }).catch((e) => { - if (process.env.NODE_ENV === 'development') { - console.debug('Fetching status from relayer failed.', e) - } - return undefined - }) - - switch (result?.data.status) { - case 'PENDING': + return waitForResult( + async () => { + const result = await getRelayedTransactionStatus({ + taskId, + }).catch((e) => { + if (process.env.NODE_ENV === 'development') { + console.debug('Fetching status from relayer failed.', e) + } return undefined - case 'DONE': { - const sending: ExtendedTransactionInfo | undefined = result?.data - .transactionStatus?.sending as ExtendedTransactionInfo - return { - status: 'success', - gasUsed: sending?.gasUsed, - transactionHash: result?.data.metadata.txHash, - } as unknown as WalletCallReceipt + }) + + switch (result?.data.status) { + case 'PENDING': + return undefined + case 'DONE': { + const sending: ExtendedTransactionInfo | undefined = result?.data + .transactionStatus?.sending as ExtendedTransactionInfo + return { + status: 'success', + gasUsed: sending?.gasUsed, + transactionHash: result?.data.metadata.txHash, + } as unknown as WalletCallReceipt + } + case 'FAILED': + throw new TransactionError( + LiFiErrorCode.TransactionFailed, + 'Transaction was reverted.' + ) + default: + throw new TransactionError( + LiFiErrorCode.TransactionNotFound, + 'Transaction not found.' + ) } - case 'FAILED': - throw new TransactionError( - LiFiErrorCode.TransactionFailed, - 'Transaction was reverted.' - ) - default: - throw new TransactionError( - LiFiErrorCode.TransactionNotFound, - 'Transaction not found.' - ) + }, + 5000, + 3, + (_, error) => { + return !(error instanceof TransactionError) } - }, 5000) + ) } From 44e09e3adf4f886ac1df557f8b31abc2081a8072 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 14 Jan 2025 11:06:48 +0100 Subject: [PATCH 13/26] chore(release): 3.6.0-beta.1 --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 33d30e09..c74573fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/sdk", - "version": "3.5.2", + "version": "3.6.0-beta.1", "description": "LI.FI Any-to-Any Cross-Chain-Swap SDK", "keywords": [ "bridge", diff --git a/src/version.ts b/src/version.ts index 3e8ce9d9..d4ac211c 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ export const name = '@lifi/sdk' -export const version = '3.6.0-beta.0' +export const version = '3.6.0-beta.1' From 3def9226ee9299035ace305585a4af7584d1ec86 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 14 Jan 2025 11:30:10 +0100 Subject: [PATCH 14/26] chore: export typeguard --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index a4c62e5a..227185ae 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,6 +12,7 @@ export { setTokenAllowance, } from './core/EVM/setAllowance.js' export { isEVM } from './core/EVM/types.js' +export { isEVMPermitStep } from './core/EVM/typeguards.js' export type { EVMProvider, EVMProviderOptions, From 78c591b30944e3e03ab30f021200e3448bc11216 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 14 Jan 2025 11:30:22 +0100 Subject: [PATCH 15/26] chore(release): 3.6.0-beta.2 --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c74573fc..37011179 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/sdk", - "version": "3.6.0-beta.1", + "version": "3.6.0-beta.2", "description": "LI.FI Any-to-Any Cross-Chain-Swap SDK", "keywords": [ "bridge", diff --git a/src/version.ts b/src/version.ts index d4ac211c..d609b8cb 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ export const name = '@lifi/sdk' -export const version = '3.6.0-beta.1' +export const version = '3.6.0-beta.2' From 0e585e25f8828511191d5a2c5551c54a2c292f70 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 14 Jan 2025 13:53:24 +0100 Subject: [PATCH 16/26] fix: move ankr provider to the bottom --- src/core/UTXO/getUTXOAPIPublicClient.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/UTXO/getUTXOAPIPublicClient.ts b/src/core/UTXO/getUTXOAPIPublicClient.ts index eccc34da..7037c8f1 100644 --- a/src/core/UTXO/getUTXOAPIPublicClient.ts +++ b/src/core/UTXO/getUTXOAPIPublicClient.ts @@ -49,15 +49,15 @@ export const getUTXOAPIPublicClient = async (chainId: number) => { key: 'blockchair', includeChainToURL: true, }), - utxo('https://rpc.ankr.com/http/btc_blockbook/api/v2', { - key: 'ankr', - }), utxo('https://api.blockcypher.com/v1/btc/main', { key: 'blockcypher', }), utxo('https://mempool.space/api', { key: 'mempool', }), + utxo('https://rpc.ankr.com/http/btc_blockbook/api/v2', { + key: 'ankr', + }), ]), }).extend(UTXOAPIActions) publicAPIClients[chainId] = client From 4b03fb028c0626e4067f741ea6d71afef3135ada Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 14 Jan 2025 13:53:35 +0100 Subject: [PATCH 17/26] chore: adjust typeguard --- src/core/EVM/typeguards.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/EVM/typeguards.ts b/src/core/EVM/typeguards.ts index 38507a18..7f6e1d3e 100644 --- a/src/core/EVM/typeguards.ts +++ b/src/core/EVM/typeguards.ts @@ -3,5 +3,5 @@ import type { EVMPermitStep } from './types.js' export function isEVMPermitStep(step: LiFiStepExtended): step is EVMPermitStep { const evmStep = step as EVMPermitStep - return 'permit' in evmStep || 'permitData' in evmStep || 'witness' in evmStep + return 'permit' in evmStep && 'permitData' in evmStep && 'witness' in evmStep } From 83117fa12ee431b12808c6a1b589ed1420dc367f Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Wed, 15 Jan 2025 18:27:01 +0100 Subject: [PATCH 18/26] fix: improve permit flow --- src/core/EVM/EVMStepExecutor.ts | 21 ++- src/core/EVM/getNativePermit.ts | 285 +++++++++++++++++++++++------- src/core/EVM/signPermitMessage.ts | 9 +- 3 files changed, 235 insertions(+), 80 deletions(-) diff --git a/src/core/EVM/EVMStepExecutor.ts b/src/core/EVM/EVMStepExecutor.ts index 8b0a19c3..eabc42d6 100644 --- a/src/core/EVM/EVMStepExecutor.ts +++ b/src/core/EVM/EVMStepExecutor.ts @@ -345,6 +345,8 @@ export class EVMStepExecutor extends BaseStepExecutor { return step } + let isTransactionRelayed = false + if (atomicBatchSupported) { const transferCall: Call = { chainId: fromChain.id, @@ -387,18 +389,24 @@ export class EVMStepExecutor extends BaseStepExecutor { callData: transactionRequest.data!, }) txHash = relayedTransaction.data.taskId + isTransactionRelayed = true } else { if (permitSignature) { // If we have a permit signature, we need to use updated data transactionRequest.data = permitSignature.data try { // Try to re-estimate the gas due to additional Permit data - transactionRequest.gas = await estimateGas(this.client, { + const estimatedGas = await estimateGas(this.client, { account: this.client.account!, to: transactionRequest.to as Address, data: transactionRequest.data as Hex, value: transactionRequest.value, }) + transactionRequest.gas = + transactionRequest.gas && + transactionRequest.gas > estimatedGas + ? transactionRequest.gas + : estimatedGas } catch { // Let the wallet estimate the gas in case of failure transactionRequest.gas = undefined @@ -425,7 +433,6 @@ export class EVMStepExecutor extends BaseStepExecutor { } as SendTransactionParameters) } } - process = this.statusManager.updateProcess( step, process.type, @@ -435,10 +442,12 @@ export class EVMStepExecutor extends BaseStepExecutor { ? { atomicBatchSupported, } - : { - txHash: txHash, - txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${txHash}`, - } + : isTransactionRelayed + ? undefined + : { + txHash: txHash, + txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${txHash}`, + } ) } diff --git a/src/core/EVM/getNativePermit.ts b/src/core/EVM/getNativePermit.ts index 106307e3..fd32a8d3 100644 --- a/src/core/EVM/getNativePermit.ts +++ b/src/core/EVM/getNativePermit.ts @@ -1,5 +1,14 @@ import type { ExtendedChain } from '@lifi/types' -import type { Address, Client } from 'viem' +import { + encodeAbiParameters, + keccak256, + pad, + parseAbiParameters, + toBytes, + toHex, +} from 'viem' +import type { Address, Client, Hex } from 'viem' +import type { TypedDataDomain } from 'viem' import { multicall, readContract } from 'viem/actions' import { eip2612Abi } from './abi.js' import { getMulticallAddress } from './utils.js' @@ -9,6 +18,136 @@ export type NativePermitData = { version: string nonce: bigint supported: boolean + domain: TypedDataDomain +} + +/** + * EIP-712 domain typehash with chainId + * @link https://eips.ethereum.org/EIPS/eip-712#specification + * + * keccak256(toBytes( + * 'EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)' + * )) + */ +const EIP712_DOMAIN_TYPEHASH = + '0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f' as Hex + +/** + * EIP-712 domain typehash with salt (e.g. USDC.e on Polygon) + * @link https://eips.ethereum.org/EIPS/eip-712#specification + * + * keccak256(toBytes( + * 'EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)' + * )) + */ +const EIP712_DOMAIN_TYPEHASH_WITH_SALT = + '0x36c25de3e541d5d970f66e4210d728721220fff5c077cc6cd008b3a0c62adab7' as Hex + +function makeDomainSeparator({ + name, + version, + chainId, + verifyingContract, + withSalt = false, +}: { + name: string + version: string + chainId: bigint + verifyingContract: Address + withSalt?: boolean +}): Hex { + const nameHash = keccak256(toBytes(name)) + const versionHash = keccak256(toBytes(version)) + + const encoded = withSalt + ? encodeAbiParameters( + parseAbiParameters('bytes32, bytes32, bytes32, address, bytes32'), + [ + EIP712_DOMAIN_TYPEHASH_WITH_SALT, + nameHash, + versionHash, + verifyingContract, + pad(toHex(chainId), { size: 32 }), + ] + ) + : encodeAbiParameters( + parseAbiParameters('bytes32, bytes32, bytes32, uint256, address'), + [ + EIP712_DOMAIN_TYPEHASH, + nameHash, + versionHash, + chainId, + verifyingContract, + ] + ) + + return keccak256(encoded) +} + +// TODO: Add support for EIP-5267 when adoption increases +// This EIP provides a standard way to query domain separator and permit type hash +// via eip712Domain() function, which would simplify permit validation +// https://eips.ethereum.org/EIPS/eip-5267 +function validateDomainSeparator({ + name, + version, + chainId, + verifyingContract, + domainSeparator, +}: { + name: string + version: string + chainId: bigint + verifyingContract: Address + domainSeparator: Hex +}): { isValid: boolean; domain: TypedDataDomain } { + if (!name || !domainSeparator) { + return { + isValid: false, + domain: {}, + } + } + + for (const withSalt of [false, true]) { + const computedDS = makeDomainSeparator({ + name, + version, + chainId, + verifyingContract, + withSalt, + }) + if (domainSeparator.toLowerCase() === computedDS.toLowerCase()) { + return { + isValid: true, + domain: withSalt + ? { + name, + version, + verifyingContract, + salt: pad(toHex(chainId), { size: 32 }), + } + : { + name, + version, + chainId, + verifyingContract, + }, + } + } + } + + return { + isValid: false, + domain: {}, + } +} + +const defaultPermit: NativePermitData = { + name: '', + version: '1', + nonce: 0n, + supported: false, + domain: {}, } /** @@ -27,88 +166,102 @@ export const getNativePermit = async ( try { const multicallAddress = await getMulticallAddress(chain.id) - if (multicallAddress) { - const [nameResult, domainSeparatorResult, noncesResult, versionResult] = - await multicall(client, { - contracts: [ - { - address: tokenAddress, - abi: eip2612Abi, - functionName: 'name', - }, - { - address: tokenAddress, - abi: eip2612Abi, - functionName: 'DOMAIN_SEPARATOR', - }, - { - address: tokenAddress, - abi: eip2612Abi, - functionName: 'nonces', - args: [client.account!.address], - }, - { - address: tokenAddress, - abi: eip2612Abi, - functionName: 'version', - }, - ], - multicallAddress, - }) - - const supported = - nameResult.status === 'success' && - domainSeparatorResult.status === 'success' && - noncesResult.status === 'success' && - !!nameResult.result && - !!domainSeparatorResult.result && - noncesResult.result !== undefined - - return { - name: nameResult.result!, - version: versionResult.result ?? '1', - nonce: noncesResult.result!, - supported, - } - } - - // Fallback to individual calls - const [name, domainSeparator, nonce, version] = await Promise.all([ - readContract(client, { + const contractCalls = [ + { address: tokenAddress, abi: eip2612Abi, functionName: 'name', - }), - readContract(client, { + }, + { address: tokenAddress, abi: eip2612Abi, functionName: 'DOMAIN_SEPARATOR', - }), - readContract(client, { + }, + { address: tokenAddress, abi: eip2612Abi, functionName: 'nonces', args: [client.account!.address], - }), - readContract(client, { + }, + { address: tokenAddress, abi: eip2612Abi, functionName: 'version', - }), - ]) + }, + ] as const + + if (multicallAddress) { + const [nameResult, domainSeparatorResult, noncesResult, versionResult] = + await multicall(client, { + contracts: contractCalls, + multicallAddress, + }) + + if ( + nameResult.status !== 'success' || + domainSeparatorResult.status !== 'success' || + noncesResult.status !== 'success' || + !nameResult.result || + !domainSeparatorResult.result || + noncesResult.result === undefined + ) { + return defaultPermit + } + + const { isValid, domain } = validateDomainSeparator({ + name: nameResult.result, + version: versionResult.result ?? '1', + chainId: BigInt(chain.id), + verifyingContract: tokenAddress, + domainSeparator: domainSeparatorResult.result, + }) + + return { + name: nameResult.result, + version: versionResult.result ?? '1', + nonce: noncesResult.result, + supported: isValid, + domain, + } + } + + const [nameResult, domainSeparatorResult, noncesResult, versionResult] = + (await Promise.allSettled( + contractCalls.map((call) => readContract(client, call)) + )) as [ + PromiseSettledResult, + PromiseSettledResult, + PromiseSettledResult, + PromiseSettledResult, + ] + + if ( + nameResult.status !== 'fulfilled' || + domainSeparatorResult.status !== 'fulfilled' || + noncesResult.status !== 'fulfilled' + ) { + return defaultPermit + } + + const name = nameResult.value + const version = + versionResult.status === 'fulfilled' ? versionResult.value : '1' + const { isValid, domain } = validateDomainSeparator({ + name, + version, + chainId: BigInt(chain.id), + verifyingContract: tokenAddress, + domainSeparator: domainSeparatorResult.value, + }) return { name, - version: version ?? '1', - nonce, - supported: !!name && !!domainSeparator && nonce !== undefined, + version, + nonce: noncesResult.value, + supported: isValid, + domain, } } catch { - return { - name: '', - version: '1', - nonce: 0n, - supported: false, - } + return defaultPermit } } diff --git a/src/core/EVM/signPermitMessage.ts b/src/core/EVM/signPermitMessage.ts index a18fb89d..1dd34d4e 100644 --- a/src/core/EVM/signPermitMessage.ts +++ b/src/core/EVM/signPermitMessage.ts @@ -28,13 +28,6 @@ export const signNativePermitMessage = async ( ): Promise => { const deadline = BigInt(Math.floor(Date.now() / 1000) + 30 * 60) // 30 minutes - const domain = { - name: nativePermit.name, - version: nativePermit.version, - chainId: chain.id, - verifyingContract: tokenAddress, - } - const message = { owner: client.account!.address, spender: chain.permit2Proxy as Address, @@ -49,7 +42,7 @@ export const signNativePermitMessage = async ( 'signTypedData' )({ account: client.account!, - domain, + domain: nativePermit.domain, types: eip2612Types, primaryType: 'Permit', message, From 7f0aff7daa73148806bce61abf1038afdcaa262a Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Wed, 15 Jan 2025 18:27:21 +0100 Subject: [PATCH 19/26] chore(release): 3.6.0-beta.3 --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 37011179..33e913d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/sdk", - "version": "3.6.0-beta.2", + "version": "3.6.0-beta.3", "description": "LI.FI Any-to-Any Cross-Chain-Swap SDK", "keywords": [ "bridge", diff --git a/src/version.ts b/src/version.ts index d609b8cb..ca79bfa9 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ export const name = '@lifi/sdk' -export const version = '3.6.0-beta.2' +export const version = '3.6.0-beta.3' From f22142ed4d8f67792fae52b1df6879797df17827 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Fri, 17 Jan 2025 12:24:41 +0100 Subject: [PATCH 20/26] fix: error name --- src/core/EVM/parseEVMErrors.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/EVM/parseEVMErrors.ts b/src/core/EVM/parseEVMErrors.ts index 7c8e932c..191e12bb 100644 --- a/src/core/EVM/parseEVMErrors.ts +++ b/src/core/EVM/parseEVMErrors.ts @@ -26,7 +26,10 @@ const handleSpecificErrors = async ( step?: LiFiStep, process?: Process ) => { - if (e.cause?.name === 'UserRejectedRequestError') { + if ( + e.name === 'UserRejectedRequestError' || + e.cause?.name === 'UserRejectedRequestError' + ) { return new TransactionError(LiFiErrorCode.SignatureRejected, e.message, e) } // Safe Wallet via WalletConnect returns -32000 code when user rejects the signature From adb6081df22ceaf898754ad95ea3c5d41087e35d Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Mon, 27 Jan 2025 12:08:40 +0100 Subject: [PATCH 21/26] refactor: permit --- src/core/EVM/EVMStepExecutor.ts | 653 ++++++++++-------- src/core/EVM/checkAllowance.ts | 4 +- src/core/EVM/parseEVMErrors.ts | 3 +- src/core/EVM/parseEVMErrors.unit.spec.ts | 3 +- src/core/EVM/typeguards.ts | 2 +- src/core/Solana/SolanaStepExecutor.ts | 18 +- src/core/Solana/parseSolanaErrors.ts | 3 +- src/core/StatusManager.ts | 64 +- src/core/StatusManager.unit.spec.ts | 10 +- src/core/UTXO/UTXOStepExecutor.ts | 18 +- src/core/UTXO/parseUTXOErrors.ts | 3 +- src/core/processMessages.ts | 46 +- src/core/types.ts | 55 +- .../waitForDestinationChainTransaction.ts | 25 +- src/core/waitForTransactionStatus.ts | 8 +- src/errors/SDKError.ts | 3 +- src/index.ts | 7 +- src/utils/getTransactionMessage.ts | 3 +- 18 files changed, 524 insertions(+), 404 deletions(-) diff --git a/src/core/EVM/EVMStepExecutor.ts b/src/core/EVM/EVMStepExecutor.ts index eabc42d6..00577bd1 100644 --- a/src/core/EVM/EVMStepExecutor.ts +++ b/src/core/EVM/EVMStepExecutor.ts @@ -1,4 +1,4 @@ -import type { LiFiStep, Process } from '@lifi/types' +import type { ExtendedChain, LiFiStep } from '@lifi/types' import type { Address, Client, @@ -20,12 +20,12 @@ import { getStepTransaction, relayTransaction, } from '../../services/api.js' -import { isZeroAddress } from '../../utils/isZeroAddress.js' import { BaseStepExecutor } from '../BaseStepExecutor.js' import { checkBalance } from '../checkBalance.js' import { stepComparison } from '../stepComparison.js' import type { LiFiStepExtended, + Process, StepExecutorOptions, TransactionParameters, } from '../types.js' @@ -35,7 +35,7 @@ import { getNativePermit } from './getNativePermit.js' import { parseEVMErrors } from './parseEVMErrors.js' import { type PermitSignature, signPermitMessage } from './signPermitMessage.js' import { switchChain } from './switchChain.js' -import { isEVMPermitStep } from './typeguards.js' +import { isRelayerStep } from './typeguards.js' import { getMaxPriorityFeePerGas } from './utils.js' import { type WalletCallReceipt, @@ -116,6 +116,78 @@ export class EVMStepExecutor extends BaseStepExecutor { return updatedClient } + waitForTransaction = async ({ + step, + process, + fromChain, + toChain, + atomicBatchSupported, + isRelayerTransaction, + txHash, + isBridgeExecution, + }: { + step: LiFiStepExtended + process: Process + fromChain: ExtendedChain + toChain: ExtendedChain + atomicBatchSupported: boolean + isRelayerTransaction: boolean + txHash: Hash + isBridgeExecution: boolean + }) => { + let transactionReceipt: TransactionReceipt | WalletCallReceipt | undefined + + if (atomicBatchSupported) { + transactionReceipt = await waitForBatchTransactionReceipt( + this.client, + txHash + ) + } else if (isRelayerTransaction) { + transactionReceipt = await waitForRelayedTransactionReceipt(txHash) + } else { + transactionReceipt = await waitForTransactionReceipt({ + client: this.client, + chainId: fromChain.id, + txHash, + onReplaced: (response) => { + this.statusManager.updateProcess(step, process.type, 'PENDING', { + txHash: response.transaction.hash, + txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${response.transaction.hash}`, + }) + }, + }) + } + + // Update pending process if the transaction hash from the receipt is different. + // This might happen if the transaction was replaced. + if ( + transactionReceipt?.transactionHash && + transactionReceipt.transactionHash !== txHash + ) { + process = this.statusManager.updateProcess( + step, + process.type, + 'PENDING', + { + txHash: transactionReceipt.transactionHash, + txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${transactionReceipt.transactionHash}`, + } + ) + } + + if (isBridgeExecution) { + process = this.statusManager.updateProcess(step, process.type, 'DONE') + } + + await waitForDestinationChainTransaction( + step, + process, + fromChain, + toChain, + this.statusManager + ) + } + executeStep = async (step: LiFiStepExtended): Promise => { step.execution = this.statusManager.initExecutionObject(step) @@ -138,6 +210,8 @@ export class EVMStepExecutor extends BaseStepExecutor { const fromChain = await config.getChainById(step.action.fromChainId) const toChain = await config.getChainById(step.action.toChainId) + // Check if the wallet supports atomic batch transactions (EIP-5792) + const calls: Call[] = [] let atomicBatchSupported = false try { const capabilities = (await getAction( @@ -147,11 +221,10 @@ export class EVMStepExecutor extends BaseStepExecutor { )(undefined)) as GetCapabilitiesReturnType atomicBatchSupported = capabilities[fromChain.id]?.atomicBatch?.supported } catch { - // If the wallet does not support getCapabilities, we assume that atomic batch is not supported + // If the wallet does not support getCapabilities or the call fails, + // we assume that atomic batch is not supported } - const calls: Call[] = [] - const isBridgeExecution = fromChain.id !== toChain.id const currentProcessType = isBridgeExecution ? 'CROSS_CHAIN' : 'SWAP' @@ -160,8 +233,11 @@ export class EVMStepExecutor extends BaseStepExecutor { (p) => p.type === currentProcessType ) + const isFromNativeToken = + fromChain.nativeToken.address === step.action.fromToken.address + // Check if step requires permit signature and will be used with relayer service - const isPermitStep = isEVMPermitStep(step) + const isRelayerTransaction = isRelayerStep(step) // Check if token requires approval // Native tokens (like ETH) don't need approval since they're not ERC20 tokens @@ -176,13 +252,17 @@ export class EVMStepExecutor extends BaseStepExecutor { ) // Check if proxy contract is available and token supports native permits, not available for atomic batch const nativePermitSupported = - !!fromChain.permit2Proxy && nativePermit.supported && + !!fromChain.permit2Proxy && !atomicBatchSupported && - !isPermitStep + !isRelayerTransaction && // TODO: remove once we support ERC-2771 + !isFromNativeToken // Check if chain has Permit2 contract deployed. Permit2 should not be available for atomic batch. const permit2Supported = - !!fromChain.permit2 && !!fromChain.permit2Proxy && !atomicBatchSupported + !!fromChain.permit2 && + !!fromChain.permit2Proxy && + !atomicBatchSupported && + !isFromNativeToken // Token supports either native permits or Permit2 const permitSupported = permit2Supported || nativePermitSupported @@ -190,7 +270,7 @@ export class EVMStepExecutor extends BaseStepExecutor { // No existing swap/bridgetransaction is pending !existingProcess?.txHash && // Token is not native (address is not zero) - !isZeroAddress(step.action.fromToken.address) && + !isFromNativeToken && // Token doesn't support native permits !nativePermitSupported @@ -220,325 +300,296 @@ export class EVMStepExecutor extends BaseStepExecutor { } } - let process = this.statusManager.findOrCreateProcess({ - step, - type: currentProcessType, - chainId: fromChain.id, - }) - - if (process.status !== 'DONE') { - try { - let txHash: Hash - if (process.txHash) { - // Make sure that the chain is still correct - const updatedClient = await this.checkClient(step, process) - if (!updatedClient) { - return step - } + let process = this.statusManager.findProcess(step, currentProcessType) - // Wait for exiting transaction - txHash = process.txHash as Hash - } else { - process = this.statusManager.updateProcess( - step, - process.type, - 'STARTED' - ) + if (process?.status === 'DONE') { + await waitForDestinationChainTransaction( + step, + process, + fromChain, + toChain, + this.statusManager + ) - // Check balance - await checkBalance(this.client.account!.address, step) - - // Create new transaction request - if (!step.transactionRequest) { - const { execution, ...stepBase } = step - let updatedStep: LiFiStep - if (isPermitStep) { - const updatedRelayedStep = await getRelayerQuote({ - fromChain: stepBase.action.fromChainId, - fromToken: stepBase.action.fromToken.address, - fromAddress: stepBase.action.fromAddress!, - fromAmount: stepBase.action.fromAmount, - toChain: stepBase.action.toChainId, - toToken: stepBase.action.toToken.address, - slippage: stepBase.action.slippage, - toAddress: stepBase.action.toAddress, - allowBridges: [stepBase.tool], - }) - updatedStep = { - ...updatedRelayedStep.data.quote.step, - ...updatedRelayedStep.data.quote, - id: stepBase.id, - } - } else { - updatedStep = await getStepTransaction(stepBase) - } - const comparedStep = await stepComparison( - this.statusManager, - step, - updatedStep, - this.allowUserInteraction, - this.executionOptions - ) - Object.assign(step, { - ...comparedStep, - execution: step.execution, - }) - } + return step + } - if (!step.transactionRequest) { - throw new TransactionError( - LiFiErrorCode.TransactionUnprepared, - 'Unable to prepare transaction.' - ) + try { + if (process?.txHash) { + // Make sure that the chain is still correct + const updatedClient = await this.checkClient(step, process) + if (!updatedClient) { + return step + } + + // Wait for exiting transaction + const txHash = process.txHash as Hash + + await this.waitForTransaction({ + step, + process, + fromChain, + toChain, + atomicBatchSupported, + isRelayerTransaction, + txHash, + isBridgeExecution, + }) + + return step + } + + process = this.statusManager.findOrCreateProcess({ + step, + type: permitSupported ? 'PERMIT' : currentProcessType, + status: 'STARTED', + }) + + // Check balance + await checkBalance(this.client.account!.address, step) + + // Create new transaction request + if (!step.transactionRequest) { + const { execution, ...stepBase } = step + let updatedStep: LiFiStep + if (isRelayerTransaction) { + const updatedRelayedStep = await getRelayerQuote({ + fromChain: stepBase.action.fromChainId, + fromToken: stepBase.action.fromToken.address, + fromAddress: stepBase.action.fromAddress!, + fromAmount: stepBase.action.fromAmount, + toChain: stepBase.action.toChainId, + toToken: stepBase.action.toToken.address, + slippage: stepBase.action.slippage, + toAddress: stepBase.action.toAddress, + allowBridges: [stepBase.tool], + }) + updatedStep = { + ...updatedRelayedStep.data.quote.step, + ...updatedRelayedStep.data.quote, + id: stepBase.id, } + } else { + updatedStep = await getStepTransaction(stepBase) + } + const comparedStep = await stepComparison( + this.statusManager, + step, + updatedStep, + this.allowUserInteraction, + this.executionOptions + ) + Object.assign(step, { + ...comparedStep, + execution: step.execution, + }) + } - let transactionRequest: TransactionParameters = { - to: step.transactionRequest.to, - from: step.transactionRequest.from, - data: step.transactionRequest.data, - value: step.transactionRequest.value - ? BigInt(step.transactionRequest.value) - : undefined, - gas: step.transactionRequest.gasLimit - ? BigInt(step.transactionRequest.gasLimit) + if (!step.transactionRequest) { + throw new TransactionError( + LiFiErrorCode.TransactionUnprepared, + 'Unable to prepare transaction.' + ) + } + + let transactionRequest: TransactionParameters = { + to: step.transactionRequest.to, + from: step.transactionRequest.from, + data: step.transactionRequest.data, + value: step.transactionRequest.value + ? BigInt(step.transactionRequest.value) + : undefined, + gas: step.transactionRequest.gasLimit + ? BigInt(step.transactionRequest.gasLimit) + : undefined, + // gasPrice: step.transactionRequest.gasPrice + // ? BigInt(step.transactionRequest.gasPrice as string) + // : undefined, + // maxFeePerGas: step.transactionRequest.maxFeePerGas + // ? BigInt(step.transactionRequest.maxFeePerGas as string) + // : undefined, + maxPriorityFeePerGas: + this.client.account?.type === 'local' + ? await getMaxPriorityFeePerGas(this.client) + : step.transactionRequest.maxPriorityFeePerGas + ? BigInt(step.transactionRequest.maxPriorityFeePerGas) : undefined, - // gasPrice: step.transactionRequest.gasPrice - // ? BigInt(step.transactionRequest.gasPrice as string) - // : undefined, - // maxFeePerGas: step.transactionRequest.maxFeePerGas - // ? BigInt(step.transactionRequest.maxFeePerGas as string) - // : undefined, - maxPriorityFeePerGas: - this.client.account?.type === 'local' - ? await getMaxPriorityFeePerGas(this.client) - : step.transactionRequest.maxPriorityFeePerGas - ? BigInt(step.transactionRequest.maxPriorityFeePerGas) - : undefined, - } + } - if (this.executionOptions?.updateTransactionRequestHook) { - const customizedTransactionRequest: TransactionParameters = - await this.executionOptions.updateTransactionRequestHook({ - requestType: 'transaction', - ...transactionRequest, - }) + if (this.executionOptions?.updateTransactionRequestHook) { + const customizedTransactionRequest: TransactionParameters = + await this.executionOptions.updateTransactionRequestHook({ + requestType: 'transaction', + ...transactionRequest, + }) - transactionRequest = { - ...transactionRequest, - ...customizedTransactionRequest, - } - } + transactionRequest = { + ...transactionRequest, + ...customizedTransactionRequest, + } + } - // Make sure that the chain is still correct - const updatedClient = await this.checkClient(step, process) - if (!updatedClient) { - return step - } + // Make sure that the chain is still correct + const updatedClient = await this.checkClient(step, process) + if (!updatedClient) { + return step + } - process = this.statusManager.updateProcess( - step, - process.type, - permitSupported ? 'PERMIT_REQUIRED' : 'ACTION_REQUIRED' - ) + process = this.statusManager.updateProcess( + step, + process.type, + 'ACTION_REQUIRED' + ) - if (!this.allowUserInteraction) { - return step - } + if (!this.allowUserInteraction) { + return step + } - let isTransactionRelayed = false + let txHash: Hash + let isTransactionRelayed = false - if (atomicBatchSupported) { - const transferCall: Call = { - chainId: fromChain.id, - data: transactionRequest.data as Hex, - to: transactionRequest.to as Address, - value: transactionRequest.value, - } + if (atomicBatchSupported) { + const transferCall: Call = { + chainId: fromChain.id, + data: transactionRequest.data as Hex, + to: transactionRequest.to as Address, + value: transactionRequest.value, + } - calls.push(transferCall) - - txHash = (await getAction( - this.client, - sendCalls, - 'sendCalls' - )({ - account: this.client.account!, - calls, - })) as Address - } else { - let permitSignature: PermitSignature | undefined - if (permitSupported) { - permitSignature = await signPermitMessage(this.client, { - transactionRequest, - chain: fromChain, - tokenAddress: step.action.fromToken.address as Address, - amount: BigInt(step.action.fromAmount), - nativePermit, - permitData: isPermitStep ? step.permitData : undefined, - useWitness: isPermitStep, - }) - transactionRequest.to = fromChain.permit2Proxy - } - if (isPermitStep && permitSignature) { - const relayedTransaction = await relayTransaction({ - tokenOwner: this.client.account!.address, - chainId: fromChain.id, - permit: step.permit, - witness: step.witness, - signedPermitData: permitSignature.signature, - callData: transactionRequest.data!, - }) - txHash = relayedTransaction.data.taskId - isTransactionRelayed = true - } else { - if (permitSignature) { - // If we have a permit signature, we need to use updated data - transactionRequest.data = permitSignature.data - try { - // Try to re-estimate the gas due to additional Permit data - const estimatedGas = await estimateGas(this.client, { - account: this.client.account!, - to: transactionRequest.to as Address, - data: transactionRequest.data as Hex, - value: transactionRequest.value, - }) - transactionRequest.gas = - transactionRequest.gas && - transactionRequest.gas > estimatedGas - ? transactionRequest.gas - : estimatedGas - } catch { - // Let the wallet estimate the gas in case of failure - transactionRequest.gas = undefined - } - } - process = this.statusManager.updateProcess( - step, - process.type, - 'ACTION_REQUIRED' - ) - txHash = await getAction( - this.client, - sendTransaction, - 'sendTransaction' - )({ - to: transactionRequest.to, + calls.push(transferCall) + + txHash = (await getAction( + this.client, + sendCalls, + 'sendCalls' + )({ + account: this.client.account!, + calls, + })) as Address + } else { + let permitSignature: PermitSignature | undefined + if (permitSupported) { + permitSignature = await signPermitMessage(this.client, { + transactionRequest, + chain: fromChain, + tokenAddress: step.action.fromToken.address as Address, + amount: BigInt(step.action.fromAmount), + nativePermit, + permitData: isRelayerTransaction ? step.permitData : undefined, + useWitness: isRelayerTransaction, + }) + transactionRequest.to = fromChain.permit2Proxy + this.statusManager.updateProcess(step, process.type, 'DONE') + } + if (isRelayerTransaction && permitSignature) { + process = this.statusManager.findOrCreateProcess({ + step, + type: currentProcessType, + status: 'PENDING', + }) + const relayedTransaction = await relayTransaction({ + tokenOwner: this.client.account!.address, + chainId: fromChain.id, + permit: step.permit, + witness: step.witness, + signedPermitData: permitSignature.signature, + callData: transactionRequest.data!, + }) + txHash = relayedTransaction.data.taskId + isTransactionRelayed = true + } else { + process = this.statusManager.findOrCreateProcess({ + step, + type: currentProcessType, + status: 'STARTED', + }) + if (permitSignature) { + // If we have a permit signature, we need to use updated data + transactionRequest.data = permitSignature.data + try { + // Try to re-estimate the gas due to additional Permit data + const estimatedGas = await estimateGas(this.client, { account: this.client.account!, - data: transactionRequest.data, + to: transactionRequest.to as Address, + data: transactionRequest.data as Hex, value: transactionRequest.value, - gas: transactionRequest.gas, - gasPrice: transactionRequest.gasPrice, - maxFeePerGas: transactionRequest.maxFeePerGas, - maxPriorityFeePerGas: transactionRequest.maxPriorityFeePerGas, - } as SendTransactionParameters) + }) + transactionRequest.gas = + transactionRequest.gas && transactionRequest.gas > estimatedGas + ? transactionRequest.gas + : estimatedGas + } catch { + // Let the wallet estimate the gas in case of failure + transactionRequest.gas = undefined } } process = this.statusManager.updateProcess( step, process.type, - 'PENDING', - // When atomic batch is supported, txHash represents the batch hash rather than an individual transaction hash at this point - atomicBatchSupported - ? { - atomicBatchSupported, - } - : isTransactionRelayed - ? undefined - : { - txHash: txHash, - txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${txHash}`, - } + 'ACTION_REQUIRED' ) - } - - let transactionReceipt: - | TransactionReceipt - | WalletCallReceipt - | undefined - - if (atomicBatchSupported) { - transactionReceipt = await waitForBatchTransactionReceipt( + txHash = await getAction( this.client, - txHash - ) - } else if (isPermitStep) { - transactionReceipt = await waitForRelayedTransactionReceipt(txHash) - } else { - transactionReceipt = await waitForTransactionReceipt({ - client: this.client, - chainId: fromChain.id, - txHash, - onReplaced: (response) => { - this.statusManager.updateProcess(step, process.type, 'PENDING', { - txHash: response.transaction.hash, - txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${response.transaction.hash}`, - }) - }, - }) + sendTransaction, + 'sendTransaction' + )({ + to: transactionRequest.to, + account: this.client.account!, + data: transactionRequest.data, + value: transactionRequest.value, + gas: transactionRequest.gas, + gasPrice: transactionRequest.gasPrice, + maxFeePerGas: transactionRequest.maxFeePerGas, + maxPriorityFeePerGas: transactionRequest.maxPriorityFeePerGas, + } as SendTransactionParameters) } - - // Update pending process if the transaction hash from the receipt is different. - // This might happen if the transaction was replaced. - if ( - transactionReceipt?.transactionHash && - transactionReceipt.transactionHash !== txHash - ) { - process = this.statusManager.updateProcess( - step, - process.type, - 'PENDING', - { - txHash: transactionReceipt.transactionHash, - txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${transactionReceipt.transactionHash}`, - } - ) - } - - if (isBridgeExecution) { - process = this.statusManager.updateProcess(step, process.type, 'DONE') - } - } catch (e: any) { - const error = await parseEVMErrors(e, step, process) - process = this.statusManager.updateProcess( - step, - process.type, - 'FAILED', - { - error: { - message: error.cause.message, - code: error.code, - }, - } - ) - this.statusManager.updateExecution(step, 'FAILED') - - throw error } - } + process = this.statusManager.updateProcess( + step, + process.type, + 'PENDING', + // When atomic batch is supported, txHash represents the batch hash rather than an individual transaction hash at this point + atomicBatchSupported + ? { + atomicBatchSupported, + } + : isTransactionRelayed + ? undefined + : { + txHash: txHash, + txLink: `${fromChain.metamask.blockExplorerUrls[0]}tx/${txHash}`, + } + ) - // Wait for the transaction status on the destination chain - const transactionHash = process.txHash - if (!transactionHash) { - throw new Error('Transaction hash is undefined.') - } - if (isBridgeExecution) { - process = this.statusManager.findOrCreateProcess({ + await this.waitForTransaction({ step, - type: 'RECEIVING_CHAIN', - status: 'PENDING', - chainId: toChain.id, + process, + fromChain, + toChain, + atomicBatchSupported, + isRelayerTransaction, + txHash, + isBridgeExecution, }) - } - await waitForDestinationChainTransaction( - step, - process.type, - transactionHash, - toChain, - this.statusManager - ) + // DONE + return step + } catch (e: any) { + const error = await parseEVMErrors(e, step, process) + process = this.statusManager.updateProcess( + step, + process?.type || currentProcessType, + 'FAILED', + { + error: { + message: error.cause.message, + code: error.code, + }, + } + ) + this.statusManager.updateExecution(step, 'FAILED') - // DONE - return step + throw error + } } } diff --git a/src/core/EVM/checkAllowance.ts b/src/core/EVM/checkAllowance.ts index 8db520c3..8c4299d2 100644 --- a/src/core/EVM/checkAllowance.ts +++ b/src/core/EVM/checkAllowance.ts @@ -1,8 +1,8 @@ -import type { ExtendedChain, LiFiStep, Process, ProcessType } from '@lifi/types' +import type { ExtendedChain, LiFiStep } from '@lifi/types' import type { Address, Client, Hash } from 'viem' import { MaxUint256 } from '../../constants.js' import type { StatusManager } from '../StatusManager.js' -import type { ExecutionOptions } from '../types.js' +import type { ExecutionOptions, Process, ProcessType } from '../types.js' import { getAllowance } from './getAllowance.js' import { parseEVMErrors } from './parseEVMErrors.js' import { setAllowance } from './setAllowance.js' diff --git a/src/core/EVM/parseEVMErrors.ts b/src/core/EVM/parseEVMErrors.ts index 191e12bb..026daa17 100644 --- a/src/core/EVM/parseEVMErrors.ts +++ b/src/core/EVM/parseEVMErrors.ts @@ -1,9 +1,10 @@ -import type { LiFiStep, Process } from '@lifi/types' +import type { LiFiStep } from '@lifi/types' import { SDKError } from '../../errors/SDKError.js' import { BaseError } from '../../errors/baseError.js' import { ErrorMessage, LiFiErrorCode } from '../../errors/constants.js' import { TransactionError, UnknownError } from '../../errors/errors.js' import { fetchTxErrorDetails } from '../../utils/fetchTxErrorDetails.js' +import type { Process } from '../types.js' export const parseEVMErrors = async ( e: Error, diff --git a/src/core/EVM/parseEVMErrors.unit.spec.ts b/src/core/EVM/parseEVMErrors.unit.spec.ts index fdb01454..4a25ca2d 100644 --- a/src/core/EVM/parseEVMErrors.unit.spec.ts +++ b/src/core/EVM/parseEVMErrors.unit.spec.ts @@ -1,4 +1,4 @@ -import type { LiFiStep, Process } from '@lifi/types' +import type { LiFiStep } from '@lifi/types' import { beforeAll, describe, expect, it, vi } from 'vitest' import { buildStepObject } from '../../../tests/fixtures.js' import { setupTestEnvironment } from '../../../tests/setup.js' @@ -11,6 +11,7 @@ import { } from '../../errors/constants.js' import { TransactionError } from '../../errors/errors.js' import * as helpers from '../../utils/fetchTxErrorDetails.js' +import type { Process } from '../types.js' import { parseEVMErrors } from './parseEVMErrors.js' beforeAll(setupTestEnvironment) diff --git a/src/core/EVM/typeguards.ts b/src/core/EVM/typeguards.ts index 7f6e1d3e..9a839786 100644 --- a/src/core/EVM/typeguards.ts +++ b/src/core/EVM/typeguards.ts @@ -1,7 +1,7 @@ import type { LiFiStepExtended } from '../types.js' import type { EVMPermitStep } from './types.js' -export function isEVMPermitStep(step: LiFiStepExtended): step is EVMPermitStep { +export function isRelayerStep(step: LiFiStepExtended): step is EVMPermitStep { const evmStep = step as EVMPermitStep return 'permit' in evmStep && 'permitData' in evmStep && 'witness' in evmStep } diff --git a/src/core/Solana/SolanaStepExecutor.ts b/src/core/Solana/SolanaStepExecutor.ts index b2e16763..3f9b1490 100644 --- a/src/core/Solana/SolanaStepExecutor.ts +++ b/src/core/Solana/SolanaStepExecutor.ts @@ -217,24 +217,10 @@ export class SolanaStepExecutor extends BaseStepExecutor { } } - // Wait for the transaction status on the destination chain - const transactionHash = process.txHash - if (!transactionHash) { - throw new Error('Transaction hash is undefined.') - } - if (isBridgeExecution) { - process = this.statusManager.findOrCreateProcess({ - step, - type: 'RECEIVING_CHAIN', - status: 'PENDING', - chainId: toChain.id, - }) - } - await waitForDestinationChainTransaction( step, - process.type, - transactionHash, + process, + fromChain, toChain, this.statusManager ) diff --git a/src/core/Solana/parseSolanaErrors.ts b/src/core/Solana/parseSolanaErrors.ts index fb5b8a11..5cdba7a0 100644 --- a/src/core/Solana/parseSolanaErrors.ts +++ b/src/core/Solana/parseSolanaErrors.ts @@ -1,8 +1,9 @@ -import type { LiFiStep, Process } from '@lifi/types' +import type { LiFiStep } from '@lifi/types' import { SDKError } from '../../errors/SDKError.js' import { BaseError } from '../../errors/baseError.js' import { ErrorMessage, LiFiErrorCode } from '../../errors/constants.js' import { TransactionError, UnknownError } from '../../errors/errors.js' +import type { Process } from '../types.js' export const parseSolanaErrors = async ( e: Error, diff --git a/src/core/StatusManager.ts b/src/core/StatusManager.ts index 452825ef..2f0ecc6f 100644 --- a/src/core/StatusManager.ts +++ b/src/core/StatusManager.ts @@ -1,15 +1,14 @@ +import type { ChainId, LiFiStep } from '@lifi/types' +import { executionState } from './executionState.js' +import { getProcessMessage } from './processMessages.js' import type { - ChainId, Execution, ExecutionStatus, - LiFiStep, + LiFiStepExtended, Process, ProcessStatus, ProcessType, -} from '@lifi/types' -import { executionState } from './executionState.js' -import { getProcessMessage } from './processMessages.js' -import type { LiFiStepExtended } from './types.js' +} from './types.js' export type FindOrCreateProcessProps = { step: LiFiStepExtended @@ -80,17 +79,38 @@ export class StatusManager { return step } + /** + * Finds a process of the specified type in the step's execution + * @param step The step to search in + * @param type The process type to find + * @param status Optional status to update the process with if found + * @returns The found process or undefined if not found + */ + findProcess( + step: LiFiStepExtended, + type: ProcessType, + status?: ProcessStatus + ): Process | undefined { + if (!step.execution?.process) { + throw new Error("Execution hasn't been initialized.") + } + + const process = step.execution.process.find((p) => p.type === type) + + if (process && status && process.status !== status) { + process.status = status + this.updateStepInRoute(step) + } + + return process + } + /** * Create and push a new process into the execution. - * @param step.step The step that should contain the new process. - * @param step.type Type of the process. Used to identify already existing processes. - * @param step.chainId Chain Id of the process. - * @param step.status By default created procces is set to the STARTED status. We can override new process with the needed status. - * @param root0 - * @param root0.step - * @param root0.type - * @param root0.chainId - * @param root0.status + * @param step The step that should contain the new process. + * @param type Type of the process. Used to identify already existing processes. + * @param chainId Chain Id of the process. + * @param status By default created procces is set to the STARTED status. We can override new process with the needed status. * @returns Returns process. */ findOrCreateProcess = ({ @@ -99,17 +119,9 @@ export class StatusManager { chainId, status, }: FindOrCreateProcessProps): Process => { - if (!step.execution?.process) { - throw new Error("Execution hasn't been initialized.") - } - - const process = step.execution.process.find((p) => p.type === type) + const process = this.findProcess(step, type, status) if (process) { - if (status && process.status !== status) { - process.status = status - this.updateStepInRoute(step) - } return process } @@ -121,7 +133,7 @@ export class StatusManager { chainId: chainId, } - step.execution.process.push(newProcess) + step.execution!.process.push(newProcess) this.updateStepInRoute(step) return newProcess } @@ -143,7 +155,7 @@ export class StatusManager { if (!step.execution) { throw new Error("Can't update an empty step execution.") } - const currentProcess = step?.execution?.process.find((p) => p.type === type) + const currentProcess = this.findProcess(step, type) if (!currentProcess) { throw new Error("Can't find a process for the given type.") diff --git a/src/core/StatusManager.unit.spec.ts b/src/core/StatusManager.unit.spec.ts index 14d679c7..de8b3c7d 100644 --- a/src/core/StatusManager.unit.spec.ts +++ b/src/core/StatusManager.unit.spec.ts @@ -1,11 +1,15 @@ -import type { ExecutionStatus, ProcessStatus, Route } from '@lifi/types' +import type { Route } from '@lifi/types' import type { Mock } from 'vitest' import { beforeAll, beforeEach, describe, expect, it, vi } from 'vitest' import { buildRouteObject, buildStepObject } from '../../tests/fixtures.js' import { setupTestEnvironment } from '../../tests/setup.js' import { StatusManager } from './StatusManager.js' import { executionState } from './executionState.js' -import type { LiFiStepExtended } from './types.js' +import type { + ExecutionStatus, + LiFiStepExtended, + ProcessStatus, +} from './types.js' // Note: using structuredClone when passing objects to the StatusManager shall make sure that we are not facing any unknown call-by-reference-issues anymore @@ -164,7 +168,7 @@ describe('StatusManager', () => { expect(process.type).toEqual('CROSS_CHAIN') expect(process.status).toEqual('STARTED') - expect(process.message).toEqual('Preparing bridge transaction.') + expect(process.message).toEqual('Preparing bridge transaction') const updatedExecution = Object.assign({}, step.execution, { process: [...step.execution!.process, process], diff --git a/src/core/UTXO/UTXOStepExecutor.ts b/src/core/UTXO/UTXOStepExecutor.ts index 6f61e081..a89972a8 100644 --- a/src/core/UTXO/UTXOStepExecutor.ts +++ b/src/core/UTXO/UTXOStepExecutor.ts @@ -263,24 +263,10 @@ export class UTXOStepExecutor extends BaseStepExecutor { } } - // Wait for the transaction status on the destination chain - const transactionHash = process.txHash - if (!transactionHash) { - throw new Error('Transaction hash is undefined.') - } - if (isBridgeExecution) { - process = this.statusManager.findOrCreateProcess({ - step, - type: 'RECEIVING_CHAIN', - status: 'PENDING', - chainId: toChain.id, - }) - } - await waitForDestinationChainTransaction( step, - process.type, - transactionHash, + process, + fromChain, toChain, this.statusManager, 10_000 diff --git a/src/core/UTXO/parseUTXOErrors.ts b/src/core/UTXO/parseUTXOErrors.ts index bdfd911b..d865f2db 100644 --- a/src/core/UTXO/parseUTXOErrors.ts +++ b/src/core/UTXO/parseUTXOErrors.ts @@ -1,8 +1,9 @@ -import type { LiFiStep, Process } from '@lifi/types' +import type { LiFiStep } from '@lifi/types' import { SDKError } from '../../errors/SDKError.js' import { BaseError } from '../../errors/baseError.js' import { ErrorMessage, LiFiErrorCode } from '../../errors/constants.js' import { TransactionError, UnknownError } from '../../errors/errors.js' +import type { Process } from '../types.js' export const parseUTXOErrors = async ( e: Error, diff --git a/src/core/processMessages.ts b/src/core/processMessages.ts index 13541980..da23bb0b 100644 --- a/src/core/processMessages.ts +++ b/src/core/processMessages.ts @@ -1,38 +1,42 @@ -import type { - ProcessStatus, - ProcessType, - StatusMessage, - Substatus, -} from '@lifi/types' +import type { StatusMessage, Substatus } from '@lifi/types' +import type { ProcessStatus } from './types.js' +import type { ProcessType } from './types.js' const processMessages: Record< ProcessType, Partial> > = { TOKEN_ALLOWANCE: { - STARTED: 'Setting token allowance.', - PENDING: 'Waiting for token allowance.', - DONE: 'Token allowance set.', + STARTED: 'Setting token allowance', + PENDING: 'Waiting for token allowance', + DONE: 'Token allowance set', }, SWITCH_CHAIN: { - PENDING: 'Chain switch required.', - DONE: 'Chain switched successfully.', + ACTION_REQUIRED: 'Chain switch required', + PENDING: 'Waiting for chain switch', + DONE: 'Chain switched', }, SWAP: { - STARTED: 'Preparing swap transaction.', - ACTION_REQUIRED: 'Please sign the transaction.', - PENDING: 'Waiting for swap transaction.', - DONE: 'Swap completed.', + STARTED: 'Preparing swap transaction', + ACTION_REQUIRED: 'Please sign the transaction', + PENDING: 'Waiting for swap transaction', + DONE: 'Swap completed', }, CROSS_CHAIN: { - STARTED: 'Preparing bridge transaction.', - ACTION_REQUIRED: 'Please sign the transaction.', - PENDING: 'Waiting for bridge transaction.', - DONE: 'Bridge transaction confirmed.', + STARTED: 'Preparing bridge transaction', + ACTION_REQUIRED: 'Please sign the transaction', + PENDING: 'Waiting for bridge transaction', + DONE: 'Bridge transaction confirmed', }, RECEIVING_CHAIN: { - PENDING: 'Waiting for destination chain.', - DONE: 'Bridge completed.', + PENDING: 'Waiting for destination chain', + DONE: 'Bridge completed', + }, + PERMIT: { + STARTED: 'Preparing transaction', + ACTION_REQUIRED: 'Sign permit message', + PENDING: 'Waiting for permit message', + DONE: 'Permit message signed', }, TRANSACTION: {}, } diff --git a/src/core/types.ts b/src/core/types.ts index c3997964..4270b1eb 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -1,9 +1,11 @@ import type { ChainType, - Execution, + FeeCost, + GasCost, LiFiStep, Route, Step, + Substatus, Token, TokenAmount, } from '@lifi/types' @@ -117,3 +119,54 @@ export interface ExecutionOptions { */ infiniteApproval?: boolean } + +export type ExecutionStatus = 'ACTION_REQUIRED' | 'PENDING' | 'FAILED' | 'DONE' + +export type ProcessStatus = + | 'STARTED' + | 'ACTION_REQUIRED' + | 'PENDING' + | 'FAILED' + | 'DONE' + | 'CANCELLED' + +export type ProcessType = + | 'TOKEN_ALLOWANCE' + | 'PERMIT' + | 'SWITCH_CHAIN' + | 'SWAP' + | 'CROSS_CHAIN' + | 'RECEIVING_CHAIN' + | 'TRANSACTION' + +export type Process = { + type: ProcessType + status: ProcessStatus + substatus?: Substatus + chainId?: number + txHash?: string + multisigTxHash?: string + txLink?: string + startedAt: number + doneAt?: number + failedAt?: number + message?: string + error?: { + code: string | number + message: string + htmlMessage?: string + } + + // additional information + [key: string]: any +} + +export interface Execution { + status: ExecutionStatus + process: Array + fromAmount?: string + toAmount?: string + toToken?: Token + feeCosts?: FeeCost[] + gasCosts?: GasCost[] +} diff --git a/src/core/waitForDestinationChainTransaction.ts b/src/core/waitForDestinationChainTransaction.ts index 5102cbe9..d5b8daa0 100644 --- a/src/core/waitForDestinationChainTransaction.ts +++ b/src/core/waitForDestinationChainTransaction.ts @@ -2,23 +2,40 @@ import type { ExtendedChain, ExtendedTransactionInfo, FullStatusData, - ProcessType, } from '@lifi/types' import { LiFiErrorCode } from '../errors/constants.js' import { getTransactionFailedMessage } from '../utils/getTransactionMessage.js' import type { StatusManager } from './StatusManager.js' -import type { LiFiStepExtended } from './types.js' +import type { LiFiStepExtended, Process } from './types.js' import { waitForTransactionStatus } from './waitForTransactionStatus.js' export async function waitForDestinationChainTransaction( step: LiFiStepExtended, - processType: ProcessType, - transactionHash: string, + process: Process, + fromChain: ExtendedChain, toChain: ExtendedChain, statusManager: StatusManager, pollingInterval?: number ): Promise { + const transactionHash = process.txHash + let processType = process.type try { + // Wait for the transaction status on the destination chain + if (!transactionHash) { + throw new Error('Transaction hash is undefined.') + } + + const isBridgeExecution = fromChain.id !== toChain.id + if (isBridgeExecution) { + const receivingChainProcess = statusManager.findOrCreateProcess({ + step, + type: 'RECEIVING_CHAIN', + status: 'PENDING', + chainId: toChain.id, + }) + processType = receivingChainProcess.type + } + const statusResponse = (await waitForTransactionStatus( transactionHash, statusManager, diff --git a/src/core/waitForTransactionStatus.ts b/src/core/waitForTransactionStatus.ts index 49e25602..cf04c697 100644 --- a/src/core/waitForTransactionStatus.ts +++ b/src/core/waitForTransactionStatus.ts @@ -1,14 +1,10 @@ -import type { - FullStatusData, - LiFiStep, - ProcessType, - StatusResponse, -} from '@lifi/types' +import type { FullStatusData, LiFiStep, StatusResponse } from '@lifi/types' import { ServerError } from '../errors/errors.js' import { getStatus } from '../services/api.js' import { waitForResult } from '../utils/waitForResult.js' import type { StatusManager } from './StatusManager.js' import { getSubstatusMessage } from './processMessages.js' +import type { ProcessType } from './types.js' const TRANSACTION_HASH_OBSERVERS: Record> = {} diff --git a/src/errors/SDKError.ts b/src/errors/SDKError.ts index c8b16329..2dc29fb8 100644 --- a/src/errors/SDKError.ts +++ b/src/errors/SDKError.ts @@ -1,4 +1,5 @@ -import type { LiFiStep, Process } from '@lifi/types' +import type { LiFiStep } from '@lifi/types' +import type { Process } from '../core/types.js' import { version } from '../version.js' import type { BaseError } from './baseError.js' import type { ErrorCode } from './constants.js' diff --git a/src/index.ts b/src/index.ts index 227185ae..638dbb48 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,7 @@ export { setTokenAllowance, } from './core/EVM/setAllowance.js' export { isEVM } from './core/EVM/types.js' -export { isEVMPermitStep } from './core/EVM/typeguards.js' +export { isRelayerStep } from './core/EVM/typeguards.js' export type { EVMProvider, EVMProviderOptions, @@ -31,9 +31,14 @@ export type { AcceptSlippageUpdateHook, AcceptSlippageUpdateHookParams, ExchangeRateUpdateParams, + Execution, ExecutionOptions, + ExecutionStatus, InteractionSettings, LiFiStepExtended, + Process, + ProcessStatus, + ProcessType, RouteExecutionData, RouteExecutionDataDictionary, RouteExecutionDictionary, diff --git a/src/utils/getTransactionMessage.ts b/src/utils/getTransactionMessage.ts index 3c8a039e..4ec46cd5 100644 --- a/src/utils/getTransactionMessage.ts +++ b/src/utils/getTransactionMessage.ts @@ -1,6 +1,7 @@ -import type { LiFiStep, Process } from '@lifi/types' +import type { LiFiStep } from '@lifi/types' import { formatUnits } from 'viem' import { config } from '../config.js' +import type { Process } from '../core/types.js' export const getTransactionNotSentMessage = async ( step?: LiFiStep, From 06cb14fee8f4571dc67da34eb7c8608d107c68da Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Mon, 27 Jan 2025 12:24:21 +0100 Subject: [PATCH 22/26] chore: bump packages --- examples/node/package.json | 10 +- examples/node/pnpm-lock.yaml | 474 +++++----- package.json | 16 +- pnpm-lock.yaml | 924 ++++++++++--------- src/core/EVM/getAllowance.int.spec.ts | 42 +- src/core/EVM/getEVMBalance.int.spec.ts | 34 +- src/core/EVM/switchChain.unit.spec.ts | 9 +- src/core/Solana/getSolanaBalance.int.spec.ts | 22 +- src/core/UTXO/getUTXOBalance.int.spec.ts | 4 +- src/services/api.int.spec.ts | 28 +- 10 files changed, 822 insertions(+), 741 deletions(-) diff --git a/examples/node/package.json b/examples/node/package.json index 0f440421..c70a57a5 100644 --- a/examples/node/package.json +++ b/examples/node/package.json @@ -7,12 +7,12 @@ "author": "LI.FI ", "license": "MIT", "dependencies": { - "@lifi/data-types": "^5.19.1", - "@lifi/sdk": "^3.5.1", - "@wagmi/connectors": "^5.7.3", + "@lifi/data-types": "^5.22.0", + "@lifi/sdk": "^3.5.2", + "@wagmi/connectors": "^5.7.5", "@wagmi/core": "^2.16.3", "dotenv": "^16.4.7", - "viem": "^2.22.8" + "viem": "^2.22.15" }, "scripts": { "example:swap": "tsx examples/swap.ts", @@ -24,7 +24,7 @@ "example:yearn": "tsx examples/yearnDeposit.ts" }, "devDependencies": { - "@types/node": "^22.10.6", + "@types/node": "^22.10.10", "tsx": "^4.19.2", "typescript": "^5.7.3" } diff --git a/examples/node/pnpm-lock.yaml b/examples/node/pnpm-lock.yaml index 08f5fb07..c060bba9 100644 --- a/examples/node/pnpm-lock.yaml +++ b/examples/node/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: '9.0' settings: - autoInstallPeers: false + autoInstallPeers: true excludeLinksFromLockfile: false importers: @@ -9,27 +9,27 @@ importers: .: dependencies: '@lifi/data-types': - specifier: ^5.19.1 - version: 5.19.1 + specifier: ^5.22.0 + version: 5.22.0 '@lifi/sdk': - specifier: ^3.5.1 - version: 3.5.1(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) + specifier: ^3.5.2 + version: 3.5.2(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) '@wagmi/connectors': - specifier: ^5.7.3 - version: 5.7.3(@wagmi/core@2.16.3(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) + specifier: ^5.7.5 + version: 5.7.5(@wagmi/core@2.16.3(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) '@wagmi/core': specifier: ^2.16.3 - version: 2.16.3(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) + version: 2.16.3(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) dotenv: specifier: ^16.4.7 version: 16.4.7 viem: - specifier: ^2.22.8 - version: 2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + specifier: ^2.22.15 + version: 2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) devDependencies: '@types/node': - specifier: ^22.10.6 - version: 22.10.6 + specifier: ^22.10.10 + version: 22.10.10 tsx: specifier: ^4.19.2 version: 4.19.2 @@ -42,12 +42,14 @@ packages: '@adraffy/ens-normalize@1.11.0': resolution: {integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==} - '@babel/runtime@7.26.0': - resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + '@babel/runtime@7.26.7': + resolution: {integrity: sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==} engines: {node: '>=6.9.0'} '@bigmi/core@0.1.0': resolution: {integrity: sha512-sTCuWsGnCQ8haZjdEmcSA6PPQKNSwpAO36fPqYJauZPTAvd9ChnuwawMD7HlIkj0+KVdCfDRgKYUdCESqnq+bg==} + peerDependencies: + bs58: ^6.0.0 '@coinbase/wallet-sdk@3.9.3': resolution: {integrity: sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==} @@ -221,19 +223,21 @@ packages: resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} engines: {node: '>=14'} - '@lifi/data-types@5.19.1': - resolution: {integrity: sha512-zR71jEaOBzXtVDULWZFRA+kY9HlEHQxwbzs1fHoH6x+taLSiu3lCESUpsgFHkl1+vxN4ZfthomAjUpt92KJdqQ==} + '@lifi/data-types@5.22.0': + resolution: {integrity: sha512-417QQyU/30ectrSfjC77ftiT8DVvchH75ObWZHrYlz8B1d+WJFvOW5pCXnabS0f+Dfhgc7C/KcQt6sYDhxHnjQ==} - '@lifi/sdk@3.5.1': - resolution: {integrity: sha512-Kd/WMMGitlusFa/ZMoy3Bl3xsUf1ZYel8qYHzxy8kUQozsXmfbpolPShZpG14JyauuSxa2Na/bzGmeIqYS3UkA==} + '@lifi/sdk@3.5.2': + resolution: {integrity: sha512-EUnGcFclymkateB+dHK8LLhe1TvHXldJQhoIvfGSmMOkqlOR6vwFf+ULPFIxNyDubdTwql218j5ajaTfn28fcg==} peerDependencies: + '@solana/wallet-adapter-base': ^0.9.0 + '@solana/web3.js': ^1.98.0 viem: ^2.21.0 - '@lifi/types@16.5.0': - resolution: {integrity: sha512-DqDNnVZiyOrtFdn3Jlloni5J2QDnVfHiS5n3bD9qX9l2ISrgp7YBTJRfNGucHfStvegSNSyuG0/THJ4Kh4f08A==} + '@lifi/types@16.6.0': + resolution: {integrity: sha512-7X0M+O9EvXepsODkvUS5f31CWskNcv8NeG1G0RRTctGe3p79cRPKfVmYTJOkbKibX00nhdzMBsVyafzedazsnA==} - '@lit-labs/ssr-dom-shim@1.2.1': - resolution: {integrity: sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==} + '@lit-labs/ssr-dom-shim@1.3.0': + resolution: {integrity: sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ==} '@lit/reactive-element@1.6.3': resolution: {integrity: sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==} @@ -285,11 +289,11 @@ packages: readable-stream: ^3.6.2 socket.io-client: ^4.5.1 - '@metamask/sdk-install-modal-web@0.31.2': - resolution: {integrity: sha512-KPv36kQjmTwErU8g2neuHHSgkD5+1hp4D6ERfk5Kc2r73aOYNCdG9wDGRUmFmcY2MKkeK1EuDyZfJ4FPU30fxQ==} + '@metamask/sdk-install-modal-web@0.31.5': + resolution: {integrity: sha512-ZfrVkPAabfH4AIxcTlxQN5oyyzzVXFTLZrm1/BJ+X632d9MiyAVHNtiqa9EZpZYkZGk2icmDVP+xCpvJmVOVpQ==} - '@metamask/sdk@0.31.4': - resolution: {integrity: sha512-HLUN4IZGdyiy5YeebXmXi+ndpmrl6zslCQLdR2QHplIy4JmUL/eDyKNFiK7eBLVKXVVIDYFIb6g1iSEb+i8Kew==} + '@metamask/sdk@0.31.5': + resolution: {integrity: sha512-i7wteqO/fU2JWQrMZz+addHokYThHYznp4nYXviv+QysdxGVgAYvcW/PBA+wpeP3veX7QGfNqMPgSsZbBrASYw==} '@metamask/superstruct@3.1.0': resolution: {integrity: sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA==} @@ -332,35 +336,23 @@ packages: resolution: {integrity: sha512-z10PF9JV6SbjFq+/rYabM+8CVlMokgl8RFGvieSGNTmrkQanfHn+15XBrhG3BgUfvmTeSeyShfOHpG0i9zEdcg==} deprecated: Motion One for Vue is deprecated. Use Oku Motion instead https://oku-ui.com/motion - '@noble/ciphers@1.1.3': - resolution: {integrity: sha512-Ygv6WnWJHLLiW4fnNDC1z+i13bud+enXOFRBlpxI+NJliPWx5wdR+oWlTjLuBPTqjUjtHXtjkU6w3kuuH6upZA==} + '@noble/ciphers@1.2.1': + resolution: {integrity: sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA==} engines: {node: ^14.21.3 || >=16} '@noble/curves@1.4.2': resolution: {integrity: sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==} - '@noble/curves@1.7.0': - resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} - engines: {node: ^14.21.3 || >=16} - - '@noble/curves@1.8.0': - resolution: {integrity: sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ==} + '@noble/curves@1.8.1': + resolution: {integrity: sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==} engines: {node: ^14.21.3 || >=16} '@noble/hashes@1.4.0': resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} - '@noble/hashes@1.6.0': - resolution: {integrity: sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==} - engines: {node: ^14.21.3 || >=16} - - '@noble/hashes@1.6.1': - resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==} - engines: {node: ^14.21.3 || >=16} - - '@noble/hashes@1.7.0': - resolution: {integrity: sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==} + '@noble/hashes@1.7.1': + resolution: {integrity: sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==} engines: {node: ^14.21.3 || >=16} '@paulmillr/qr@0.2.1': @@ -372,27 +364,27 @@ packages: '@safe-global/safe-apps-sdk@9.1.0': resolution: {integrity: sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q==} - '@safe-global/safe-gateway-typescript-sdk@3.22.4': - resolution: {integrity: sha512-Z7Z8w3GEJdJ/paF+NK23VN4AwqWPadq0AeRYjYLjIBiPWpRB2UO/FKq7ONABEq0YFgNPklazIV4IExQU1gavXA==} + '@safe-global/safe-gateway-typescript-sdk@3.22.8': + resolution: {integrity: sha512-4J98MEar6qahXQ0aHD+zc3u4ZBnPdble7wIo7aaqxk9U8n96NvMiiDccPr68GwqFqZHkMP9FVrhIiJ5mN+UgoQ==} engines: {node: '>=16'} '@scure/base@1.1.9': resolution: {integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==} - '@scure/base@1.2.1': - resolution: {integrity: sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==} + '@scure/base@1.2.4': + resolution: {integrity: sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==} '@scure/bip32@1.4.0': resolution: {integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==} - '@scure/bip32@1.6.0': - resolution: {integrity: sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA==} + '@scure/bip32@1.6.2': + resolution: {integrity: sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==} '@scure/bip39@1.3.0': resolution: {integrity: sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==} - '@scure/bip39@1.5.0': - resolution: {integrity: sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A==} + '@scure/bip39@1.5.4': + resolution: {integrity: sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==} '@socket.io/component-emitter@3.1.2': resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} @@ -407,8 +399,8 @@ packages: peerDependencies: '@solana/web3.js': ^1.77.3 - '@solana/wallet-standard-features@1.2.0': - resolution: {integrity: sha512-tUd9srDLkRpe1BYg7we+c4UhRQkq+XQWswsr/L1xfGmoRDF47BPSXf4zE7ZU2GRBGvxtGt7lwJVAufQyQYhxTQ==} + '@solana/wallet-standard-features@1.3.0': + resolution: {integrity: sha512-ZhpZtD+4VArf6RPitsVExvgkF+nGghd1rzPjd97GmBximpnt1rsUxMOEyoIEuH3XBxPyNB6Us7ha7RHWQR+abg==} engines: {node: '>=16'} '@solana/web3.js@1.98.0': @@ -477,14 +469,14 @@ packages: '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} - '@types/ms@0.7.34': - resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@22.10.6': - resolution: {integrity: sha512-qNiuwC4ZDAUNcY47xgaSuS92cjf8JbSUoaKS77bmLG1rU7MlATVSiw/IlrjtIyyskXBZ8KkNfjK/P5na7rgXbQ==} + '@types/node@22.10.10': + resolution: {integrity: sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==} '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} @@ -495,11 +487,11 @@ packages: '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} - '@types/ws@8.5.13': - resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} + '@types/ws@8.5.14': + resolution: {integrity: sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==} - '@wagmi/connectors@5.7.3': - resolution: {integrity: sha512-i7Gk5M/Fc9gMvkVHbqw2kGtXvY8POsSY798/9I5npyglVjBddxoVk3xTYmcYTB1VIa4Fi0T2gLTHpQnpLrq1CQ==} + '@wagmi/connectors@5.7.5': + resolution: {integrity: sha512-btqHHUSTzg4BZe9at/7SnRPv4cz8O3pisbeZBh0qxKz7PVm+9vRxY0bSala3xQPDcS0PRTB30Vn/+lM73GCjbw==} peerDependencies: '@wagmi/core': 2.16.3 typescript: '>=5.0.4' @@ -613,8 +605,8 @@ packages: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true - abitype@1.0.7: - resolution: {integrity: sha512-ZfYYSktDQUwc2eduYu8C4wOs+RDPmnRYMh7zNfzeMtGGgb0U+6tLGjixUic6mXf5xKKCcgT5Qp6cv39tOARVFw==} + abitype@1.0.8: + resolution: {integrity: sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==} peerDependencies: typescript: '>=5.0.4' zod: ^3 >=3.22.0 @@ -754,8 +746,8 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - consola@3.3.3: - resolution: {integrity: sha512-Qil5KwghMzlqd51UXM0b6fyaGHtOC22scxrwrz4A2882LyUMwQjnvaedN1HAeXzphspQ6CpHkzMAWxBTUruDLg==} + consola@3.4.0: + resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==} engines: {node: ^14.18.0 || >=16.10.0} cookie-es@1.2.2: @@ -775,8 +767,8 @@ packages: cross-fetch@4.1.0: resolution: {integrity: sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==} - crossws@0.3.1: - resolution: {integrity: sha512-HsZgeVYaG+b5zA+9PbIPGq4+J/CJynJuearykPsXx4V/eMhyQ5EDVg3Ak2FBZtVXCiOLu/U7IiwDHTr9MA+IKw==} + crossws@0.3.3: + resolution: {integrity: sha512-/71DJT3xJlqSnBr83uGJesmVHSzZEvgxHt/fIKxBAAngqMHmnBWQNxCphVxxJ2XL3xleu5+hJD6IQ3TglBedcw==} date-fns@2.30.0: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} @@ -855,8 +847,8 @@ packages: end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - engine.io-client@6.6.2: - resolution: {integrity: sha512-TAr+NKeoVTjEVW8P3iHguO1LO6RlUz9O5Y8o7EY0fU+gY1NYqas7NN3slpFtbXEsLMHk0h90fJMfKjRkQ0qUIw==} + engine.io-client@6.6.3: + resolution: {integrity: sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w==} engine.io-parser@5.2.3: resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==} @@ -870,8 +862,8 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-object-atoms@1.0.0: - resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} es6-promise@4.2.8: @@ -951,8 +943,9 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} - for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + for-each@0.3.4: + resolution: {integrity: sha512-kKaIINnFpzW6ffJNDjjyjrk21BkDx38c0xa/klsT8VzLCaMEefv4ZTacrcVR4DmgTeBra++jMDAfS/tS799YDw==} + engines: {node: '>= 0.4'} fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} @@ -966,8 +959,12 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-intrinsic@1.2.6: - resolution: {integrity: sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==} + get-intrinsic@1.2.7: + resolution: {integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} get-tsconfig@4.8.1: @@ -981,8 +978,8 @@ packages: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} - h3@1.13.0: - resolution: {integrity: sha512-vFEAu/yf8UMUcB4s43OaDaigcqpQd14yanmOsn+NcRX3/guSKncyE2rOYhq8RIchgJrPSs/QiIddnTTR1ddiAg==} + h3@1.14.0: + resolution: {integrity: sha512-ao22eiONdgelqcnknw0iD645qW0s9NnrJHr5OBz4WOMdBdycfSas1EQf1wXRsm+PcB2Yoj43pjBPwqIpJQTeWg==} has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} @@ -1043,8 +1040,8 @@ packages: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - is-generator-function@1.0.10: - resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + is-generator-function@1.1.0: + resolution: {integrity: sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==} engines: {node: '>= 0.4'} is-glob@4.0.3: @@ -1055,6 +1052,10 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-regex@1.2.1: + resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} + engines: {node: '>= 0.4'} + is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -1081,6 +1082,9 @@ packages: engines: {node: '>=8'} hasBin: true + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + json-rpc-engine@6.1.0: resolution: {integrity: sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==} engines: {node: '>=10.0.0'} @@ -1118,6 +1122,10 @@ packages: lodash.isequal@4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -1159,8 +1167,8 @@ packages: node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} - node-fetch-native@1.6.4: - resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} + node-fetch-native@1.6.6: + resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} @@ -1194,8 +1202,8 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - ox@0.6.0: - resolution: {integrity: sha512-blUzTLidvUlshv0O02CnLFqBLidNzPoAZdIth894avUAotTuWziznv6IENv5idRuOSSP3dH8WzcYw84zVdu0Aw==} + ox@0.6.7: + resolution: {integrity: sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: @@ -1285,6 +1293,10 @@ packages: radix3@1.1.2: resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} + react@18.3.1: + resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + engines: {node: '>=0.10.0'} + readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} @@ -1322,6 +1334,10 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + safe-regex-test@1.1.0: + resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} + engines: {node: '>= 0.4'} + safe-stable-stringify@2.5.0: resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} engines: {node: '>=10'} @@ -1550,17 +1566,14 @@ packages: varuint-bitcoin@2.0.0: resolution: {integrity: sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==} - viem@2.22.8: - resolution: {integrity: sha512-iB3PW/a/qzpYbpjo3R662u6a/zo6piZHez/N/bOC25C79FYXBCs8mQDqwiHk3FYErUhS4KVZLabKV9zGMd+EgQ==} + viem@2.22.15: + resolution: {integrity: sha512-7m5T/Emaj/C59jsRxYfZvMvckRRC4+rV+MVufKelxPS5DMhVR4z3Bk6CG8z+eQkpLVearqKBiPvvreLI0AesgA==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: typescript: optional: true - webauthn-p256@0.0.10: - resolution: {integrity: sha512-EeYD+gmIT80YkSIDb2iWq0lq2zbHo1CxHlQTeJ+KkCILWpVy3zASH3ByD4bopzfk0uCwXxLqKGLqp2W4O28VFA==} - webextension-polyfill@0.10.0: resolution: {integrity: sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g==} @@ -1661,17 +1674,17 @@ snapshots: '@adraffy/ens-normalize@1.11.0': {} - '@babel/runtime@7.26.0': + '@babel/runtime@7.26.7': dependencies: regenerator-runtime: 0.14.1 '@bigmi/core@0.1.0(bs58@6.0.0)(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)': dependencies: - '@noble/hashes': 1.7.0 + '@noble/hashes': 1.7.1 bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.3) bs58: 6.0.0 - viem: 2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript @@ -1694,14 +1707,14 @@ snapshots: '@coinbase/wallet-sdk@4.2.3': dependencies: - '@noble/hashes': 1.6.1 + '@noble/hashes': 1.7.1 clsx: 1.2.1 eventemitter3: 5.0.1 preact: 10.25.4 - '@ecies/ciphers@0.2.2(@noble/ciphers@1.1.3)': + '@ecies/ciphers@0.2.2(@noble/ciphers@1.2.1)': dependencies: - '@noble/ciphers': 1.1.3 + '@noble/ciphers': 1.2.1 '@esbuild/aix-ppc64@0.23.1': optional: true @@ -1795,35 +1808,34 @@ snapshots: ethereum-cryptography: 2.2.1 micro-ftch: 0.3.1 - '@lifi/data-types@5.19.1': + '@lifi/data-types@5.22.0': dependencies: - '@lifi/types': 16.5.0 + '@lifi/types': 16.6.0 - '@lifi/sdk@3.5.1(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': + '@lifi/sdk@3.5.2(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: '@bigmi/core': 0.1.0(bs58@6.0.0)(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) - '@lifi/types': 16.5.0 - '@noble/curves': 1.8.0 + '@lifi/types': 16.6.0 + '@noble/curves': 1.8.1 '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.3) bs58: 6.0.0 - viem: 2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - - encoding - typescript - utf-8-validate - zod - '@lifi/types@16.5.0': {} + '@lifi/types@16.6.0': {} - '@lit-labs/ssr-dom-shim@1.2.1': {} + '@lit-labs/ssr-dom-shim@1.3.0': {} '@lit/reactive-element@1.6.3': dependencies: - '@lit-labs/ssr-dom-shim': 1.2.1 + '@lit-labs/ssr-dom-shim': 1.3.0 '@metamask/eth-json-rpc-provider@1.0.1': dependencies: @@ -1910,17 +1922,17 @@ snapshots: transitivePeerDependencies: - supports-color - '@metamask/sdk-install-modal-web@0.31.2': + '@metamask/sdk-install-modal-web@0.31.5': dependencies: '@paulmillr/qr': 0.2.1 - '@metamask/sdk@0.31.4(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + '@metamask/sdk@0.31.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)': dependencies: - '@babel/runtime': 7.26.0 + '@babel/runtime': 7.26.7 '@metamask/onboarding': 1.0.1 '@metamask/providers': 16.1.0 '@metamask/sdk-communication-layer': 0.31.0(cross-fetch@4.1.0)(eciesjs@0.4.13)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@metamask/sdk-install-modal-web': 0.31.2 + '@metamask/sdk-install-modal-web': 0.31.5 '@paulmillr/qr': 0.2.1 bowser: 2.11.0 cross-fetch: 4.1.0 @@ -1957,8 +1969,8 @@ snapshots: dependencies: '@ethereumjs/tx': 4.2.0 '@metamask/superstruct': 3.1.0 - '@noble/hashes': 1.6.1 - '@scure/base': 1.2.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 '@types/debug': 4.1.12 debug: 4.4.0 pony-cause: 2.1.11 @@ -1971,8 +1983,8 @@ snapshots: dependencies: '@ethereumjs/tx': 4.2.0 '@metamask/superstruct': 3.1.0 - '@noble/hashes': 1.6.1 - '@scure/base': 1.2.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 '@types/debug': 4.1.12 debug: 4.4.0 pony-cause: 2.1.11 @@ -2026,27 +2038,19 @@ snapshots: '@motionone/dom': 10.18.0 tslib: 2.8.1 - '@noble/ciphers@1.1.3': {} + '@noble/ciphers@1.2.1': {} '@noble/curves@1.4.2': dependencies: '@noble/hashes': 1.4.0 - '@noble/curves@1.7.0': - dependencies: - '@noble/hashes': 1.6.0 - - '@noble/curves@1.8.0': + '@noble/curves@1.8.1': dependencies: - '@noble/hashes': 1.7.0 + '@noble/hashes': 1.7.1 '@noble/hashes@1.4.0': {} - '@noble/hashes@1.6.0': {} - - '@noble/hashes@1.6.1': {} - - '@noble/hashes@1.7.0': {} + '@noble/hashes@1.7.1': {} '@paulmillr/qr@0.2.1': {} @@ -2062,19 +2066,19 @@ snapshots: '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)': dependencies: - '@safe-global/safe-gateway-typescript-sdk': 3.22.4 - viem: 2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + '@safe-global/safe-gateway-typescript-sdk': 3.22.8 + viem: 2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript - utf-8-validate - zod - '@safe-global/safe-gateway-typescript-sdk@3.22.4': {} + '@safe-global/safe-gateway-typescript-sdk@3.22.8': {} '@scure/base@1.1.9': {} - '@scure/base@1.2.1': {} + '@scure/base@1.2.4': {} '@scure/bip32@1.4.0': dependencies: @@ -2082,21 +2086,21 @@ snapshots: '@noble/hashes': 1.4.0 '@scure/base': 1.1.9 - '@scure/bip32@1.6.0': + '@scure/bip32@1.6.2': dependencies: - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 - '@scure/base': 1.2.1 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 '@scure/bip39@1.3.0': dependencies: '@noble/hashes': 1.4.0 '@scure/base': 1.1.9 - '@scure/bip39@1.5.0': + '@scure/bip39@1.5.4': dependencies: - '@noble/hashes': 1.6.1 - '@scure/base': 1.2.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 '@socket.io/component-emitter@3.1.2': {} @@ -2106,22 +2110,22 @@ snapshots: '@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: - '@solana/wallet-standard-features': 1.2.0 + '@solana/wallet-standard-features': 1.3.0 '@solana/web3.js': 1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@wallet-standard/base': 1.1.0 '@wallet-standard/features': 1.1.0 eventemitter3: 4.0.7 - '@solana/wallet-standard-features@1.2.0': + '@solana/wallet-standard-features@1.3.0': dependencies: '@wallet-standard/base': 1.1.0 '@wallet-standard/features': 1.1.0 '@solana/web3.js@1.98.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': dependencies: - '@babel/runtime': 7.26.0 - '@noble/curves': 1.8.0 - '@noble/hashes': 1.7.0 + '@babel/runtime': 7.26.7 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 '@solana/buffer-layout': 4.0.1 agentkeepalive: 4.6.0 bigint-buffer: 1.1.5 @@ -2225,17 +2229,17 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.10.6 + '@types/node': 22.10.10 '@types/debug@4.1.12': dependencies: - '@types/ms': 0.7.34 + '@types/ms': 2.1.0 - '@types/ms@0.7.34': {} + '@types/ms@2.1.0': {} '@types/node@12.20.55': {} - '@types/node@22.10.6': + '@types/node@22.10.10': dependencies: undici-types: 6.20.0 @@ -2245,22 +2249,22 @@ snapshots: '@types/ws@7.4.7': dependencies: - '@types/node': 22.10.6 + '@types/node': 22.10.10 - '@types/ws@8.5.13': + '@types/ws@8.5.14': dependencies: - '@types/node': 22.10.6 + '@types/node': 22.10.10 - '@wagmi/connectors@5.7.3(@wagmi/core@2.16.3(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': + '@wagmi/connectors@5.7.5(@wagmi/core@2.16.3(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(react@18.3.1)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: '@coinbase/wallet-sdk': 4.2.3 - '@metamask/sdk': 0.31.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@metamask/sdk': 0.31.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': 0.18.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) - '@wagmi/core': 2.16.3(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) + '@wagmi/core': 2.16.3(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) '@walletconnect/ethereum-provider': 2.17.0(bufferutil@4.0.9)(react@18.3.1)(utf-8-validate@5.0.10) cbw-sdk: '@coinbase/wallet-sdk@3.9.3' - viem: 2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: @@ -2290,11 +2294,11 @@ snapshots: - utf-8-validate - zod - '@wagmi/core@2.16.3(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': + '@wagmi/core@2.16.3(react@18.3.1)(typescript@5.7.3)(use-sync-external-store@1.2.0(react@18.3.1))(viem@2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.7.3) - viem: 2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) zustand: 5.0.0(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)) optionalDependencies: typescript: 5.7.3 @@ -2354,13 +2358,13 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/ethereum-provider@2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + '@walletconnect/ethereum-provider@2.17.0(bufferutil@4.0.9)(react@18.3.1)(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.7.0 + '@walletconnect/modal': 2.7.0(react@18.3.1) '@walletconnect/sign-client': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@walletconnect/types': 2.17.0 '@walletconnect/universal-provider': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) @@ -2467,16 +2471,16 @@ snapshots: '@walletconnect/safe-json': 1.0.2 pino: 7.11.0 - '@walletconnect/modal-core@2.7.0': + '@walletconnect/modal-core@2.7.0(react@18.3.1)': dependencies: - valtio: 1.11.2 + valtio: 1.11.2(react@18.3.1) transitivePeerDependencies: - '@types/react' - react - '@walletconnect/modal-ui@2.7.0': + '@walletconnect/modal-ui@2.7.0(react@18.3.1)': dependencies: - '@walletconnect/modal-core': 2.7.0 + '@walletconnect/modal-core': 2.7.0(react@18.3.1) lit: 2.8.0 motion: 10.16.2 qrcode: 1.5.3 @@ -2484,10 +2488,10 @@ snapshots: - '@types/react' - react - '@walletconnect/modal@2.7.0': + '@walletconnect/modal@2.7.0(react@18.3.1)': dependencies: - '@walletconnect/modal-core': 2.7.0 - '@walletconnect/modal-ui': 2.7.0 + '@walletconnect/modal-core': 2.7.0(react@18.3.1) + '@walletconnect/modal-ui': 2.7.0(react@18.3.1) transitivePeerDependencies: - '@types/react' - react @@ -2660,7 +2664,7 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 - abitype@1.0.7(typescript@5.7.3): + abitype@1.0.8(typescript@5.7.3): optionalDependencies: typescript: 5.7.3 @@ -2716,7 +2720,7 @@ snapshots: bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.3): dependencies: - '@noble/hashes': 1.7.0 + '@noble/hashes': 1.7.1 bech32: 2.0.0 bip174: 3.0.0-rc.1 bs58check: 4.0.0 @@ -2754,7 +2758,7 @@ snapshots: bs58check@4.0.0: dependencies: - '@noble/hashes': 1.7.0 + '@noble/hashes': 1.7.1 bs58: 6.0.0 buffer@6.0.3: @@ -2775,13 +2779,13 @@ snapshots: dependencies: call-bind-apply-helpers: 1.0.1 es-define-property: 1.0.1 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 set-function-length: 1.2.2 call-bound@1.0.3: dependencies: call-bind-apply-helpers: 1.0.1 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 camelcase@5.3.1: {} @@ -2813,7 +2817,7 @@ snapshots: commander@2.20.3: {} - consola@3.3.3: {} + consola@3.4.0: {} cookie-es@1.2.2: {} @@ -2833,13 +2837,13 @@ snapshots: transitivePeerDependencies: - encoding - crossws@0.3.1: + crossws@0.3.3: dependencies: uncrypto: 0.1.3 date-fns@2.30.0: dependencies: - '@babel/runtime': 7.26.0 + '@babel/runtime': 7.26.7 debug@4.3.7: dependencies: @@ -2886,10 +2890,10 @@ snapshots: eciesjs@0.4.13: dependencies: - '@ecies/ciphers': 0.2.2(@noble/ciphers@1.1.3) - '@noble/ciphers': 1.1.3 - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 + '@ecies/ciphers': 0.2.2(@noble/ciphers@1.2.1) + '@noble/ciphers': 1.2.1 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 elliptic@6.6.1: dependencies: @@ -2909,7 +2913,7 @@ snapshots: dependencies: once: 1.4.0 - engine.io-client@6.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10): + engine.io-client@6.6.3(bufferutil@4.0.9)(utf-8-validate@5.0.10): dependencies: '@socket.io/component-emitter': 3.1.2 debug: 4.3.7 @@ -2927,7 +2931,7 @@ snapshots: es-errors@1.3.0: {} - es-object-atoms@1.0.0: + es-object-atoms@1.1.1: dependencies: es-errors: 1.3.0 @@ -3034,7 +3038,7 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 - for-each@0.3.3: + for-each@0.3.4: dependencies: is-callable: 1.2.7 @@ -3045,19 +3049,24 @@ snapshots: get-caller-file@2.0.5: {} - get-intrinsic@1.2.6: + get-intrinsic@1.2.7: dependencies: call-bind-apply-helpers: 1.0.1 - dunder-proto: 1.0.1 es-define-property: 1.0.1 es-errors: 1.3.0 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 function-bind: 1.1.2 + get-proto: 1.0.1 gopd: 1.2.0 has-symbols: 1.1.0 hasown: 2.0.2 math-intrinsics: 1.1.0 + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + get-tsconfig@4.8.1: dependencies: resolve-pkg-maps: 1.0.0 @@ -3068,10 +3077,10 @@ snapshots: gopd@1.2.0: {} - h3@1.13.0: + h3@1.14.0: dependencies: cookie-es: 1.2.2 - crossws: 0.3.1 + crossws: 0.3.3 defu: 6.1.4 destr: 2.0.3 iron-webcrypto: 1.2.1 @@ -3135,9 +3144,12 @@ snapshots: is-fullwidth-code-point@3.0.0: {} - is-generator-function@1.0.10: + is-generator-function@1.1.0: dependencies: + call-bound: 1.0.3 + get-proto: 1.0.1 has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 is-glob@4.0.3: dependencies: @@ -3145,6 +3157,13 @@ snapshots: is-number@7.0.0: {} + is-regex@1.2.1: + dependencies: + call-bound: 1.0.3 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + is-stream@2.0.1: {} is-typed-array@1.1.15: @@ -3179,6 +3198,8 @@ snapshots: - bufferutil - utf-8-validate + js-tokens@4.0.0: {} + json-rpc-engine@6.1.0: dependencies: '@metamask/safe-event-emitter': 2.0.0 @@ -3200,7 +3221,7 @@ snapshots: lit-element@3.3.3: dependencies: - '@lit-labs/ssr-dom-shim': 1.2.1 + '@lit-labs/ssr-dom-shim': 1.3.0 '@lit/reactive-element': 1.6.3 lit-html: 2.8.0 @@ -3220,6 +3241,10 @@ snapshots: lodash.isequal@4.5.0: {} + loose-envify@1.4.0: + dependencies: + js-tokens: 4.0.0 + lru-cache@10.4.3: {} math-intrinsics@1.1.0: {} @@ -3251,7 +3276,7 @@ snapshots: node-addon-api@2.0.2: {} - node-fetch-native@1.6.4: {} + node-fetch-native@1.6.6: {} node-fetch@2.7.0: dependencies: @@ -3270,7 +3295,7 @@ snapshots: ofetch@1.4.1: dependencies: destr: 2.0.3 - node-fetch-native: 1.6.4 + node-fetch-native: 1.6.6 ufo: 1.5.4 ohash@1.1.4: {} @@ -3281,14 +3306,14 @@ snapshots: dependencies: wrappy: 1.0.2 - ox@0.6.0(typescript@5.7.3): + ox@0.6.7(typescript@5.7.3): dependencies: '@adraffy/ens-normalize': 1.11.0 - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 - '@scure/bip32': 1.6.0 - '@scure/bip39': 1.5.0 - abitype: 1.0.7(typescript@5.7.3) + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3) eventemitter3: 5.0.1 optionalDependencies: typescript: 5.7.3 @@ -3373,6 +3398,10 @@ snapshots: radix3@1.1.2: {} + react@18.3.1: + dependencies: + loose-envify: 1.4.0 + readable-stream@2.3.8: dependencies: core-util-is: 1.0.3 @@ -3407,7 +3436,7 @@ snapshots: dependencies: '@swc/helpers': 0.5.15 '@types/uuid': 8.3.4 - '@types/ws': 8.5.13 + '@types/ws': 8.5.14 buffer: 6.0.3 eventemitter3: 5.0.1 uuid: 8.3.2 @@ -3420,6 +3449,12 @@ snapshots: safe-buffer@5.2.1: {} + safe-regex-test@1.1.0: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-regex: 1.2.1 + safe-stable-stringify@2.5.0: {} semver@7.6.3: {} @@ -3431,7 +3466,7 @@ snapshots: define-data-property: 1.1.4 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 gopd: 1.2.0 has-property-descriptors: 1.0.2 @@ -3444,7 +3479,7 @@ snapshots: dependencies: '@socket.io/component-emitter': 3.1.2 debug: 4.3.7 - engine.io-client: 6.6.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) + engine.io-client: 6.6.3(bufferutil@4.0.9)(utf-8-validate@5.0.10) socket.io-parser: 4.2.4 transitivePeerDependencies: - bufferutil @@ -3535,10 +3570,10 @@ snapshots: unenv@1.10.0: dependencies: - consola: 3.3.3 + consola: 3.4.0 defu: 6.1.4 mime: 3.0.0 - node-fetch-native: 1.6.4 + node-fetch-native: 1.6.6 pathe: 1.1.2 unstorage@1.14.4(idb-keyval@6.2.1): @@ -3546,15 +3581,17 @@ snapshots: anymatch: 3.1.3 chokidar: 3.6.0 destr: 2.0.3 - h3: 1.13.0 + h3: 1.14.0 lru-cache: 10.4.3 - node-fetch-native: 1.6.4 + node-fetch-native: 1.6.6 ofetch: 1.4.1 ufo: 1.5.4 optionalDependencies: idb-keyval: 6.2.1 - use-sync-external-store@1.2.0: {} + use-sync-external-store@1.2.0(react@18.3.1): + dependencies: + react: 18.3.1 utf-8-validate@5.0.10: dependencies: @@ -3566,7 +3603,7 @@ snapshots: dependencies: inherits: 2.0.4 is-arguments: 1.2.0 - is-generator-function: 1.0.10 + is-generator-function: 1.1.0 is-typed-array: 1.1.15 which-typed-array: 1.1.18 @@ -3578,25 +3615,26 @@ snapshots: optionalDependencies: typescript: 5.7.3 - valtio@1.11.2: + valtio@1.11.2(react@18.3.1): dependencies: proxy-compare: 2.5.1 - use-sync-external-store: 1.2.0 + use-sync-external-store: 1.2.0(react@18.3.1) + optionalDependencies: + react: 18.3.1 varuint-bitcoin@2.0.0: dependencies: uint8array-tools: 0.0.8 - viem@2.22.8(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10): + viem@2.22.15(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10): dependencies: - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 - '@scure/bip32': 1.6.0 - '@scure/bip39': 1.5.0 - abitype: 1.0.7(typescript@5.7.3) + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3) isows: 1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - ox: 0.6.0(typescript@5.7.3) - webauthn-p256: 0.0.10 + ox: 0.6.7(typescript@5.7.3) ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.7.3 @@ -3605,11 +3643,6 @@ snapshots: - utf-8-validate - zod - webauthn-p256@0.0.10: - dependencies: - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 - webextension-polyfill@0.10.0: {} webidl-conversions@3.0.1: {} @@ -3626,7 +3659,7 @@ snapshots: available-typed-arrays: 1.0.7 call-bind: 1.0.8 call-bound: 1.0.3 - for-each: 0.3.3 + for-each: 0.3.4 gopd: 1.2.0 has-tostringtag: 1.0.2 @@ -3678,6 +3711,7 @@ snapshots: y18n: 4.0.3 yargs-parser: 18.1.3 - zustand@5.0.0(use-sync-external-store@1.2.0): + zustand@5.0.0(react@18.3.1)(use-sync-external-store@1.2.0(react@18.3.1)): optionalDependencies: - use-sync-external-store: 1.2.0 + react: 18.3.1 + use-sync-external-store: 1.2.0(react@18.3.1) diff --git a/package.json b/package.json index 33e913d9..f6948a4d 100644 --- a/package.json +++ b/package.json @@ -93,32 +93,32 @@ }, "dependencies": { "@bigmi/core": "^0.1.0", - "@lifi/types": "^16.5.0", - "@noble/curves": "^1.8.0", + "@lifi/types": "^16.6.0", + "@noble/curves": "^1.8.1", "@solana/wallet-adapter-base": "^0.9.23", "@solana/web3.js": "^1.98.0", "bech32": "^2.0.0", "bitcoinjs-lib": "^7.0.0-rc.0", "bs58": "^6.0.0", - "viem": "^2.22.8" + "viem": "^2.22.15" }, "devDependencies": { "@biomejs/biome": "^1.9.4", "@commitlint/cli": "^19.6.1", "@commitlint/config-conventional": "^19.6.0", "@types/fs-extra": "^11.0.4", - "@types/ws": "^8.5.13", - "@vitest/coverage-v8": "^2.1.8", - "fs-extra": "^11.2.0", + "@types/ws": "^8.5.14", + "@vitest/coverage-v8": "^3.0.4", + "fs-extra": "^11.3.0", "husky": "^9.1.7", - "lint-staged": "^15.3.0", + "lint-staged": "^15.4.3", "madge": "^8.0.0", "msw": "^2.7.0", "pinst": "^3.0.0", "standard-version": "^9.5.0", "ts-node": "^10.9.2", "typescript": "^5.7.3", - "vitest": "^2.1.8" + "vitest": "^3.0.4" }, "peerDependencies": { "@solana/wallet-adapter-base": "^0.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 61d71bcc..168ee4fe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,11 +12,11 @@ importers: specifier: ^0.1.0 version: 0.1.0(bs58@6.0.0)(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) '@lifi/types': - specifier: ^16.5.0 - version: 16.5.0 + specifier: ^16.6.0 + version: 16.6.0 '@noble/curves': - specifier: ^1.8.0 - version: 1.8.0 + specifier: ^1.8.1 + version: 1.8.1 '@solana/wallet-adapter-base': specifier: ^0.9.23 version: 0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -33,15 +33,15 @@ importers: specifier: ^6.0.0 version: 6.0.0 viem: - specifier: ^2.22.8 - version: 2.22.8(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) + specifier: ^2.22.15 + version: 2.22.15(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) devDependencies: '@biomejs/biome': specifier: ^1.9.4 version: 1.9.4 '@commitlint/cli': specifier: ^19.6.1 - version: 19.6.1(@types/node@22.10.1)(typescript@5.7.3) + version: 19.6.1(@types/node@22.10.10)(typescript@5.7.3) '@commitlint/config-conventional': specifier: ^19.6.0 version: 19.6.0 @@ -49,26 +49,26 @@ importers: specifier: ^11.0.4 version: 11.0.4 '@types/ws': - specifier: ^8.5.13 - version: 8.5.13 + specifier: ^8.5.14 + version: 8.5.14 '@vitest/coverage-v8': - specifier: ^2.1.8 - version: 2.1.8(vitest@2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3))) + specifier: ^3.0.4 + version: 3.0.4(vitest@3.0.4(@types/node@22.10.10)(jiti@2.4.2)(msw@2.7.0(@types/node@22.10.10)(typescript@5.7.3))(yaml@2.7.0)) fs-extra: - specifier: ^11.2.0 - version: 11.2.0 + specifier: ^11.3.0 + version: 11.3.0 husky: specifier: ^9.1.7 version: 9.1.7 lint-staged: - specifier: ^15.3.0 - version: 15.3.0 + specifier: ^15.4.3 + version: 15.4.3 madge: specifier: ^8.0.0 version: 8.0.0(typescript@5.7.3) msw: specifier: ^2.7.0 - version: 2.7.0(@types/node@22.10.1)(typescript@5.7.3) + version: 2.7.0(@types/node@22.10.10)(typescript@5.7.3) pinst: specifier: ^3.0.0 version: 3.0.0 @@ -77,13 +77,13 @@ importers: version: 9.5.0 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.1)(typescript@5.7.3) + version: 10.9.2(@types/node@22.10.10)(typescript@5.7.3) typescript: specifier: ^5.7.3 version: 5.7.3 vitest: - specifier: ^2.1.8 - version: 2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3)) + specifier: ^3.0.4 + version: 3.0.4(@types/node@22.10.10)(jiti@2.4.2)(msw@2.7.0(@types/node@22.10.10)(typescript@5.7.3))(yaml@2.7.0) packages: @@ -119,6 +119,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.26.7': + resolution: {integrity: sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/runtime@7.26.0': resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} @@ -127,8 +132,13 @@ packages: resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==} engines: {node: '>=6.9.0'} - '@bcoe/v8-coverage@0.2.3': - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@babel/types@7.26.7': + resolution: {integrity: sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==} + engines: {node: '>=6.9.0'} + + '@bcoe/v8-coverage@1.0.2': + resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} + engines: {node: '>=18'} '@bigmi/core@0.1.0': resolution: {integrity: sha512-sTCuWsGnCQ8haZjdEmcSA6PPQKNSwpAO36fPqYJauZPTAvd9ChnuwawMD7HlIkj0+KVdCfDRgKYUdCESqnq+bg==} @@ -274,141 +284,153 @@ packages: resolution: {integrity: sha512-D/9dozteKcutI5OdxJd8rU+fL6XgaaRg60sPPJWkT33OCiRfkCu5wO5B/yXTaaL2e6EB0lcCBGe5E0XscZCvvQ==} engines: {node: '>=18'} - '@esbuild/aix-ppc64@0.21.5': - resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} - engines: {node: '>=12'} + '@esbuild/aix-ppc64@0.24.2': + resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} + engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.21.5': - resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} - engines: {node: '>=12'} + '@esbuild/android-arm64@0.24.2': + resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.21.5': - resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} - engines: {node: '>=12'} + '@esbuild/android-arm@0.24.2': + resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.21.5': - resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} - engines: {node: '>=12'} + '@esbuild/android-x64@0.24.2': + resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.21.5': - resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} - engines: {node: '>=12'} + '@esbuild/darwin-arm64@0.24.2': + resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.21.5': - resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} - engines: {node: '>=12'} + '@esbuild/darwin-x64@0.24.2': + resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.21.5': - resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} - engines: {node: '>=12'} + '@esbuild/freebsd-arm64@0.24.2': + resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.21.5': - resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} - engines: {node: '>=12'} + '@esbuild/freebsd-x64@0.24.2': + resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.21.5': - resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} - engines: {node: '>=12'} + '@esbuild/linux-arm64@0.24.2': + resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.21.5': - resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} - engines: {node: '>=12'} + '@esbuild/linux-arm@0.24.2': + resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.21.5': - resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} - engines: {node: '>=12'} + '@esbuild/linux-ia32@0.24.2': + resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.21.5': - resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} - engines: {node: '>=12'} + '@esbuild/linux-loong64@0.24.2': + resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.21.5': - resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} - engines: {node: '>=12'} + '@esbuild/linux-mips64el@0.24.2': + resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.21.5': - resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} - engines: {node: '>=12'} + '@esbuild/linux-ppc64@0.24.2': + resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.21.5': - resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} - engines: {node: '>=12'} + '@esbuild/linux-riscv64@0.24.2': + resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.21.5': - resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} - engines: {node: '>=12'} + '@esbuild/linux-s390x@0.24.2': + resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.21.5': - resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} - engines: {node: '>=12'} + '@esbuild/linux-x64@0.24.2': + resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.21.5': - resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} - engines: {node: '>=12'} + '@esbuild/netbsd-arm64@0.24.2': + resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.24.2': + resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-x64@0.21.5': - resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} - engines: {node: '>=12'} + '@esbuild/openbsd-arm64@0.24.2': + resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.24.2': + resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.21.5': - resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} - engines: {node: '>=12'} + '@esbuild/sunos-x64@0.24.2': + resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.21.5': - resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} - engines: {node: '>=12'} + '@esbuild/win32-arm64@0.24.2': + resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.21.5': - resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} - engines: {node: '>=12'} + '@esbuild/win32-ia32@0.24.2': + resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.21.5': - resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} - engines: {node: '>=12'} + '@esbuild/win32-x64@0.24.2': + resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} + engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -444,8 +466,8 @@ packages: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} - '@jridgewell/gen-mapping@0.3.5': - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} engines: {node: '>=6.0.0'} '@jridgewell/resolve-uri@3.1.2': @@ -465,31 +487,23 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@lifi/types@16.5.0': - resolution: {integrity: sha512-DqDNnVZiyOrtFdn3Jlloni5J2QDnVfHiS5n3bD9qX9l2ISrgp7YBTJRfNGucHfStvegSNSyuG0/THJ4Kh4f08A==} + '@lifi/types@16.6.0': + resolution: {integrity: sha512-7X0M+O9EvXepsODkvUS5f31CWskNcv8NeG1G0RRTctGe3p79cRPKfVmYTJOkbKibX00nhdzMBsVyafzedazsnA==} '@mswjs/interceptors@0.37.3': resolution: {integrity: sha512-USvgCL/uOGFtVa6SVyRrC8kIAedzRohxIXN5LISlg5C5vLZCn7dgMFVSNhSF9cuBEFrm/O2spDWEZeMnw4ZXYg==} engines: {node: '>=18'} - '@noble/curves@1.7.0': - resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} - engines: {node: ^14.21.3 || >=16} - - '@noble/curves@1.8.0': - resolution: {integrity: sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ==} - engines: {node: ^14.21.3 || >=16} - - '@noble/hashes@1.6.0': - resolution: {integrity: sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==} + '@noble/curves@1.8.1': + resolution: {integrity: sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==} engines: {node: ^14.21.3 || >=16} '@noble/hashes@1.6.1': resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==} engines: {node: ^14.21.3 || >=16} - '@noble/hashes@1.7.0': - resolution: {integrity: sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==} + '@noble/hashes@1.7.1': + resolution: {integrity: sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==} engines: {node: ^14.21.3 || >=16} '@nodelib/fs.scandir@2.1.5': @@ -517,104 +531,109 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@rollup/rollup-android-arm-eabi@4.28.0': - resolution: {integrity: sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ==} + '@rollup/rollup-android-arm-eabi@4.32.0': + resolution: {integrity: sha512-G2fUQQANtBPsNwiVFg4zKiPQyjVKZCUdQUol53R8E71J7AsheRMV/Yv/nB8giOcOVqP7//eB5xPqieBYZe9bGg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.28.0': - resolution: {integrity: sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA==} + '@rollup/rollup-android-arm64@4.32.0': + resolution: {integrity: sha512-qhFwQ+ljoymC+j5lXRv8DlaJYY/+8vyvYmVx074zrLsu5ZGWYsJNLjPPVJJjhZQpyAKUGPydOq9hRLLNvh1s3A==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.28.0': - resolution: {integrity: sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q==} + '@rollup/rollup-darwin-arm64@4.32.0': + resolution: {integrity: sha512-44n/X3lAlWsEY6vF8CzgCx+LQaoqWGN7TzUfbJDiTIOjJm4+L2Yq+r5a8ytQRGyPqgJDs3Rgyo8eVL7n9iW6AQ==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.28.0': - resolution: {integrity: sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==} + '@rollup/rollup-darwin-x64@4.32.0': + resolution: {integrity: sha512-F9ct0+ZX5Np6+ZDztxiGCIvlCaW87HBdHcozUfsHnj1WCUTBUubAoanhHUfnUHZABlElyRikI0mgcw/qdEm2VQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.28.0': - resolution: {integrity: sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ==} + '@rollup/rollup-freebsd-arm64@4.32.0': + resolution: {integrity: sha512-JpsGxLBB2EFXBsTLHfkZDsXSpSmKD3VxXCgBQtlPcuAqB8TlqtLcbeMhxXQkCDv1avgwNjF8uEIbq5p+Cee0PA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.28.0': - resolution: {integrity: sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA==} + '@rollup/rollup-freebsd-x64@4.32.0': + resolution: {integrity: sha512-wegiyBT6rawdpvnD9lmbOpx5Sph+yVZKHbhnSP9MqUEDX08G4UzMU+D87jrazGE7lRSyTRs6NEYHtzfkJ3FjjQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.28.0': - resolution: {integrity: sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==} + '@rollup/rollup-linux-arm-gnueabihf@4.32.0': + resolution: {integrity: sha512-3pA7xecItbgOs1A5H58dDvOUEboG5UfpTq3WzAdF54acBbUM+olDJAPkgj1GRJ4ZqE12DZ9/hNS2QZk166v92A==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.28.0': - resolution: {integrity: sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==} + '@rollup/rollup-linux-arm-musleabihf@4.32.0': + resolution: {integrity: sha512-Y7XUZEVISGyge51QbYyYAEHwpGgmRrAxQXO3siyYo2kmaj72USSG8LtlQQgAtlGfxYiOwu+2BdbPjzEpcOpRmQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.28.0': - resolution: {integrity: sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==} + '@rollup/rollup-linux-arm64-gnu@4.32.0': + resolution: {integrity: sha512-r7/OTF5MqeBrZo5omPXcTnjvv1GsrdH8a8RerARvDFiDwFpDVDnJyByYM/nX+mvks8XXsgPUxkwe/ltaX2VH7w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.28.0': - resolution: {integrity: sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==} + '@rollup/rollup-linux-arm64-musl@4.32.0': + resolution: {integrity: sha512-HJbifC9vex9NqnlodV2BHVFNuzKL5OnsV2dvTw6e1dpZKkNjPG6WUq+nhEYV6Hv2Bv++BXkwcyoGlXnPrjAKXw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.28.0': - resolution: {integrity: sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==} + '@rollup/rollup-linux-loongarch64-gnu@4.32.0': + resolution: {integrity: sha512-VAEzZTD63YglFlWwRj3taofmkV1V3xhebDXffon7msNz4b14xKsz7utO6F8F4cqt8K/ktTl9rm88yryvDpsfOw==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.32.0': + resolution: {integrity: sha512-Sts5DST1jXAc9YH/iik1C9QRsLcCoOScf3dfbY5i4kH9RJpKxiTBXqm7qU5O6zTXBTEZry69bGszr3SMgYmMcQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.28.0': - resolution: {integrity: sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==} + '@rollup/rollup-linux-riscv64-gnu@4.32.0': + resolution: {integrity: sha512-qhlXeV9AqxIyY9/R1h1hBD6eMvQCO34ZmdYvry/K+/MBs6d1nRFLm6BOiITLVI+nFAAB9kUB6sdJRKyVHXnqZw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.28.0': - resolution: {integrity: sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==} + '@rollup/rollup-linux-s390x-gnu@4.32.0': + resolution: {integrity: sha512-8ZGN7ExnV0qjXa155Rsfi6H8M4iBBwNLBM9lcVS+4NcSzOFaNqmt7djlox8pN1lWrRPMRRQ8NeDlozIGx3Omsw==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.28.0': - resolution: {integrity: sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==} + '@rollup/rollup-linux-x64-gnu@4.32.0': + resolution: {integrity: sha512-VDzNHtLLI5s7xd/VubyS10mq6TxvZBp+4NRWoW+Hi3tgV05RtVm4qK99+dClwTN1McA6PHwob6DEJ6PlXbY83A==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.28.0': - resolution: {integrity: sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==} + '@rollup/rollup-linux-x64-musl@4.32.0': + resolution: {integrity: sha512-qcb9qYDlkxz9DxJo7SDhWxTWV1gFuwznjbTiov289pASxlfGbaOD54mgbs9+z94VwrXtKTu+2RqwlSTbiOqxGg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.28.0': - resolution: {integrity: sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==} + '@rollup/rollup-win32-arm64-msvc@4.32.0': + resolution: {integrity: sha512-pFDdotFDMXW2AXVbfdUEfidPAk/OtwE/Hd4eYMTNVVaCQ6Yl8et0meDaKNL63L44Haxv4UExpv9ydSf3aSayDg==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.28.0': - resolution: {integrity: sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A==} + '@rollup/rollup-win32-ia32-msvc@4.32.0': + resolution: {integrity: sha512-/TG7WfrCAjeRNDvI4+0AAMoHxea/USWhAzf9PVDFHbcqrQ7hMMKp4jZIy4VEjk72AAfN5k4TiSMRXRKf/0akSw==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.28.0': - resolution: {integrity: sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ==} + '@rollup/rollup-win32-x64-msvc@4.32.0': + resolution: {integrity: sha512-5hqO5S3PTEO2E5VjCePxv40gIgyS2KvO7E7/vvC/NbIW4SIRamkMr1hqj+5Y67fbBWv/bQLB6KelBQmXlyCjWA==} cpu: [x64] os: [win32] - '@scure/base@1.2.1': - resolution: {integrity: sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==} + '@scure/base@1.2.4': + resolution: {integrity: sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==} - '@scure/bip32@1.6.0': - resolution: {integrity: sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA==} + '@scure/bip32@1.6.2': + resolution: {integrity: sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==} - '@scure/bip39@1.5.0': - resolution: {integrity: sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A==} + '@scure/bip39@1.5.4': + resolution: {integrity: sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==} '@solana/buffer-layout@4.0.1': resolution: {integrity: sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==} @@ -688,8 +707,8 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@22.10.1': - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + '@types/node@22.10.10': + resolution: {integrity: sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==} '@types/node@22.7.4': resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} @@ -709,8 +728,8 @@ packages: '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} - '@types/ws@8.5.13': - resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} + '@types/ws@8.5.14': + resolution: {integrity: sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==} '@typescript-eslint/types@7.18.0': resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} @@ -729,43 +748,43 @@ packages: resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} - '@vitest/coverage-v8@2.1.8': - resolution: {integrity: sha512-2Y7BPlKH18mAZYAW1tYByudlCYrQyl5RGvnnDYJKW5tCiO5qg3KSAy3XAxcxKz900a0ZXxWtKrMuZLe3lKBpJw==} + '@vitest/coverage-v8@3.0.4': + resolution: {integrity: sha512-f0twgRCHgbs24Dp8cLWagzcObXMcuKtAwgxjJV/nnysPAJJk1JiKu/W0gIehZLmkljhJXU/E0/dmuQzsA/4jhA==} peerDependencies: - '@vitest/browser': 2.1.8 - vitest: 2.1.8 + '@vitest/browser': 3.0.4 + vitest: 3.0.4 peerDependenciesMeta: '@vitest/browser': optional: true - '@vitest/expect@2.1.8': - resolution: {integrity: sha512-8ytZ/fFHq2g4PJVAtDX57mayemKgDR6X3Oa2Foro+EygiOJHUXhCqBAAKQYYajZpFoIfvBCF1j6R6IYRSIUFuw==} + '@vitest/expect@3.0.4': + resolution: {integrity: sha512-Nm5kJmYw6P2BxhJPkO3eKKhGYKRsnqJqf+r0yOGRKpEP+bSCBDsjXgiu1/5QFrnPMEgzfC38ZEjvCFgaNBC0Eg==} - '@vitest/mocker@2.1.8': - resolution: {integrity: sha512-7guJ/47I6uqfttp33mgo6ga5Gr1VnL58rcqYKyShoRK9ebu8T5Rs6HN3s1NABiBeVTdWNrwUMcHH54uXZBN4zA==} + '@vitest/mocker@3.0.4': + resolution: {integrity: sha512-gEef35vKafJlfQbnyOXZ0Gcr9IBUsMTyTLXsEQwuyYAerpHqvXhzdBnDFuHLpFqth3F7b6BaFr4qV/Cs1ULx5A==} peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 + vite: ^5.0.0 || ^6.0.0 peerDependenciesMeta: msw: optional: true vite: optional: true - '@vitest/pretty-format@2.1.8': - resolution: {integrity: sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==} + '@vitest/pretty-format@3.0.4': + resolution: {integrity: sha512-ts0fba+dEhK2aC9PFuZ9LTpULHpY/nd6jhAQ5IMU7Gaj7crPCTdCFfgvXxruRBLFS+MLraicCuFXxISEq8C93g==} - '@vitest/runner@2.1.8': - resolution: {integrity: sha512-17ub8vQstRnRlIU5k50bG+QOMLHRhYPAna5tw8tYbj+jzjcspnwnwtPtiOlkuKC4+ixDPTuLZiqiWWQ2PSXHVg==} + '@vitest/runner@3.0.4': + resolution: {integrity: sha512-dKHzTQ7n9sExAcWH/0sh1elVgwc7OJ2lMOBrAm73J7AH6Pf9T12Zh3lNE1TETZaqrWFXtLlx3NVrLRb5hCK+iw==} - '@vitest/snapshot@2.1.8': - resolution: {integrity: sha512-20T7xRFbmnkfcmgVEz+z3AU/3b0cEzZOt/zmnvZEctg64/QZbSDJEVm9fLnnlSi74KibmRsO9/Qabi+t0vCRPg==} + '@vitest/snapshot@3.0.4': + resolution: {integrity: sha512-+p5knMLwIk7lTQkM3NonZ9zBewzVp9EVkVpvNta0/PlFWpiqLaRcF4+33L1it3uRUCh0BGLOaXPPGEjNKfWb4w==} - '@vitest/spy@2.1.8': - resolution: {integrity: sha512-5swjf2q95gXeYPevtW0BLk6H8+bPlMb4Vw/9Em4hFxDcaOxS+e0LOX4yqNxoHzMR2akEB2xfpnWUzkZokmgWDg==} + '@vitest/spy@3.0.4': + resolution: {integrity: sha512-sXIMF0oauYyUy2hN49VFTYodzEAu744MmGcPR3ZBsPM20G+1/cSW/n1U+3Yu/zHxX2bIDe1oJASOkml+osTU6Q==} - '@vitest/utils@2.1.8': - resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} + '@vitest/utils@3.0.4': + resolution: {integrity: sha512-8BqC1ksYsHtbWH+DfpOAKrFw3jl3Uf9J7yeFh85Pz52IWuh1hBBtyfEbRNNZNjl8H8A5yMLH9/t+k7HIKzQcZQ==} '@vue/compiler-core@3.5.11': resolution: {integrity: sha512-PwAdxs7/9Hc3ieBO12tXzmTD+Ln4qhT/56S+8DvrrZ4kLDn4Z/AMUr8tXJD0axiJBS0RKIoNaR0yMuQB9v9Udg==} @@ -794,8 +813,8 @@ packages: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true - abitype@1.0.7: - resolution: {integrity: sha512-ZfYYSktDQUwc2eduYu8C4wOs+RDPmnRYMh7zNfzeMtGGgb0U+6tLGjixUic6mXf5xKKCcgT5Qp6cv39tOARVFw==} + abitype@1.0.8: + resolution: {integrity: sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==} peerDependencies: typescript: '>=5.0.4' zod: ^3 >=3.22.0 @@ -1049,6 +1068,10 @@ packages: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} + commander@13.1.0: + resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==} + engines: {node: '>=18'} + commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -1338,8 +1361,8 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - es-module-lexer@1.5.4: - resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + es-module-lexer@1.6.0: + resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==} es6-promise@4.2.8: resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} @@ -1347,9 +1370,9 @@ packages: es6-promisify@5.0.0: resolution: {integrity: sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==} - esbuild@0.21.5: - resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} - engines: {node: '>=12'} + esbuild@0.24.2: + resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + engines: {node: '>=18'} hasBin: true escalade@3.2.0: @@ -1462,8 +1485,8 @@ packages: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} - fs-extra@11.2.0: - resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + fs-extra@11.3.0: + resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} engines: {node: '>=14.14'} fs.realpath@1.0.0: @@ -1796,8 +1819,8 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lint-staged@15.3.0: - resolution: {integrity: sha512-vHFahytLoF2enJklgtOtCtIjZrKD/LoxlaUusd5nh7dWv/dkKQJY74ndFSzxCdv7g0ueGg1ORgTSt4Y9LPZn9A==} + lint-staged@15.4.3: + resolution: {integrity: sha512-FoH1vOeouNh1pw+90S+cnuoFwRfUD9ijY2GKy5h7HS3OR7JVir2N2xrsa0+Twc1B7cW72L+88geG5cW4wIhn7g==} engines: {node: '>=18.12.0'} hasBin: true @@ -1890,8 +1913,8 @@ packages: typescript: optional: true - magic-string@0.30.14: - resolution: {integrity: sha512-5c99P1WKTed11ZC0HMJOj6CDIue6F8ySu+bJL+85q1zBEIY8IklrJ1eiKC2NDRh3Ct3FcvmJPyQHb9erXMTJNw==} + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} magicast@0.3.5: resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} @@ -2058,8 +2081,8 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} - ox@0.6.0: - resolution: {integrity: sha512-blUzTLidvUlshv0O02CnLFqBLidNzPoAZdIth894avUAotTuWziznv6IENv5idRuOSSP3dH8WzcYw84zVdu0Aw==} + ox@0.6.7: + resolution: {integrity: sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==} peerDependencies: typescript: '>=5.4.0' peerDependenciesMeta: @@ -2171,8 +2194,8 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - pathe@1.1.2: - resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathe@2.0.2: + resolution: {integrity: sha512-15Ztpk+nov8DR524R4BF7uEuzESgzUEAV4Ah7CUMNGXdE5ELuvxElxGXndBl32vMSsWa1jpNf22Z+Er3sKwq+w==} pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} @@ -2220,8 +2243,8 @@ packages: resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} - postcss@8.4.49: - resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} + postcss@8.5.1: + resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} engines: {node: ^10 || ^12 || >=14} precinct@12.1.2: @@ -2349,8 +2372,8 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rollup@4.28.0: - resolution: {integrity: sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ==} + rollup@4.32.0: + resolution: {integrity: sha512-JmrhfQR31Q4AuNBjjAX4s+a/Pu/Q8Q9iwjWBsjRH1q52SPFE2NqRMK6fUZKKnvKO6id+h7JIRf0oYsph53eATg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -2574,12 +2597,15 @@ packages: tinyexec@0.3.1: resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + tinypool@1.0.2: resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} engines: {node: ^18.0.0 || >=20.0.0} - tinyrainbow@1.2.0: - resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} + tinyrainbow@2.0.0: + resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} engines: {node: '>=14.0.0'} tinyspy@3.0.2: @@ -2722,35 +2748,40 @@ packages: varuint-bitcoin@2.0.0: resolution: {integrity: sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==} - viem@2.22.8: - resolution: {integrity: sha512-iB3PW/a/qzpYbpjo3R662u6a/zo6piZHez/N/bOC25C79FYXBCs8mQDqwiHk3FYErUhS4KVZLabKV9zGMd+EgQ==} + viem@2.22.15: + resolution: {integrity: sha512-7m5T/Emaj/C59jsRxYfZvMvckRRC4+rV+MVufKelxPS5DMhVR4z3Bk6CG8z+eQkpLVearqKBiPvvreLI0AesgA==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: typescript: optional: true - vite-node@2.1.8: - resolution: {integrity: sha512-uPAwSr57kYjAUux+8E2j0q0Fxpn8M9VoyfGiRI8Kfktz9NcYMCenwY5RnZxnF1WTu3TGiYipirIzacLL3VVGFg==} - engines: {node: ^18.0.0 || >=20.0.0} + vite-node@3.0.4: + resolution: {integrity: sha512-7JZKEzcYV2Nx3u6rlvN8qdo3QV7Fxyt6hx+CCKz9fbWxdX5IvUOmTWEAxMrWxaiSf7CKGLJQ5rFu8prb/jBjOA==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite@5.4.11: - resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==} - engines: {node: ^18.0.0 || >=20.0.0} + vite@6.0.11: + resolution: {integrity: sha512-4VL9mQPKoHy4+FE0NnRE/kbY51TOfaknxAjt3fJbGJxhIpBZiqVzlZDEesWWsuREXHwNdAoOFZ9MkPEVXczHwg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' less: '*' lightningcss: ^1.21.0 sass: '*' sass-embedded: '*' stylus: '*' sugarss: '*' - terser: ^5.4.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 peerDependenciesMeta: '@types/node': optional: true + jiti: + optional: true less: optional: true lightningcss: @@ -2765,21 +2796,28 @@ packages: optional: true terser: optional: true + tsx: + optional: true + yaml: + optional: true - vitest@2.1.8: - resolution: {integrity: sha512-1vBKTZskHw/aosXqQUlVWWlGUxSJR8YtiyZDJAFeW2kPAeX6S3Sool0mjspO+kXLuxVWlEDDowBAeqeAQefqLQ==} - engines: {node: ^18.0.0 || >=20.0.0} + vitest@3.0.4: + resolution: {integrity: sha512-6XG8oTKy2gnJIFTHP6LD7ExFeNLxiTkK3CfMvT7IfR8IN+BYICCf0lXUQmX7i7JoxUP8QmeP4mTnWXgflu4yjw==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' - '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.1.8 - '@vitest/ui': 2.1.8 + '@types/debug': ^4.1.12 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@vitest/browser': 3.0.4 + '@vitest/ui': 3.0.4 happy-dom: '*' jsdom: '*' peerDependenciesMeta: '@edge-runtime/vm': optional: true + '@types/debug': + optional: true '@types/node': optional: true '@vitest/browser': @@ -2798,9 +2836,6 @@ packages: wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} - webauthn-p256@0.0.10: - resolution: {integrity: sha512-EeYD+gmIT80YkSIDb2iWq0lq2zbHo1CxHlQTeJ+KkCILWpVy3zASH3ByD4bopzfk0uCwXxLqKGLqp2W4O28VFA==} - webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -2874,8 +2909,8 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml@2.6.1: - resolution: {integrity: sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==} + yaml@2.7.0: + resolution: {integrity: sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==} engines: {node: '>= 14'} hasBin: true @@ -2917,7 +2952,7 @@ snapshots: '@ampproject/remapping@2.3.0': dependencies: - '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 '@babel/code-frame@7.25.7': @@ -2942,6 +2977,10 @@ snapshots: dependencies: '@babel/types': 7.26.3 + '@babel/parser@7.26.7': + dependencies: + '@babel/types': 7.26.7 + '@babel/runtime@7.26.0': dependencies: regenerator-runtime: 0.14.1 @@ -2951,7 +2990,12 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 - '@bcoe/v8-coverage@0.2.3': {} + '@babel/types@7.26.7': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + + '@bcoe/v8-coverage@1.0.2': {} '@bigmi/core@0.1.0(bs58@6.0.0)(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10)': dependencies: @@ -2959,7 +3003,7 @@ snapshots: bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.3) bs58: 6.0.0 - viem: 2.22.8(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.15(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript @@ -3014,11 +3058,11 @@ snapshots: '@types/tough-cookie': 4.0.5 tough-cookie: 4.1.4 - '@commitlint/cli@19.6.1(@types/node@22.10.1)(typescript@5.7.3)': + '@commitlint/cli@19.6.1(@types/node@22.10.10)(typescript@5.7.3)': dependencies: '@commitlint/format': 19.5.0 '@commitlint/lint': 19.6.0 - '@commitlint/load': 19.6.1(@types/node@22.10.1)(typescript@5.7.3) + '@commitlint/load': 19.6.1(@types/node@22.10.10)(typescript@5.7.3) '@commitlint/read': 19.5.0 '@commitlint/types': 19.5.0 tinyexec: 0.3.1 @@ -3065,7 +3109,7 @@ snapshots: '@commitlint/rules': 19.6.0 '@commitlint/types': 19.5.0 - '@commitlint/load@19.6.1(@types/node@22.10.1)(typescript@5.7.3)': + '@commitlint/load@19.6.1(@types/node@22.10.10)(typescript@5.7.3)': dependencies: '@commitlint/config-validator': 19.5.0 '@commitlint/execute-rule': 19.5.0 @@ -3073,7 +3117,7 @@ snapshots: '@commitlint/types': 19.5.0 chalk: 5.4.0 cosmiconfig: 9.0.0(typescript@5.7.3) - cosmiconfig-typescript-loader: 6.1.0(@types/node@22.10.1)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3) + cosmiconfig-typescript-loader: 6.1.0(@types/node@22.10.10)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -3133,87 +3177,93 @@ snapshots: gonzales-pe: 4.3.0 node-source-walk: 7.0.0 - '@esbuild/aix-ppc64@0.21.5': + '@esbuild/aix-ppc64@0.24.2': + optional: true + + '@esbuild/android-arm64@0.24.2': + optional: true + + '@esbuild/android-arm@0.24.2': optional: true - '@esbuild/android-arm64@0.21.5': + '@esbuild/android-x64@0.24.2': optional: true - '@esbuild/android-arm@0.21.5': + '@esbuild/darwin-arm64@0.24.2': optional: true - '@esbuild/android-x64@0.21.5': + '@esbuild/darwin-x64@0.24.2': optional: true - '@esbuild/darwin-arm64@0.21.5': + '@esbuild/freebsd-arm64@0.24.2': optional: true - '@esbuild/darwin-x64@0.21.5': + '@esbuild/freebsd-x64@0.24.2': optional: true - '@esbuild/freebsd-arm64@0.21.5': + '@esbuild/linux-arm64@0.24.2': optional: true - '@esbuild/freebsd-x64@0.21.5': + '@esbuild/linux-arm@0.24.2': optional: true - '@esbuild/linux-arm64@0.21.5': + '@esbuild/linux-ia32@0.24.2': optional: true - '@esbuild/linux-arm@0.21.5': + '@esbuild/linux-loong64@0.24.2': optional: true - '@esbuild/linux-ia32@0.21.5': + '@esbuild/linux-mips64el@0.24.2': optional: true - '@esbuild/linux-loong64@0.21.5': + '@esbuild/linux-ppc64@0.24.2': optional: true - '@esbuild/linux-mips64el@0.21.5': + '@esbuild/linux-riscv64@0.24.2': optional: true - '@esbuild/linux-ppc64@0.21.5': + '@esbuild/linux-s390x@0.24.2': optional: true - '@esbuild/linux-riscv64@0.21.5': + '@esbuild/linux-x64@0.24.2': optional: true - '@esbuild/linux-s390x@0.21.5': + '@esbuild/netbsd-arm64@0.24.2': optional: true - '@esbuild/linux-x64@0.21.5': + '@esbuild/netbsd-x64@0.24.2': optional: true - '@esbuild/netbsd-x64@0.21.5': + '@esbuild/openbsd-arm64@0.24.2': optional: true - '@esbuild/openbsd-x64@0.21.5': + '@esbuild/openbsd-x64@0.24.2': optional: true - '@esbuild/sunos-x64@0.21.5': + '@esbuild/sunos-x64@0.24.2': optional: true - '@esbuild/win32-arm64@0.21.5': + '@esbuild/win32-arm64@0.24.2': optional: true - '@esbuild/win32-ia32@0.21.5': + '@esbuild/win32-ia32@0.24.2': optional: true - '@esbuild/win32-x64@0.21.5': + '@esbuild/win32-x64@0.24.2': optional: true '@hutson/parse-repository-url@3.0.2': {} - '@inquirer/confirm@5.1.0(@types/node@22.10.1)': + '@inquirer/confirm@5.1.0(@types/node@22.10.10)': dependencies: - '@inquirer/core': 10.1.1(@types/node@22.10.1) - '@inquirer/type': 3.0.1(@types/node@22.10.1) - '@types/node': 22.10.1 + '@inquirer/core': 10.1.1(@types/node@22.10.10) + '@inquirer/type': 3.0.1(@types/node@22.10.10) + '@types/node': 22.10.10 - '@inquirer/core@10.1.1(@types/node@22.10.1)': + '@inquirer/core@10.1.1(@types/node@22.10.10)': dependencies: '@inquirer/figures': 1.0.8 - '@inquirer/type': 3.0.1(@types/node@22.10.1) + '@inquirer/type': 3.0.1(@types/node@22.10.10) ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -3226,9 +3276,9 @@ snapshots: '@inquirer/figures@1.0.8': {} - '@inquirer/type@3.0.1(@types/node@22.10.1)': + '@inquirer/type@3.0.1(@types/node@22.10.10)': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.10 '@isaacs/cliui@8.0.2': dependencies: @@ -3241,7 +3291,7 @@ snapshots: '@istanbuljs/schema@0.1.3': {} - '@jridgewell/gen-mapping@0.3.5': + '@jridgewell/gen-mapping@0.3.8': dependencies: '@jridgewell/set-array': 1.2.1 '@jridgewell/sourcemap-codec': 1.5.0 @@ -3263,7 +3313,7 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@lifi/types@16.5.0': {} + '@lifi/types@16.6.0': {} '@mswjs/interceptors@0.37.3': dependencies: @@ -3274,19 +3324,13 @@ snapshots: outvariant: 1.4.3 strict-event-emitter: 0.5.1 - '@noble/curves@1.7.0': + '@noble/curves@1.8.1': dependencies: - '@noble/hashes': 1.6.0 - - '@noble/curves@1.8.0': - dependencies: - '@noble/hashes': 1.7.0 - - '@noble/hashes@1.6.0': {} + '@noble/hashes': 1.7.1 '@noble/hashes@1.6.1': {} - '@noble/hashes@1.7.0': {} + '@noble/hashes@1.7.1': {} '@nodelib/fs.scandir@2.1.5': dependencies: @@ -3312,72 +3356,75 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@rollup/rollup-android-arm-eabi@4.28.0': + '@rollup/rollup-android-arm-eabi@4.32.0': + optional: true + + '@rollup/rollup-android-arm64@4.32.0': optional: true - '@rollup/rollup-android-arm64@4.28.0': + '@rollup/rollup-darwin-arm64@4.32.0': optional: true - '@rollup/rollup-darwin-arm64@4.28.0': + '@rollup/rollup-darwin-x64@4.32.0': optional: true - '@rollup/rollup-darwin-x64@4.28.0': + '@rollup/rollup-freebsd-arm64@4.32.0': optional: true - '@rollup/rollup-freebsd-arm64@4.28.0': + '@rollup/rollup-freebsd-x64@4.32.0': optional: true - '@rollup/rollup-freebsd-x64@4.28.0': + '@rollup/rollup-linux-arm-gnueabihf@4.32.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.28.0': + '@rollup/rollup-linux-arm-musleabihf@4.32.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.28.0': + '@rollup/rollup-linux-arm64-gnu@4.32.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.28.0': + '@rollup/rollup-linux-arm64-musl@4.32.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.28.0': + '@rollup/rollup-linux-loongarch64-gnu@4.32.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.28.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.32.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.28.0': + '@rollup/rollup-linux-riscv64-gnu@4.32.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.28.0': + '@rollup/rollup-linux-s390x-gnu@4.32.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.28.0': + '@rollup/rollup-linux-x64-gnu@4.32.0': optional: true - '@rollup/rollup-linux-x64-musl@4.28.0': + '@rollup/rollup-linux-x64-musl@4.32.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.28.0': + '@rollup/rollup-win32-arm64-msvc@4.32.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.28.0': + '@rollup/rollup-win32-ia32-msvc@4.32.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.28.0': + '@rollup/rollup-win32-x64-msvc@4.32.0': optional: true - '@scure/base@1.2.1': {} + '@scure/base@1.2.4': {} - '@scure/bip32@1.6.0': + '@scure/bip32@1.6.2': dependencies: - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 - '@scure/base': 1.2.1 + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 - '@scure/bip39@1.5.0': + '@scure/bip39@1.5.4': dependencies: - '@noble/hashes': 1.6.1 - '@scure/base': 1.2.1 + '@noble/hashes': 1.7.1 + '@scure/base': 1.2.4 '@solana/buffer-layout@4.0.1': dependencies: @@ -3399,7 +3446,7 @@ snapshots: '@solana/web3.js@1.98.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 - '@noble/curves': 1.8.0 + '@noble/curves': 1.8.1 '@noble/hashes': 1.6.1 '@solana/buffer-layout': 4.0.1 agentkeepalive: 4.5.0 @@ -3451,7 +3498,7 @@ snapshots: '@types/conventional-commits-parser@5.0.1': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.10 '@types/cookie@0.6.0': {} @@ -3470,7 +3517,7 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@22.10.1': + '@types/node@22.10.10': dependencies: undici-types: 6.20.0 @@ -3490,9 +3537,9 @@ snapshots: dependencies: '@types/node': 12.20.55 - '@types/ws@8.5.13': + '@types/ws@8.5.14': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.10 '@typescript-eslint/types@7.18.0': {} @@ -3500,7 +3547,7 @@ snapshots: dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.4.0 + debug: 4.3.7 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.5 @@ -3516,64 +3563,64 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 - '@vitest/coverage-v8@2.1.8(vitest@2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3)))': + '@vitest/coverage-v8@3.0.4(vitest@3.0.4(@types/node@22.10.10)(jiti@2.4.2)(msw@2.7.0(@types/node@22.10.10)(typescript@5.7.3))(yaml@2.7.0))': dependencies: '@ampproject/remapping': 2.3.0 - '@bcoe/v8-coverage': 0.2.3 - debug: 4.3.7 + '@bcoe/v8-coverage': 1.0.2 + debug: 4.4.0 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 istanbul-reports: 3.1.7 - magic-string: 0.30.14 + magic-string: 0.30.17 magicast: 0.3.5 std-env: 3.8.0 test-exclude: 7.0.1 - tinyrainbow: 1.2.0 - vitest: 2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3)) + tinyrainbow: 2.0.0 + vitest: 3.0.4(@types/node@22.10.10)(jiti@2.4.2)(msw@2.7.0(@types/node@22.10.10)(typescript@5.7.3))(yaml@2.7.0) transitivePeerDependencies: - supports-color - '@vitest/expect@2.1.8': + '@vitest/expect@3.0.4': dependencies: - '@vitest/spy': 2.1.8 - '@vitest/utils': 2.1.8 + '@vitest/spy': 3.0.4 + '@vitest/utils': 3.0.4 chai: 5.1.2 - tinyrainbow: 1.2.0 + tinyrainbow: 2.0.0 - '@vitest/mocker@2.1.8(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3))(vite@5.4.11(@types/node@22.10.1))': + '@vitest/mocker@3.0.4(msw@2.7.0(@types/node@22.10.10)(typescript@5.7.3))(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(yaml@2.7.0))': dependencies: - '@vitest/spy': 2.1.8 + '@vitest/spy': 3.0.4 estree-walker: 3.0.3 - magic-string: 0.30.14 + magic-string: 0.30.17 optionalDependencies: - msw: 2.7.0(@types/node@22.10.1)(typescript@5.7.3) - vite: 5.4.11(@types/node@22.10.1) + msw: 2.7.0(@types/node@22.10.10)(typescript@5.7.3) + vite: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(yaml@2.7.0) - '@vitest/pretty-format@2.1.8': + '@vitest/pretty-format@3.0.4': dependencies: - tinyrainbow: 1.2.0 + tinyrainbow: 2.0.0 - '@vitest/runner@2.1.8': + '@vitest/runner@3.0.4': dependencies: - '@vitest/utils': 2.1.8 - pathe: 1.1.2 + '@vitest/utils': 3.0.4 + pathe: 2.0.2 - '@vitest/snapshot@2.1.8': + '@vitest/snapshot@3.0.4': dependencies: - '@vitest/pretty-format': 2.1.8 - magic-string: 0.30.14 - pathe: 1.1.2 + '@vitest/pretty-format': 3.0.4 + magic-string: 0.30.17 + pathe: 2.0.2 - '@vitest/spy@2.1.8': + '@vitest/spy@3.0.4': dependencies: tinyspy: 3.0.2 - '@vitest/utils@2.1.8': + '@vitest/utils@3.0.4': dependencies: - '@vitest/pretty-format': 2.1.8 + '@vitest/pretty-format': 3.0.4 loupe: 3.1.2 - tinyrainbow: 1.2.0 + tinyrainbow: 2.0.0 '@vue/compiler-core@3.5.11': dependencies: @@ -3596,7 +3643,7 @@ snapshots: '@vue/compiler-ssr': 3.5.11 '@vue/shared': 3.5.11 estree-walker: 2.0.2 - magic-string: 0.30.14 + magic-string: 0.30.17 postcss: 8.4.47 source-map-js: 1.2.1 @@ -3618,7 +3665,7 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 - abitype@1.0.7(typescript@5.7.3): + abitype@1.0.8(typescript@5.7.3): optionalDependencies: typescript: 5.7.3 @@ -3861,6 +3908,8 @@ snapshots: commander@12.1.0: {} + commander@13.1.0: {} + commander@2.20.3: {} commander@7.2.0: {} @@ -4012,9 +4061,9 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@6.1.0(@types/node@22.10.1)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3): + cosmiconfig-typescript-loader@6.1.0(@types/node@22.10.10)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3): dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.10 cosmiconfig: 9.0.0(typescript@5.7.3) jiti: 2.4.2 typescript: 5.7.3 @@ -4173,7 +4222,7 @@ snapshots: dependencies: is-arrayish: 0.2.1 - es-module-lexer@1.5.4: {} + es-module-lexer@1.6.0: {} es6-promise@4.2.8: {} @@ -4181,31 +4230,33 @@ snapshots: dependencies: es6-promise: 4.2.8 - esbuild@0.21.5: + esbuild@0.24.2: optionalDependencies: - '@esbuild/aix-ppc64': 0.21.5 - '@esbuild/android-arm': 0.21.5 - '@esbuild/android-arm64': 0.21.5 - '@esbuild/android-x64': 0.21.5 - '@esbuild/darwin-arm64': 0.21.5 - '@esbuild/darwin-x64': 0.21.5 - '@esbuild/freebsd-arm64': 0.21.5 - '@esbuild/freebsd-x64': 0.21.5 - '@esbuild/linux-arm': 0.21.5 - '@esbuild/linux-arm64': 0.21.5 - '@esbuild/linux-ia32': 0.21.5 - '@esbuild/linux-loong64': 0.21.5 - '@esbuild/linux-mips64el': 0.21.5 - '@esbuild/linux-ppc64': 0.21.5 - '@esbuild/linux-riscv64': 0.21.5 - '@esbuild/linux-s390x': 0.21.5 - '@esbuild/linux-x64': 0.21.5 - '@esbuild/netbsd-x64': 0.21.5 - '@esbuild/openbsd-x64': 0.21.5 - '@esbuild/sunos-x64': 0.21.5 - '@esbuild/win32-arm64': 0.21.5 - '@esbuild/win32-ia32': 0.21.5 - '@esbuild/win32-x64': 0.21.5 + '@esbuild/aix-ppc64': 0.24.2 + '@esbuild/android-arm': 0.24.2 + '@esbuild/android-arm64': 0.24.2 + '@esbuild/android-x64': 0.24.2 + '@esbuild/darwin-arm64': 0.24.2 + '@esbuild/darwin-x64': 0.24.2 + '@esbuild/freebsd-arm64': 0.24.2 + '@esbuild/freebsd-x64': 0.24.2 + '@esbuild/linux-arm': 0.24.2 + '@esbuild/linux-arm64': 0.24.2 + '@esbuild/linux-ia32': 0.24.2 + '@esbuild/linux-loong64': 0.24.2 + '@esbuild/linux-mips64el': 0.24.2 + '@esbuild/linux-ppc64': 0.24.2 + '@esbuild/linux-riscv64': 0.24.2 + '@esbuild/linux-s390x': 0.24.2 + '@esbuild/linux-x64': 0.24.2 + '@esbuild/netbsd-arm64': 0.24.2 + '@esbuild/netbsd-x64': 0.24.2 + '@esbuild/openbsd-arm64': 0.24.2 + '@esbuild/openbsd-x64': 0.24.2 + '@esbuild/sunos-x64': 0.24.2 + '@esbuild/win32-arm64': 0.24.2 + '@esbuild/win32-ia32': 0.24.2 + '@esbuild/win32-x64': 0.24.2 escalade@3.2.0: {} @@ -4324,7 +4375,7 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - fs-extra@11.2.0: + fs-extra@11.3.0: dependencies: graceful-fs: 4.2.11 jsonfile: 6.1.0 @@ -4562,7 +4613,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.3.7 + debug: 4.4.0 istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -4628,10 +4679,10 @@ snapshots: lines-and-columns@1.2.4: {} - lint-staged@15.3.0: + lint-staged@15.4.3: dependencies: chalk: 5.4.1 - commander: 12.1.0 + commander: 13.1.0 debug: 4.4.0 execa: 8.0.1 lilconfig: 3.1.3 @@ -4639,7 +4690,7 @@ snapshots: micromatch: 4.0.8 pidtree: 0.6.0 string-argv: 0.3.2 - yaml: 2.6.1 + yaml: 2.7.0 transitivePeerDependencies: - supports-color @@ -4743,14 +4794,14 @@ snapshots: transitivePeerDependencies: - supports-color - magic-string@0.30.14: + magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 magicast@0.3.5: dependencies: - '@babel/parser': 7.26.3 - '@babel/types': 7.26.3 + '@babel/parser': 7.26.7 + '@babel/types': 7.26.7 source-map-js: 1.2.1 make-dir@4.0.0: @@ -4830,12 +4881,12 @@ snapshots: ms@2.1.3: {} - msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3): + msw@2.7.0(@types/node@22.10.10)(typescript@5.7.3): dependencies: '@bundled-es-modules/cookie': 2.0.1 '@bundled-es-modules/statuses': 1.0.1 '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.0(@types/node@22.10.1) + '@inquirer/confirm': 5.1.0(@types/node@22.10.10) '@mswjs/interceptors': 0.37.3 '@open-draft/deferred-promise': 2.2.0 '@open-draft/until': 2.1.0 @@ -4922,14 +4973,14 @@ snapshots: outvariant@1.4.3: {} - ox@0.6.0(typescript@5.7.3): + ox@0.6.7(typescript@5.7.3): dependencies: '@adraffy/ens-normalize': 1.11.0 - '@noble/curves': 1.8.0 - '@noble/hashes': 1.6.1 - '@scure/bip32': 1.6.0 - '@scure/bip39': 1.5.0 - abitype: 1.0.7(typescript@5.7.3) + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3) eventemitter3: 5.0.1 optionalDependencies: typescript: 5.7.3 @@ -5023,7 +5074,7 @@ snapshots: path-type@4.0.0: {} - pathe@1.1.2: {} + pathe@2.0.2: {} pathval@2.0.0: {} @@ -5056,7 +5107,7 @@ snapshots: picocolors: 1.1.0 source-map-js: 1.2.1 - postcss@8.4.49: + postcss@8.5.1: dependencies: nanoid: 3.3.8 picocolors: 1.1.1 @@ -5197,35 +5248,36 @@ snapshots: rfdc@1.4.1: {} - rollup@4.28.0: + rollup@4.32.0: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.28.0 - '@rollup/rollup-android-arm64': 4.28.0 - '@rollup/rollup-darwin-arm64': 4.28.0 - '@rollup/rollup-darwin-x64': 4.28.0 - '@rollup/rollup-freebsd-arm64': 4.28.0 - '@rollup/rollup-freebsd-x64': 4.28.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.28.0 - '@rollup/rollup-linux-arm-musleabihf': 4.28.0 - '@rollup/rollup-linux-arm64-gnu': 4.28.0 - '@rollup/rollup-linux-arm64-musl': 4.28.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.28.0 - '@rollup/rollup-linux-riscv64-gnu': 4.28.0 - '@rollup/rollup-linux-s390x-gnu': 4.28.0 - '@rollup/rollup-linux-x64-gnu': 4.28.0 - '@rollup/rollup-linux-x64-musl': 4.28.0 - '@rollup/rollup-win32-arm64-msvc': 4.28.0 - '@rollup/rollup-win32-ia32-msvc': 4.28.0 - '@rollup/rollup-win32-x64-msvc': 4.28.0 + '@rollup/rollup-android-arm-eabi': 4.32.0 + '@rollup/rollup-android-arm64': 4.32.0 + '@rollup/rollup-darwin-arm64': 4.32.0 + '@rollup/rollup-darwin-x64': 4.32.0 + '@rollup/rollup-freebsd-arm64': 4.32.0 + '@rollup/rollup-freebsd-x64': 4.32.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.32.0 + '@rollup/rollup-linux-arm-musleabihf': 4.32.0 + '@rollup/rollup-linux-arm64-gnu': 4.32.0 + '@rollup/rollup-linux-arm64-musl': 4.32.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.32.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.32.0 + '@rollup/rollup-linux-riscv64-gnu': 4.32.0 + '@rollup/rollup-linux-s390x-gnu': 4.32.0 + '@rollup/rollup-linux-x64-gnu': 4.32.0 + '@rollup/rollup-linux-x64-musl': 4.32.0 + '@rollup/rollup-win32-arm64-msvc': 4.32.0 + '@rollup/rollup-win32-ia32-msvc': 4.32.0 + '@rollup/rollup-win32-x64-msvc': 4.32.0 fsevents: 2.3.3 rpc-websockets@9.0.4: dependencies: '@swc/helpers': 0.5.15 '@types/uuid': 8.3.4 - '@types/ws': 8.5.13 + '@types/ws': 8.5.14 buffer: 6.0.3 eventemitter3: 5.0.1 uuid: 8.3.2 @@ -5432,9 +5484,11 @@ snapshots: tinyexec@0.3.1: {} + tinyexec@0.3.2: {} + tinypool@1.0.2: {} - tinyrainbow@1.2.0: {} + tinyrainbow@2.0.0: {} tinyspy@3.0.2: {} @@ -5464,14 +5518,14 @@ snapshots: '@ts-graphviz/common': 2.1.4 '@ts-graphviz/core': 2.0.5 - ts-node@10.9.2(@types/node@22.10.1)(typescript@5.7.3): + ts-node@10.9.2(@types/node@22.10.10)(typescript@5.7.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.10.1 + '@types/node': 22.10.10 acorn: 8.12.1 acorn-walk: 8.3.4 arg: 4.1.3 @@ -5550,16 +5604,15 @@ snapshots: dependencies: uint8array-tools: 0.0.8 - viem@2.22.8(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10): + viem@2.22.15(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10): dependencies: - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 - '@scure/bip32': 1.6.0 - '@scure/bip39': 1.5.0 - abitype: 1.0.7(typescript@5.7.3) + '@noble/curves': 1.8.1 + '@noble/hashes': 1.7.1 + '@scure/bip32': 1.6.2 + '@scure/bip39': 1.5.4 + abitype: 1.0.8(typescript@5.7.3) isows: 1.0.6(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ox: 0.6.0(typescript@5.7.3) - webauthn-p256: 0.0.10 + ox: 0.6.7(typescript@5.7.3) ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.7.3 @@ -5568,15 +5621,16 @@ snapshots: - utf-8-validate - zod - vite-node@2.1.8(@types/node@22.10.1): + vite-node@3.0.4(@types/node@22.10.10)(jiti@2.4.2)(yaml@2.7.0): dependencies: cac: 6.7.14 - debug: 4.3.7 - es-module-lexer: 1.5.4 - pathe: 1.1.2 - vite: 5.4.11(@types/node@22.10.1) + debug: 4.4.0 + es-module-lexer: 1.6.0 + pathe: 2.0.2 + vite: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(yaml@2.7.0) transitivePeerDependencies: - '@types/node' + - jiti - less - lightningcss - sass @@ -5585,41 +5639,46 @@ snapshots: - sugarss - supports-color - terser + - tsx + - yaml - vite@5.4.11(@types/node@22.10.1): + vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(yaml@2.7.0): dependencies: - esbuild: 0.21.5 - postcss: 8.4.49 - rollup: 4.28.0 + esbuild: 0.24.2 + postcss: 8.5.1 + rollup: 4.32.0 optionalDependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.10 fsevents: 2.3.3 + jiti: 2.4.2 + yaml: 2.7.0 - vitest@2.1.8(@types/node@22.10.1)(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3)): + vitest@3.0.4(@types/node@22.10.10)(jiti@2.4.2)(msw@2.7.0(@types/node@22.10.10)(typescript@5.7.3))(yaml@2.7.0): dependencies: - '@vitest/expect': 2.1.8 - '@vitest/mocker': 2.1.8(msw@2.7.0(@types/node@22.10.1)(typescript@5.7.3))(vite@5.4.11(@types/node@22.10.1)) - '@vitest/pretty-format': 2.1.8 - '@vitest/runner': 2.1.8 - '@vitest/snapshot': 2.1.8 - '@vitest/spy': 2.1.8 - '@vitest/utils': 2.1.8 + '@vitest/expect': 3.0.4 + '@vitest/mocker': 3.0.4(msw@2.7.0(@types/node@22.10.10)(typescript@5.7.3))(vite@6.0.11(@types/node@22.10.10)(jiti@2.4.2)(yaml@2.7.0)) + '@vitest/pretty-format': 3.0.4 + '@vitest/runner': 3.0.4 + '@vitest/snapshot': 3.0.4 + '@vitest/spy': 3.0.4 + '@vitest/utils': 3.0.4 chai: 5.1.2 - debug: 4.3.7 + debug: 4.4.0 expect-type: 1.1.0 - magic-string: 0.30.14 - pathe: 1.1.2 + magic-string: 0.30.17 + pathe: 2.0.2 std-env: 3.8.0 tinybench: 2.9.0 - tinyexec: 0.3.1 + tinyexec: 0.3.2 tinypool: 1.0.2 - tinyrainbow: 1.2.0 - vite: 5.4.11(@types/node@22.10.1) - vite-node: 2.1.8(@types/node@22.10.1) + tinyrainbow: 2.0.0 + vite: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(yaml@2.7.0) + vite-node: 3.0.4(@types/node@22.10.10)(jiti@2.4.2)(yaml@2.7.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.10 transitivePeerDependencies: + - jiti - less - lightningcss - msw @@ -5629,6 +5688,8 @@ snapshots: - sugarss - supports-color - terser + - tsx + - yaml walkdir@0.4.1: {} @@ -5636,11 +5697,6 @@ snapshots: dependencies: defaults: 1.0.4 - webauthn-p256@0.0.10: - dependencies: - '@noble/curves': 1.8.0 - '@noble/hashes': 1.6.1 - webidl-conversions@3.0.1: {} whatwg-url@5.0.0: @@ -5701,7 +5757,7 @@ snapshots: yallist@4.0.0: {} - yaml@2.6.1: {} + yaml@2.7.0: {} yargs-parser@20.2.9: {} diff --git a/src/core/EVM/getAllowance.int.spec.ts b/src/core/EVM/getAllowance.int.spec.ts index a4635744..81471a1f 100644 --- a/src/core/EVM/getAllowance.int.spec.ts +++ b/src/core/EVM/getAllowance.int.spec.ts @@ -28,24 +28,21 @@ const timeout = 10000 beforeAll(setupTestEnvironment) -describe('allowance integration tests', () => { - it( - 'should work for ERC20 on POL', - async () => { - const allowance = await getAllowance( - memeToken.chainId, - memeToken.address as Address, - defaultWalletAddress, - defaultSpenderAddress - ) - - expect(allowance).toBeGreaterThanOrEqual(defaultMemeAllowance) - }, - { retry: retryTimes, timeout } - ) +describe('allowance integration tests', { retry: retryTimes, timeout }, () => { + it('should work for ERC20 on POL', async () => { + const allowance = await getAllowance( + memeToken.chainId, + memeToken.address as Address, + defaultWalletAddress, + defaultSpenderAddress + ) + + expect(allowance).toBeGreaterThanOrEqual(defaultMemeAllowance) + }) it( 'should work for MATIC on POL', + { retry: retryTimes, timeout }, async () => { const token = findDefaultToken(CoinKey.MATIC, ChainId.POL) @@ -57,12 +54,12 @@ describe('allowance integration tests', () => { ) expect(allowance).toBe(0n) - }, - { retry: retryTimes, timeout } + } ) it( 'should return even with invalid data on POL', + { retry: retryTimes, timeout }, async () => { const invalidToken = findDefaultToken(CoinKey.MATIC, ChainId.POL) invalidToken.address = '0x2170ed0880ac9a755fd29b2688956bd959f933f8' @@ -74,12 +71,12 @@ describe('allowance integration tests', () => { defaultSpenderAddress ) expect(allowance).toBe(0n) - }, - { retry: retryTimes, timeout } + } ) it( 'should handle empty lists with multicall', + { retry: retryTimes, timeout }, async () => { const allowances = await getAllowanceMulticall( 137, @@ -87,12 +84,12 @@ describe('allowance integration tests', () => { defaultWalletAddress ) expect(allowances.length).toBe(0) - }, - { retry: retryTimes, timeout } + } ) it( 'should handle token lists with more than 10 tokens', + { retry: retryTimes, timeout }, async () => { const { tokens } = await getTokens({ chains: [ChainId.POL], @@ -123,7 +120,6 @@ describe('allowance integration tests', () => { expect(token?.allowance).toBeGreaterThanOrEqual(defaultMemeAllowance) } - }, - { retry: retryTimes, timeout } + } ) }) diff --git a/src/core/EVM/getEVMBalance.int.spec.ts b/src/core/EVM/getEVMBalance.int.spec.ts index b7fb31f2..78702e23 100644 --- a/src/core/EVM/getEVMBalance.int.spec.ts +++ b/src/core/EVM/getEVMBalance.int.spec.ts @@ -45,6 +45,7 @@ describe('getBalances integration tests', () => { it( 'should work for ERC20 on POL', + { retry: retryTimes, timeout }, async () => { const walletAddress = defaultWalletAddress const tokens = [ @@ -53,12 +54,12 @@ describe('getBalances integration tests', () => { ] await loadAndCompareTokenAmounts(walletAddress, tokens) - }, - { retry: retryTimes, timeout } + } ) it( 'should work for MATIC on POL', + { retry: retryTimes, timeout }, async () => { const walletAddress = defaultWalletAddress const tokens = [ @@ -67,12 +68,12 @@ describe('getBalances integration tests', () => { ] await loadAndCompareTokenAmounts(walletAddress, tokens) - }, - { retry: retryTimes, timeout } + } ) it( 'should return even with invalid data on POL', + { retry: retryTimes, timeout }, async () => { const walletAddress = defaultWalletAddress const invalidToken = findDefaultToken(CoinKey.MATIC, ChainId.POL) @@ -91,32 +92,28 @@ describe('getBalances integration tests', () => { ) expect(invalidBalance).toBeDefined() expect(invalidBalance!.amount).toBeUndefined() - }, - { retry: retryTimes, timeout } + } ) it( 'should fallback to a direct call if only one token is requested', + { retry: retryTimes, timeout }, async () => { const walletAddress = defaultWalletAddress const tokens = [findDefaultToken(CoinKey.DAI, ChainId.BSC)] await loadAndCompareTokenAmounts(walletAddress, tokens) - }, - { retry: retryTimes, timeout } + } ) - it( - 'should handle empty lists', - async () => { - const walletAddress = defaultWalletAddress - const tokens: Token[] = [] - await loadAndCompareTokenAmounts(walletAddress, tokens) - }, - { retry: retryTimes, timeout } - ) + it('should handle empty lists', { retry: retryTimes, timeout }, async () => { + const walletAddress = defaultWalletAddress + const tokens: Token[] = [] + await loadAndCompareTokenAmounts(walletAddress, tokens) + }) it( 'should handle token lists with more than 100 tokens', + { retry: retryTimes, timeout }, async () => { const walletAddress = defaultWalletAddress const { tokens } = await getTokens({ @@ -129,7 +126,6 @@ describe('getBalances integration tests', () => { tokens[ChainId.OPT].slice(0, 150) ) // chunk limit is 100 } - }, - { retry: retryTimes, timeout } + } ) }) diff --git a/src/core/EVM/switchChain.unit.spec.ts b/src/core/EVM/switchChain.unit.spec.ts index 98e6ce97..c8d1fa1f 100644 --- a/src/core/EVM/switchChain.unit.spec.ts +++ b/src/core/EVM/switchChain.unit.spec.ts @@ -3,6 +3,8 @@ import type { Client } from 'viem' import type { Mock } from 'vitest' import { beforeEach, describe, expect, it, vi } from 'vitest' import { buildStepObject } from '../../../tests/fixtures.js' +import { LiFiErrorCode } from '../../errors/constants.js' +import { ProviderError } from '../../errors/errors.js' import type { StatusManager } from '../StatusManager.js' import type { ExecutionOptions } from '../types.js' import { switchChain } from './switchChain.js' @@ -127,7 +129,12 @@ describe('switchChain', () => { true, hooks.switchChainHook ) - ).rejects.toThrowError(new Error('Chain switch required.')) + ).rejects.toThrowError( + new ProviderError( + LiFiErrorCode.ChainSwitchError, + 'Chain switch required.' + ) + ) expect(switchChainHookMock).toHaveBeenCalledWith( step.action.fromChainId diff --git a/src/core/Solana/getSolanaBalance.int.spec.ts b/src/core/Solana/getSolanaBalance.int.spec.ts index fc180748..fcde49e6 100644 --- a/src/core/Solana/getSolanaBalance.int.spec.ts +++ b/src/core/Solana/getSolanaBalance.int.spec.ts @@ -41,18 +41,15 @@ describe.sequential('Solana token balance', async () => { } } - it( - 'should handle empty lists', - async () => { - const walletAddress = defaultWalletAddress - const tokens: Token[] = [] - await loadAndCompareTokenAmounts(walletAddress, tokens) - }, - { retry: retryTimes, timeout } - ) + it('should handle empty lists', { retry: retryTimes, timeout }, async () => { + const walletAddress = defaultWalletAddress + const tokens: Token[] = [] + await loadAndCompareTokenAmounts(walletAddress, tokens) + }) it( 'should work for stables on SOL', + { retry: retryTimes, timeout }, async () => { const walletAddress = defaultWalletAddress const tokens = [ @@ -61,12 +58,12 @@ describe.sequential('Solana token balance', async () => { ] await loadAndCompareTokenAmounts(walletAddress, tokens) - }, - { retry: retryTimes, timeout } + } ) it( 'should return even with invalid data', + { retry: retryTimes, timeout }, async () => { const walletAddress = defaultWalletAddress const invalidToken = findDefaultToken(CoinKey.MATIC, ChainId.SOL) @@ -85,8 +82,7 @@ describe.sequential('Solana token balance', async () => { ) expect(invalidBalance).toBeDefined() expect(invalidBalance!.amount).toBeUndefined() - }, - { retry: retryTimes, timeout } + } ) // it( diff --git a/src/core/UTXO/getUTXOBalance.int.spec.ts b/src/core/UTXO/getUTXOBalance.int.spec.ts index 759b8f0c..a2ff13d9 100644 --- a/src/core/UTXO/getUTXOBalance.int.spec.ts +++ b/src/core/UTXO/getUTXOBalance.int.spec.ts @@ -40,6 +40,7 @@ describe('getBalances integration tests', () => { it( 'should work for ERC20 on POL', + { retry: retryTimes, timeout }, async () => { const walletAddress = defaultWalletAddress const tokens = [ @@ -48,8 +49,7 @@ describe('getBalances integration tests', () => { ] await loadAndCompareTokenAmounts(walletAddress, tokens) - }, - { retry: retryTimes, timeout } + } ) // it( diff --git a/src/services/api.int.spec.ts b/src/services/api.int.spec.ts index 7c37f0d1..ff3b56aa 100644 --- a/src/services/api.int.spec.ts +++ b/src/services/api.int.spec.ts @@ -2,20 +2,16 @@ import { describe, expect, it } from 'vitest' import { getQuote } from './api.js' describe('ApiService Integration Tests', () => { - it( - 'should successfully request a quote', - async () => { - const quote = await getQuote({ - fromChain: '1', - fromToken: '0x0000000000000000000000000000000000000000', - fromAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0', - fromAmount: '1000000000000000000', - toChain: '137', - toToken: '0x0000000000000000000000000000000000000000', - // allowBridges: ['hop', 'multichain'], - }) - expect(quote).toBeDefined() - }, - { timeout: 100000 } - ) + it('should successfully request a quote', async () => { + const quote = await getQuote({ + fromChain: '1', + fromToken: '0x0000000000000000000000000000000000000000', + fromAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0', + fromAmount: '1000000000000000000', + toChain: '137', + toToken: '0x0000000000000000000000000000000000000000', + // allowBridges: ['hop', 'multichain'], + }) + expect(quote).toBeDefined() + }, 100000) }) From d84aa9aa72f22eb182329a62032fe4679c981ff8 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Mon, 27 Jan 2025 12:24:31 +0100 Subject: [PATCH 23/26] chore(release): 3.6.0-beta.4 --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f6948a4d..c9d00156 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/sdk", - "version": "3.6.0-beta.3", + "version": "3.6.0-beta.4", "description": "LI.FI Any-to-Any Cross-Chain-Swap SDK", "keywords": [ "bridge", diff --git a/src/version.ts b/src/version.ts index ca79bfa9..dc71d38e 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ export const name = '@lifi/sdk' -export const version = '3.6.0-beta.3' +export const version = '3.6.0-beta.4' From bc086a3bff89b2b5d8fd1637f52bfd894250230b Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Wed, 5 Feb 2025 12:39:39 +0100 Subject: [PATCH 24/26] fix: add chain --- src/core/EVM/EVMStepExecutor.ts | 11 ++++--- src/core/EVM/utils.ts | 55 +++++++++++++++++++++++++++++++-- src/index.ts | 1 + 3 files changed, 61 insertions(+), 6 deletions(-) diff --git a/src/core/EVM/EVMStepExecutor.ts b/src/core/EVM/EVMStepExecutor.ts index 0f09c9ea..93046253 100644 --- a/src/core/EVM/EVMStepExecutor.ts +++ b/src/core/EVM/EVMStepExecutor.ts @@ -36,7 +36,7 @@ import { parseEVMErrors } from './parseEVMErrors.js' import { type PermitSignature, signPermitMessage } from './signPermitMessage.js' import { switchChain } from './switchChain.js' import { isRelayerStep } from './typeguards.js' -import { getMaxPriorityFeePerGas } from './utils.js' +import { convertExtendedChain, getMaxPriorityFeePerGas } from './utils.js' import { type WalletCallReceipt, waitForBatchTransactionReceipt, @@ -86,7 +86,9 @@ export class EVMStepExecutor extends BaseStepExecutor { )(undefined)) as GetAddressesReturnType accountAddress = accountAddresses?.[0] } - if (accountAddress?.toLowerCase() !== step.action.fromAddress?.toLowerCase()) { + if ( + accountAddress?.toLowerCase() !== step.action.fromAddress?.toLowerCase() + ) { let processToUpdate = process if (!processToUpdate) { // We need to create some process if we don't have one so we can show the error @@ -533,14 +535,15 @@ export class EVMStepExecutor extends BaseStepExecutor { sendTransaction, 'sendTransaction' )({ - to: transactionRequest.to, + to: transactionRequest.to as Address, account: this.client.account!, - data: transactionRequest.data, + data: transactionRequest.data as Hex, value: transactionRequest.value, gas: transactionRequest.gas, gasPrice: transactionRequest.gasPrice, maxFeePerGas: transactionRequest.maxFeePerGas, maxPriorityFeePerGas: transactionRequest.maxPriorityFeePerGas, + chain: convertExtendedChain(fromChain), } as SendTransactionParameters) } } diff --git a/src/core/EVM/utils.ts b/src/core/EVM/utils.ts index 17b3964d..7c0a52ad 100644 --- a/src/core/EVM/utils.ts +++ b/src/core/EVM/utils.ts @@ -1,9 +1,60 @@ -import type { ChainId } from '@lifi/types' -import type { Address, Client, Transaction } from 'viem' +import type { ChainId, ExtendedChain } from '@lifi/types' +import type { Address, Chain, Client, Transaction } from 'viem' import { getBlock } from 'viem/actions' import { config } from '../../config.js' import { median } from '../../utils/median.js' +type ChainBlockExplorer = { + name: string + url: string +} + +type ChainBlockExplorers = { + [key: string]: ChainBlockExplorer + default: ChainBlockExplorer +} + +export const convertExtendedChain = (chain: ExtendedChain): Chain => ({ + ...chain, + ...chain.metamask, + blockExplorers: chain.metamask.blockExplorerUrls.reduce( + (blockExplorers, blockExplorer, index) => { + blockExplorers[index === 0 ? 'default' : `${index}`] = { + name: blockExplorer, + url: blockExplorer, + } + return blockExplorers + }, + {} as ChainBlockExplorers + ), + name: chain.metamask.chainName, + rpcUrls: { + default: { http: chain.metamask.rpcUrls }, + public: { http: chain.metamask.rpcUrls }, + }, + contracts: { + ...(chain.multicallAddress + ? { multicall3: { address: chain.multicallAddress as Address } } + : undefined), + }, +}) + +export function isExtendedChain(chain: any): chain is ExtendedChain { + return ( + typeof chain === 'object' && + chain !== null && + 'key' in chain && + 'chainType' in chain && + 'coin' in chain && + 'mainnet' in chain && + 'logoURI' in chain && + typeof chain.metamask === 'object' && + chain.metamask !== null && + typeof chain.nativeToken === 'object' && + chain.nativeToken !== null + ) +} + export const getMaxPriorityFeePerGas = async ( client: Client ): Promise => { diff --git a/src/index.ts b/src/index.ts index 638dbb48..8de86443 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,6 +12,7 @@ export { setTokenAllowance, } from './core/EVM/setAllowance.js' export { isEVM } from './core/EVM/types.js' +export { isExtendedChain, convertExtendedChain } from './core/EVM/utils.js' export { isRelayerStep } from './core/EVM/typeguards.js' export type { EVMProvider, From 1d655364ed7f4df0e6315eea6b6be80c8f9f12cc Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Thu, 6 Feb 2025 13:26:32 +0100 Subject: [PATCH 25/26] chore(release): 3.6.0-beta.5 --- examples/node/package.json | 6 +-- examples/node/pnpm-lock.yaml | 86 ++++++++++++++++++------------------ package.json | 6 +-- pnpm-lock.yaml | 22 ++++----- src/version.ts | 2 +- 5 files changed, 61 insertions(+), 61 deletions(-) diff --git a/examples/node/package.json b/examples/node/package.json index fa70abc9..1becc4aa 100644 --- a/examples/node/package.json +++ b/examples/node/package.json @@ -7,12 +7,12 @@ "author": "LI.FI ", "license": "MIT", "dependencies": { - "@lifi/data-types": "^5.23.0", + "@lifi/data-types": "^5.24.0", "@lifi/sdk": "^3.5.3", - "@wagmi/connectors": "^5.7.5", + "@wagmi/connectors": "^5.7.6", "@wagmi/core": "^2.16.3", "dotenv": "^16.4.7", - "viem": "^2.22.21" + "viem": "^2.22.22" }, "scripts": { "example:swap": "tsx examples/swap.ts", diff --git a/examples/node/pnpm-lock.yaml b/examples/node/pnpm-lock.yaml index 0f0d624e..4f4f3188 100644 --- a/examples/node/pnpm-lock.yaml +++ b/examples/node/pnpm-lock.yaml @@ -9,23 +9,23 @@ importers: .: dependencies: '@lifi/data-types': - specifier: ^5.23.0 - version: 5.23.0 + specifier: ^5.24.0 + version: 5.24.0 '@lifi/sdk': specifier: ^3.5.3 - version: 3.5.3(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) + version: 3.5.3(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) '@wagmi/connectors': - specifier: ^5.7.5 - version: 5.7.5(@wagmi/core@2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) + specifier: ^5.7.6 + version: 5.7.6(@wagmi/core@2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) '@wagmi/core': specifier: ^2.16.3 - version: 2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) + version: 2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) dotenv: specifier: ^16.4.7 version: 16.4.7 viem: - specifier: ^2.22.21 - version: 2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + specifier: ^2.22.22 + version: 2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) devDependencies: '@types/node': specifier: ^22.13.1 @@ -221,20 +221,20 @@ packages: resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} engines: {node: '>=14'} - '@lifi/data-types@5.23.0': - resolution: {integrity: sha512-I+PXWcaKOleeQQj/ezoqk5EmbJe8lM6eJ/+EDPuXgYqA4SQnMjMOQsJmkC6/3xQyiZc92vNORUqtenPwgFrx6g==} + '@lifi/data-types@5.24.0': + resolution: {integrity: sha512-JTnsNMQdHBirPROhUp91EvyXAXUIzKaktCngHZoKeZpnQjC1LLQih1yQDnOJ/+zkFHIDa/koqStgCRTQ7jOung==} '@lifi/sdk@3.5.3': resolution: {integrity: sha512-KlU5sMp8aEi+ZYdGZMEn7Let4UlIpuVHsqV3+cmeqLwzMDb1Ty/TWSs+6par69WftD1UBNEWH2czi+r5Am2qCg==} peerDependencies: viem: ^2.21.0 - '@lifi/types@16.6.0': - resolution: {integrity: sha512-7X0M+O9EvXepsODkvUS5f31CWskNcv8NeG1G0RRTctGe3p79cRPKfVmYTJOkbKibX00nhdzMBsVyafzedazsnA==} - '@lifi/types@16.7.0': resolution: {integrity: sha512-t5By15YOMAndL8VKa0mE51nI5F1O5KEx5mS4yRjnipq+lfJi8XjkkktacLJOXZv7cnIubtBvCeq1TatqZ8QTlQ==} + '@lifi/types@16.8.0': + resolution: {integrity: sha512-PBu5TDo1hFJEjBgnSZfQq/2g2BJo9Z181EVoKCgWLQxB/r7AuDjF5xTFyX776fsosaQNGPwooSGYEWJzeqUmew==} + '@lit-labs/ssr-dom-shim@1.3.0': resolution: {integrity: sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ==} @@ -279,8 +279,8 @@ packages: resolution: {integrity: sha512-5yb2gMI1BDm0JybZezeoX/3XhPDOtTbcFvpTXM9kxsoZjPZFh4XciqRbpD6N86HYZqWDhEaKUDuOyR0sQHEjMA==} engines: {node: '>=12.0.0'} - '@metamask/sdk-communication-layer@0.31.0': - resolution: {integrity: sha512-V9CxdzabDPjQVgmKGHsyU3SYt4Af27g+4DbGCx0fLoHqN/i1RBDZqs/LYbJX3ykJCANzE+llz/MolMCMrzM2RA==} + '@metamask/sdk-communication-layer@0.32.0': + resolution: {integrity: sha512-dmj/KFjMi1fsdZGIOtbhxdg3amxhKL/A5BqSU4uh/SyDKPub/OT+x5pX8bGjpTL1WPWY/Q0OIlvFyX3VWnT06Q==} peerDependencies: cross-fetch: ^4.0.0 eciesjs: '*' @@ -288,11 +288,11 @@ packages: readable-stream: ^3.6.2 socket.io-client: ^4.5.1 - '@metamask/sdk-install-modal-web@0.31.5': - resolution: {integrity: sha512-ZfrVkPAabfH4AIxcTlxQN5oyyzzVXFTLZrm1/BJ+X632d9MiyAVHNtiqa9EZpZYkZGk2icmDVP+xCpvJmVOVpQ==} + '@metamask/sdk-install-modal-web@0.32.0': + resolution: {integrity: sha512-TFoktj0JgfWnQaL3yFkApqNwcaqJ+dw4xcnrJueMP3aXkSNev2Ido+WVNOg4IIMxnmOrfAC9t0UJ0u/dC9MjOQ==} - '@metamask/sdk@0.31.5': - resolution: {integrity: sha512-i7wteqO/fU2JWQrMZz+addHokYThHYznp4nYXviv+QysdxGVgAYvcW/PBA+wpeP3veX7QGfNqMPgSsZbBrASYw==} + '@metamask/sdk@0.32.0': + resolution: {integrity: sha512-WmGAlP1oBuD9hk4CsdlG1WJFuPtYJY+dnTHJMeCyohTWD2GgkcLMUUuvu9lO1/NVzuOoSi1OrnjbuY1O/1NZ1g==} '@metamask/superstruct@3.1.0': resolution: {integrity: sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA==} @@ -489,8 +489,8 @@ packages: '@types/ws@8.5.14': resolution: {integrity: sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==} - '@wagmi/connectors@5.7.5': - resolution: {integrity: sha512-btqHHUSTzg4BZe9at/7SnRPv4cz8O3pisbeZBh0qxKz7PVm+9vRxY0bSala3xQPDcS0PRTB30Vn/+lM73GCjbw==} + '@wagmi/connectors@5.7.6': + resolution: {integrity: sha512-Kl6UbvPlWJY/NgWj7M1869Wdx0kLQxZrC0Hv1Lc+RhgiHspHvhpTW/+0OGJOAEQm3XtN20P98n3KcdglvB+19A==} peerDependencies: '@wagmi/core': 2.16.3 typescript: '>=5.0.4' @@ -1555,8 +1555,8 @@ packages: varuint-bitcoin@2.0.0: resolution: {integrity: sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==} - viem@2.22.21: - resolution: {integrity: sha512-CujapStF+F3VP+bKBQOGFk5YHyJKZOY2TGvD1e04CAm8VrtLo3sfTydYW2Rri6LMktqp6ilGB9GvSiZczxvOBQ==} + viem@2.22.22: + resolution: {integrity: sha512-0z7EFheP+paC/KRlVpu7zXYiqkTX6GR86G0p84LnYr5NgaVxGz0mGsiERy41ThERX1ahkTdEWGGiNgfi6wVqBQ==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -1673,7 +1673,7 @@ snapshots: bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.3) bs58: 6.0.0 - viem: 2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript @@ -1797,11 +1797,11 @@ snapshots: ethereum-cryptography: 2.2.1 micro-ftch: 0.3.1 - '@lifi/data-types@5.23.0': + '@lifi/data-types@5.24.0': dependencies: - '@lifi/types': 16.6.0 + '@lifi/types': 16.8.0 - '@lifi/sdk@3.5.3(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': + '@lifi/sdk@3.5.3(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: '@bigmi/core': 0.1.1(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) '@lifi/types': 16.7.0 @@ -1811,7 +1811,7 @@ snapshots: bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.3) bs58: 6.0.0 - viem: 2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - encoding @@ -1819,10 +1819,10 @@ snapshots: - utf-8-validate - zod - '@lifi/types@16.6.0': {} - '@lifi/types@16.7.0': {} + '@lifi/types@16.8.0': {} + '@lit-labs/ssr-dom-shim@1.3.0': {} '@lit/reactive-element@1.6.3': @@ -1899,7 +1899,7 @@ snapshots: '@metamask/safe-event-emitter@3.1.2': {} - '@metamask/sdk-communication-layer@0.31.0(cross-fetch@4.1.0)(eciesjs@0.4.13)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + '@metamask/sdk-communication-layer@0.32.0(cross-fetch@4.1.0)(eciesjs@0.4.13)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: bufferutil: 4.0.9 cross-fetch: 4.1.0 @@ -1914,17 +1914,17 @@ snapshots: transitivePeerDependencies: - supports-color - '@metamask/sdk-install-modal-web@0.31.5': + '@metamask/sdk-install-modal-web@0.32.0': dependencies: '@paulmillr/qr': 0.2.1 - '@metamask/sdk@0.31.5(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + '@metamask/sdk@0.32.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.7 '@metamask/onboarding': 1.0.1 '@metamask/providers': 16.1.0 - '@metamask/sdk-communication-layer': 0.31.0(cross-fetch@4.1.0)(eciesjs@0.4.13)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@metamask/sdk-install-modal-web': 0.31.5 + '@metamask/sdk-communication-layer': 0.32.0(cross-fetch@4.1.0)(eciesjs@0.4.13)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@metamask/sdk-install-modal-web': 0.32.0 '@paulmillr/qr': 0.2.1 bowser: 2.11.0 cross-fetch: 4.1.0 @@ -2059,7 +2059,7 @@ snapshots: '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)': dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.22.9 - viem: 2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript @@ -2247,16 +2247,16 @@ snapshots: dependencies: '@types/node': 22.13.1 - '@wagmi/connectors@5.7.5(@wagmi/core@2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': + '@wagmi/connectors@5.7.6(@wagmi/core@2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)(viem@2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: '@coinbase/wallet-sdk': 4.2.3 - '@metamask/sdk': 0.31.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@metamask/sdk': 0.32.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': 0.18.5(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) - '@wagmi/core': 2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) + '@wagmi/core': 2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10)) '@walletconnect/ethereum-provider': 2.17.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) cbw-sdk: '@coinbase/wallet-sdk@3.9.3' - viem: 2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) optionalDependencies: typescript: 5.7.3 transitivePeerDependencies: @@ -2286,11 +2286,11 @@ snapshots: - utf-8-validate - zod - '@wagmi/core@2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': + '@wagmi/core@2.16.3(typescript@5.7.3)(use-sync-external-store@1.2.0)(viem@2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.7.3) - viem: 2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10) zustand: 5.0.0(use-sync-external-store@1.2.0) optionalDependencies: typescript: 5.7.3 @@ -3604,7 +3604,7 @@ snapshots: dependencies: uint8array-tools: 0.0.8 - viem@2.22.21(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10): + viem@2.22.22(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@5.0.10): dependencies: '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 diff --git a/package.json b/package.json index a4458a43..36a8fbce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lifi/sdk", - "version": "3.6.0-beta.4", + "version": "3.6.0-beta.5", "description": "LI.FI Any-to-Any Cross-Chain-Swap SDK", "keywords": [ "bridge", @@ -93,14 +93,14 @@ }, "dependencies": { "@bigmi/core": "^0.1.1", - "@lifi/types": "^16.7.0", + "@lifi/types": "^16.8.0", "@noble/curves": "^1.8.1", "@solana/wallet-adapter-base": "^0.9.23", "@solana/web3.js": "^1.98.0", "bech32": "^2.0.0", "bitcoinjs-lib": "^7.0.0-rc.0", "bs58": "^6.0.0", - "viem": "^2.22.21" + "viem": "^2.22.22" }, "devDependencies": { "@biomejs/biome": "^1.9.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d2208a3..d085c37b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^0.1.1 version: 0.1.1(bs58@6.0.0)(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) '@lifi/types': - specifier: ^16.7.0 - version: 16.7.0 + specifier: ^16.8.0 + version: 16.8.0 '@noble/curves': specifier: ^1.8.1 version: 1.8.1 @@ -33,8 +33,8 @@ importers: specifier: ^6.0.0 version: 6.0.0 viem: - specifier: ^2.22.21 - version: 2.22.21(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) + specifier: ^2.22.22 + version: 2.22.22(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) devDependencies: '@biomejs/biome': specifier: ^1.9.4 @@ -487,8 +487,8 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@lifi/types@16.7.0': - resolution: {integrity: sha512-t5By15YOMAndL8VKa0mE51nI5F1O5KEx5mS4yRjnipq+lfJi8XjkkktacLJOXZv7cnIubtBvCeq1TatqZ8QTlQ==} + '@lifi/types@16.8.0': + resolution: {integrity: sha512-PBu5TDo1hFJEjBgnSZfQq/2g2BJo9Z181EVoKCgWLQxB/r7AuDjF5xTFyX776fsosaQNGPwooSGYEWJzeqUmew==} '@mswjs/interceptors@0.37.3': resolution: {integrity: sha512-USvgCL/uOGFtVa6SVyRrC8kIAedzRohxIXN5LISlg5C5vLZCn7dgMFVSNhSF9cuBEFrm/O2spDWEZeMnw4ZXYg==} @@ -2742,8 +2742,8 @@ packages: varuint-bitcoin@2.0.0: resolution: {integrity: sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==} - viem@2.22.21: - resolution: {integrity: sha512-CujapStF+F3VP+bKBQOGFk5YHyJKZOY2TGvD1e04CAm8VrtLo3sfTydYW2Rri6LMktqp6ilGB9GvSiZczxvOBQ==} + viem@2.22.22: + resolution: {integrity: sha512-0z7EFheP+paC/KRlVpu7zXYiqkTX6GR86G0p84LnYr5NgaVxGz0mGsiERy41ThERX1ahkTdEWGGiNgfi6wVqBQ==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -2997,7 +2997,7 @@ snapshots: bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.7.3) bs58: 6.0.0 - viem: 2.22.21(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) + viem: 2.22.22(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - typescript @@ -3307,7 +3307,7 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@lifi/types@16.7.0': {} + '@lifi/types@16.8.0': {} '@mswjs/interceptors@0.37.3': dependencies: @@ -5594,7 +5594,7 @@ snapshots: dependencies: uint8array-tools: 0.0.8 - viem@2.22.21(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10): + viem@2.22.22(bufferutil@4.0.8)(typescript@5.7.3)(utf-8-validate@5.0.10): dependencies: '@noble/curves': 1.8.1 '@noble/hashes': 1.7.1 diff --git a/src/version.ts b/src/version.ts index dc71d38e..e4ce29f2 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ export const name = '@lifi/sdk' -export const version = '3.6.0-beta.4' +export const version = '3.6.0-beta.5' From 1ee44c2564b0e72ccc75e837f467637ae0c9a1ec Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Thu, 13 Feb 2025 11:01:03 +0100 Subject: [PATCH 26/26] feat: add check permit --- package.json | 2 +- src/config.ts | 5 +- src/core/EVM/EVM.ts | 4 ++ src/core/EVM/checkPermitSupport.ts | 73 +++++++++++++++++++++ src/core/EVM/permit2/signatureTransfer.ts | 2 +- src/core/EVM/publicClient.ts | 79 ++++++++++++----------- src/core/EVM/typeguards.ts | 5 +- src/core/EVM/types.ts | 5 +- 8 files changed, 132 insertions(+), 43 deletions(-) create mode 100644 src/core/EVM/checkPermitSupport.ts diff --git a/package.json b/package.json index 36a8fbce..3780a1ee 100644 --- a/package.json +++ b/package.json @@ -133,5 +133,5 @@ "postbump": "node scripts/version.js && git add ." } }, - "packageManager": "pnpm@10.2.0" + "packageManager": "pnpm@9.15.5" } diff --git a/src/config.ts b/src/config.ts index 28a0c0ac..9c322fc1 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,4 @@ -import { ChainId, type ExtendedChain } from '@lifi/types' +import { ChainId, type ChainType, type ExtendedChain } from '@lifi/types' import type { SDKProvider } from './core/types.js' import type { RPCUrls, SDKBaseConfig, SDKConfig } from './types/internal.js' @@ -34,6 +34,9 @@ export const config = (() => { } return _config }, + getProvider(type: ChainType) { + return _config.providers.find((provider) => provider.type === type) + }, setProviders(providers: SDKProvider[]) { const providerMap = new Map( _config.providers.map((provider) => [provider.type, provider]) diff --git a/src/core/EVM/EVM.ts b/src/core/EVM/EVM.ts index e7734cf6..1ad60796 100644 --- a/src/core/EVM/EVM.ts +++ b/src/core/EVM/EVM.ts @@ -12,9 +12,13 @@ export function EVM(options?: EVMProviderOptions): EVMProvider { get type() { return ChainType.EVM }, + get options() { + return _options + }, isAddress, resolveAddress: getENSAddress, getBalance: getEVMBalance, + getWalletClient: _options.getWalletClient, async getStepExecutor( options: StepExecutorOptions ): Promise { diff --git a/src/core/EVM/checkPermitSupport.ts b/src/core/EVM/checkPermitSupport.ts new file mode 100644 index 00000000..22d3c7ca --- /dev/null +++ b/src/core/EVM/checkPermitSupport.ts @@ -0,0 +1,73 @@ +import type { ExtendedChain } from '@lifi/types' +import { ChainType } from '@lifi/types' +import type { Address } from 'viem' +import { config } from '../../config.js' +import { getAllowance } from './getAllowance.js' +import { type NativePermitData, getNativePermit } from './getNativePermit.js' +import { getPublicClient } from './publicClient.js' +import type { EVMProvider } from './types.js' + +export type PermitSupport = { + /** Whether the token supports EIP-2612 native permits */ + nativePermitSupported: boolean + /** Whether Permit2 is available and has sufficient allowance */ + permit2AllowanceSufficient: boolean +} + +/** + * Checks what permit types are supported for a token on a specific chain. + * Checks in order: + * 1. Native permit (EIP-2612) support + * 2. Permit2 availability and allowance + * + * @param chain - The chain to check permit support on + * @param tokenAddress - The token address to check + * @param ownerAddress - The address that would sign the permit + * @param amount - The amount to check allowance against for Permit2 + * @returns Object indicating which permit types are supported + */ +export const checkPermitSupport = async ({ + chain, + tokenAddress, + ownerAddress, + amount, +}: { + chain: ExtendedChain + tokenAddress: Address + ownerAddress: Address + amount: bigint +}): Promise => { + const provider = config.getProvider(ChainType.EVM) as EVMProvider | undefined + + let client = await provider?.getWalletClient?.() + + if (!client) { + client = await getPublicClient(chain.id) + } + + let nativePermit: NativePermitData + // Try with wallet client first, fallback to public client + try { + nativePermit = await getNativePermit(client, chain, tokenAddress) + } catch { + client = await getPublicClient(chain.id) + nativePermit = await getNativePermit(client, chain, tokenAddress) + } + + let permit2Allowance: bigint | undefined + // Check Permit2 allowance if available on chain + if (chain.permit2) { + permit2Allowance = await getAllowance( + chain.id, + tokenAddress, + ownerAddress, + chain.permit2 as Address + ) + } + + return { + nativePermitSupported: nativePermit.supported, + permit2AllowanceSufficient: + !!permit2Allowance && permit2Allowance >= amount, + } +} diff --git a/src/core/EVM/permit2/signatureTransfer.ts b/src/core/EVM/permit2/signatureTransfer.ts index 8de84464..07d385c7 100644 --- a/src/core/EVM/permit2/signatureTransfer.ts +++ b/src/core/EVM/permit2/signatureTransfer.ts @@ -11,7 +11,7 @@ import { permit2Domain } from './domain.js' export interface Witness { witness: any witnessTypeName: string - witnessType: { [key: string]: { name: string; type: string }[] } + witnessType: Record } export interface TokenPermissions { diff --git a/src/core/EVM/publicClient.ts b/src/core/EVM/publicClient.ts index ad94b9eb..85d4c5d6 100644 --- a/src/core/EVM/publicClient.ts +++ b/src/core/EVM/publicClient.ts @@ -1,9 +1,10 @@ -import { ChainId } from '@lifi/types' +import { ChainId, ChainType } from '@lifi/types' import type { Client } from 'viem' import { http, createClient, fallback, webSocket } from 'viem' import { type Chain, mainnet } from 'viem/chains' import { config } from '../../config.js' import { getRpcUrls } from '../rpc.js' +import type { EVMProvider } from './types.js' // cached providers const publicClients: Record = {} @@ -14,46 +15,48 @@ const publicClients: Record = {} * @returns The public client for the given chain */ export const getPublicClient = async (chainId: number): Promise => { - if (!publicClients[chainId]) { - const urls = await getRpcUrls(chainId) - const fallbackTransports = urls.map((url) => - url.startsWith('wss') - ? webSocket(url) - : http(url, { - batch: { - batchSize: 64, - }, - }) - ) - const _chain = await config.getChainById(chainId) - const chain: Chain = { - ..._chain, - ..._chain.metamask, - name: _chain.metamask.chainName, - rpcUrls: { - default: { http: _chain.metamask.rpcUrls }, - public: { http: _chain.metamask.rpcUrls }, - }, - } - // Add ENS contracts - if (chain.id === ChainId.ETH) { - chain.contracts = { - ...mainnet.contracts, - ...chain.contracts, - } - } - publicClients[chainId] = createClient({ - chain: chain, - transport: fallback(fallbackTransports), - batch: { - multicall: true, - }, - }) + if (publicClients[chainId]) { + return publicClients[chainId] } - if (!publicClients[chainId]) { - throw new Error(`Unable to configure provider for chain ${chainId}`) + const urls = await getRpcUrls(chainId) + const fallbackTransports = urls.map((url) => + url.startsWith('wss') + ? webSocket(url) + : http(url, { + batch: { + batchSize: 64, + }, + }) + ) + const _chain = await config.getChainById(chainId) + const chain: Chain = { + ..._chain, + ..._chain.metamask, + name: _chain.metamask.chainName, + rpcUrls: { + default: { http: _chain.metamask.rpcUrls }, + public: { http: _chain.metamask.rpcUrls }, + }, + } + // Add ENS contracts + if (chain.id === ChainId.ETH) { + chain.contracts = { + ...mainnet.contracts, + ...chain.contracts, + } } + const provider = config.getProvider(ChainType.EVM) as EVMProvider | undefined + publicClients[chainId] = createClient({ + chain: chain, + transport: fallback( + fallbackTransports, + provider?.options?.fallbackTransportConfig + ), + batch: { + multicall: true, + }, + }) return publicClients[chainId] } diff --git a/src/core/EVM/typeguards.ts b/src/core/EVM/typeguards.ts index 9a839786..72d88e37 100644 --- a/src/core/EVM/typeguards.ts +++ b/src/core/EVM/typeguards.ts @@ -1,7 +1,10 @@ +import type { LiFiStep } from '@lifi/types' import type { LiFiStepExtended } from '../types.js' import type { EVMPermitStep } from './types.js' -export function isRelayerStep(step: LiFiStepExtended): step is EVMPermitStep { +export function isRelayerStep( + step: LiFiStepExtended | LiFiStep +): step is EVMPermitStep { const evmStep = step as EVMPermitStep return 'permit' in evmStep && 'permitData' in evmStep && 'witness' in evmStep } diff --git a/src/core/EVM/types.ts b/src/core/EVM/types.ts index f065c858..5433f231 100644 --- a/src/core/EVM/types.ts +++ b/src/core/EVM/types.ts @@ -1,5 +1,5 @@ import { type BaseToken, ChainType } from '@lifi/types' -import type { Client } from 'viem' +import type { Client, FallbackTransportConfig } from 'viem' import type { LiFiStepExtended, SwitchChainHook } from '../types.js' import type { SDKProvider } from '../types.js' import type { PermitData } from './permit2/domain.js' @@ -11,10 +11,13 @@ import type { export interface EVMProviderOptions { getWalletClient?: () => Promise switchChain?: SwitchChainHook + fallbackTransportConfig?: FallbackTransportConfig } export interface EVMProvider extends SDKProvider { + options: EVMProviderOptions setOptions(options: EVMProviderOptions): void + getWalletClient?(): Promise } export function isEVM(provider: SDKProvider): provider is EVMProvider {