From df8d3ca8b5c4dd604d84287782bd94789757f1ab Mon Sep 17 00:00:00 2001 From: claudiovb Date: Fri, 29 May 2026 17:02:37 -0300 Subject: [PATCH 1/2] Refactor methods for new version of erc-4337 + add new functions --- .env.example | 4 +- package-lock.json | 277 ++++++++++++++++-- package.json | 6 +- shared/config.ts | 2 - wallet-evm-erc-4337/README.md | 2 + wallet-evm-erc-4337/check-balances.ts | 1 - wallet-evm-erc-4337/create-wallet.ts | 2 - wallet-evm-erc-4337/fee-management.ts | 1 - wallet-evm-erc-4337/manage-accounts.ts | 1 - wallet-evm-erc-4337/memory-management.ts | 1 - wallet-evm-erc-4337/read-only-account.ts | 1 - .../send-transaction-gas-override.ts | 152 ++++++++++ wallet-evm-erc-4337/send-transaction.ts | 1 - wallet-evm-erc-4337/sign-transaction.ts | 73 +++++ wallet-evm-erc-4337/sign-verify-message.ts | 1 - wallet-evm-erc-4337/token-transfer.ts | 1 - 16 files changed, 484 insertions(+), 42 deletions(-) create mode 100644 wallet-evm-erc-4337/send-transaction-gas-override.ts create mode 100644 wallet-evm-erc-4337/sign-transaction.ts diff --git a/.env.example b/.env.example index 485248d..4b9fa0c 100644 --- a/.env.example +++ b/.env.example @@ -6,8 +6,8 @@ EVM_RPC_URL=https://sepolia.drpc.org EVM_TOKEN_CONTRACT=0x7169D38820dfd117C3FA1f22a697dBA58d90BA06 EVM_RECIPIENT_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 -# EVM ERC-4337 module -ERC4337_RPC_URL=https://sepolia.drpc.org +# EVM ERC-4337 module -- publicnode allows batched RPC calls (drpc free tier caps batches at 3) +ERC4337_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com ERC4337_BUNDLER_URL=https://api.pimlico.io/v2/sepolia/rpc?apikey=YOUR_KEY ERC4337_RECIPIENT_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 ERC4337_TOKEN_CONTRACT=0x7169D38820dfd117C3FA1f22a697dBA58d90BA06 diff --git a/package-lock.json b/package-lock.json index 7281930..2430b24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@tetherto/wdk-protocol-swap-velora-evm": "^1.0.0-beta.4", "@tetherto/wdk-wallet-btc": "^1.0.0-beta.8", "@tetherto/wdk-wallet-evm": "latest", - "@tetherto/wdk-wallet-evm-erc-4337": "latest", + "@tetherto/wdk-wallet-evm-erc-4337": "git+https://github.com/tetherto/wdk-wallet-evm-erc-4337.git#main", "@tetherto/wdk-wallet-solana": "latest", "@tetherto/wdk-wallet-ton": "latest", "@tetherto/wdk-wallet-tron": "latest", @@ -1809,21 +1809,31 @@ "license": "MIT" }, "node_modules/@peculiar/asn1-schema": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.6.0.tgz", - "integrity": "sha512-xNLYLBFTBKkCzEZIw842BxytQQATQv+lDTCEMZ8C196iJcJJMBUZxrhSTxLaohMyKK8QlzRNTRkUmanucnDSqg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.7.0.tgz", + "integrity": "sha512-W8ZfWzLmQnrcky+eh3tni4IozMdqBDiHWU0N+vve/UGjMaUs8c0L7A2oEdkBXS8rTpWDpK/aoI3DG/L/hxmxPg==", "license": "MIT", "optional": true, "dependencies": { + "@peculiar/utils": "^2.0.2", "asn1js": "^3.0.6", - "pvtsutils": "^1.3.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@peculiar/utils/-/utils-2.0.3.tgz", + "integrity": "sha512-+oL3HPFRIZ1St2K50lWCXiioIgSoxzz7R1J3uF6neO2yl1sgmpgY6XXJH4BdpoDkMWznQTeYF6oWNDZLCdQ4eQ==", + "license": "MIT", + "optional": true, + "dependencies": { "tslib": "^2.8.1" } }, "node_modules/@safe-global/safe-deployments": { - "version": "1.37.53", - "resolved": "https://registry.npmjs.org/@safe-global/safe-deployments/-/safe-deployments-1.37.53.tgz", - "integrity": "sha512-3XihirwKqcCi6jsipCiW3lYXra9i4pC9nlhHTdUyi7Yx38nBYIkXeLZN2Nmf2UPcQBeHGnW1T3DgzY4VnuF/FQ==", + "version": "1.37.56", + "resolved": "https://registry.npmjs.org/@safe-global/safe-deployments/-/safe-deployments-1.37.56.tgz", + "integrity": "sha512-HF3ETre/KSP3nCOZ72XEbq5U56gOGgYLJ22LxOAnR8+YzMjzZ8cpnHpx5Z31Zt1xkUTGSCMi9XF950lJt6WbsQ==", "license": "MIT", "dependencies": { "semver": "^7.6.2" @@ -1836,9 +1846,9 @@ "license": "MIT" }, "node_modules/@safe-global/types-kit": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@safe-global/types-kit/-/types-kit-3.0.0.tgz", - "integrity": "sha512-AZWIlR5MguDPdGiOj7BB4JQPY2afqmWQww1mu8m8Oi16HHBW99G01kFOu4NEHBwEU1cgwWOMY19hsI5KyL4W2w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@safe-global/types-kit/-/types-kit-3.1.0.tgz", + "integrity": "sha512-uI6lFV8wOji4rb7juu0/LRMND0rq2NWaqH4zFzE2FUjO8lTvbCT+/5W/+flUUfkcaqyLDlJ1OPjasa2bEakrbw==", "license": "MIT", "dependencies": { "abitype": "^1.0.2" @@ -4919,7 +4929,7 @@ }, "node_modules/@tetherto/wdk-indexer-http": { "version": "1.0.0-beta.1", - "resolved": "git+https://github.com/tetherto/wdk-indexer-http.git#fbde10bae408d546647ad6e6b8dcfaf8f0e6f103", + "resolved": "git+ssh://git@github.com/tetherto/wdk-indexer-http.git#fbde10bae408d546647ad6e6b8dcfaf8f0e6f103", "license": "Apache-2.0", "engines": { "node": ">=18", @@ -4931,7 +4941,7 @@ }, "node_modules/@tetherto/wdk-mcp-toolkit": { "version": "1.0.0-beta.1", - "resolved": "git+https://github.com/tetherto/wdk-mcp-toolkit.git#1f8fe9ce3aeb47390ea5c54ece7a0c1d70f9d3ec", + "resolved": "git+ssh://git@github.com/tetherto/wdk-mcp-toolkit.git#1f8fe9ce3aeb47390ea5c54ece7a0c1d70f9d3ec", "license": "Apache-2.0", "dependencies": { "@inquirer/prompts": "^7.0.0", @@ -5081,6 +5091,47 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@tetherto/wdk-protocol-bridge-usdt0-evm/node_modules/@tetherto/wdk-wallet-evm-erc-4337": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet-evm-erc-4337/-/wdk-wallet-evm-erc-4337-1.0.0-beta.5.tgz", + "integrity": "sha512-Hz/AvKPt1QiMXMEkaGwMwIq9gg1DBSqWm8G+OiolBQVpQHPNHEpSbED4w/F2jcGd6jdefod3IqrGWBscKE55RA==", + "license": "Apache-2.0", + "dependencies": { + "@tetherto/wdk-safe-relay-kit": "4.1.5", + "@tetherto/wdk-wallet": "1.0.0-beta.7", + "@tetherto/wdk-wallet-evm": "1.0.0-beta.8", + "bare-node-runtime": "^1.1.4", + "ethers": "6.14.4" + } + }, + "node_modules/@tetherto/wdk-protocol-bridge-usdt0-evm/node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/ethers": { + "version": "6.14.4", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.14.4.tgz", + "integrity": "sha512-Jm/dzRs2Z9iBrT6e9TvGxyb5YVKAPLlpna7hjxH7KH/++DSh2T/JVmQUv7iHI5E55hDbp/gEVvstWYXVxXFzsA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@tetherto/wdk-protocol-bridge-usdt0-evm/node_modules/@ton/core": { "version": "0.61.0", "resolved": "https://registry.npmjs.org/@ton/core/-/core-0.61.0.tgz", @@ -5231,6 +5282,98 @@ "ethers": "6.14.3" } }, + "node_modules/@tetherto/wdk-protocol-lending-aave-evm/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@tetherto/wdk-protocol-lending-aave-evm/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@tetherto/wdk-protocol-lending-aave-evm/node_modules/@tetherto/wdk-wallet-evm-erc-4337": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet-evm-erc-4337/-/wdk-wallet-evm-erc-4337-1.0.0-beta.5.tgz", + "integrity": "sha512-Hz/AvKPt1QiMXMEkaGwMwIq9gg1DBSqWm8G+OiolBQVpQHPNHEpSbED4w/F2jcGd6jdefod3IqrGWBscKE55RA==", + "license": "Apache-2.0", + "dependencies": { + "@tetherto/wdk-safe-relay-kit": "4.1.5", + "@tetherto/wdk-wallet": "1.0.0-beta.7", + "@tetherto/wdk-wallet-evm": "1.0.0-beta.8", + "bare-node-runtime": "^1.1.4", + "ethers": "6.14.4" + } + }, + "node_modules/@tetherto/wdk-protocol-lending-aave-evm/node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/ethers": { + "version": "6.14.4", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.14.4.tgz", + "integrity": "sha512-Jm/dzRs2Z9iBrT6e9TvGxyb5YVKAPLlpna7hjxH7KH/++DSh2T/JVmQUv7iHI5E55hDbp/gEVvstWYXVxXFzsA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tetherto/wdk-protocol-lending-aave-evm/node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "license": "0BSD" + }, + "node_modules/@tetherto/wdk-protocol-lending-aave-evm/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/@tetherto/wdk-protocol-swap-velora-evm": { "version": "1.0.0-beta.4", "resolved": "https://registry.npmjs.org/@tetherto/wdk-protocol-swap-velora-evm/-/wdk-protocol-swap-velora-evm-1.0.0-beta.4.tgz", @@ -5407,14 +5550,14 @@ } }, "node_modules/@tetherto/wdk-wallet-evm-erc-4337": { - "version": "1.0.0-beta.5", - "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet-evm-erc-4337/-/wdk-wallet-evm-erc-4337-1.0.0-beta.5.tgz", - "integrity": "sha512-Hz/AvKPt1QiMXMEkaGwMwIq9gg1DBSqWm8G+OiolBQVpQHPNHEpSbED4w/F2jcGd6jdefod3IqrGWBscKE55RA==", + "version": "1.0.0-beta.7", + "resolved": "git+ssh://git@github.com/tetherto/wdk-wallet-evm-erc-4337.git#1f3b3061bfcb29fb58ae3322b1866163c51d89b9", "license": "Apache-2.0", "dependencies": { - "@tetherto/wdk-safe-relay-kit": "4.1.5", - "@tetherto/wdk-wallet": "1.0.0-beta.7", - "@tetherto/wdk-wallet-evm": "1.0.0-beta.8", + "@tetherto/wdk-failover-provider": "1.0.0-beta.2", + "@tetherto/wdk-wallet": "1.0.0-beta.9", + "@tetherto/wdk-wallet-evm": "1.0.0-beta.12", + "abstractionkit": "0.3.8", "bare-node-runtime": "^1.1.4", "ethers": "6.14.4" } @@ -5443,6 +5586,76 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-failover-provider": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@tetherto/wdk-failover-provider/-/wdk-failover-provider-1.0.0-beta.2.tgz", + "integrity": "sha512-G1KNpw11Hql7Q6Xy5oqO+8P+AkJi4QBTK4JZtZvcXmx8ze+d/lzSQSufWLE/k5YAvwJ+xDx7mRzy/teG4zaiOw==", + "license": "Apache-2.0" + }, + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet": { + "version": "1.0.0-beta.9", + "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet/-/wdk-wallet-1.0.0-beta.9.tgz", + "integrity": "sha512-sycU5+3fcgnJNR2vftGYykwrcqIzy9WKef6Yzwn7luS4S+MHDz+nfhhI0t9Qh3GMC+1m52LSMGBro3BPSHszNg==", + "license": "Apache-2.0", + "dependencies": { + "bare-node-runtime": "^1.1.4", + "bip39": "3.1.0" + } + }, + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm": { + "version": "1.0.0-beta.12", + "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet-evm/-/wdk-wallet-evm-1.0.0-beta.12.tgz", + "integrity": "sha512-y101FMTrj9Ys67d80RE9La8B2RAd2jckD5+d50c/Wa8tCNa0uUsTf7YIjVssvfmYFrXUL8uq4vMA0fcJwNFIoQ==", + "license": "Apache-2.0", + "dependencies": { + "@noble/curves": "1.9.2", + "@noble/hashes": "1.8.0", + "@noble/secp256k1": "2.2.3", + "@tetherto/wdk-failover-provider": "1.0.0-beta.2", + "@tetherto/wdk-wallet": "1.0.0-beta.8", + "bare-node-runtime": "^1.1.4", + "bip39": "3.1.0", + "ethers": "6.14.4", + "sodium-universal": "5.0.1" + } + }, + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm/node_modules/@noble/curves": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.2.tgz", + "integrity": "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm/node_modules/@tetherto/wdk-wallet": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet/-/wdk-wallet-1.0.0-beta.8.tgz", + "integrity": "sha512-eCOpPbgRrwVuB7mJS1zGVVN47n/pvX5gLRG+WERH0NmpcIS8OHxa4DYuTJ9P1qEZYRvYl4XOSrhfizC/foonDQ==", + "license": "Apache-2.0", + "dependencies": { + "bare-node-runtime": "^1.1.4", + "bip39": "3.1.0" + } + }, "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/ethers": { "version": "6.14.4", "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.14.4.tgz", @@ -5704,6 +5917,18 @@ "node": ">=6.5" } }, + "node_modules/abstractionkit": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/abstractionkit/-/abstractionkit-0.3.8.tgz", + "integrity": "sha512-FDzxqQf5XSEsjDQdUtS4gnB8FHcRZg9BKBtfmdW2Fo2TlTDbsoieYPveRBdBg7dPr2qV/2PFotjyv3o6pdik1w==", + "license": "MIT", + "dependencies": { + "ethers": "^6.13.2" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/accepts": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", @@ -5803,14 +6028,14 @@ } }, "node_modules/asn1js": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.7.tgz", - "integrity": "sha512-uLvq6KJu04qoQM6gvBfKFjlh6Gl0vOKQuR5cJMDHQkmwfMOQeN3F3SHCv9SNYSL+CRoHvOGFfllDlVz03GQjvQ==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.10.tgz", + "integrity": "sha512-S2s3aOytiKdFRdulw2qPE51MzjzVOisppcVv7jVFR+Kw0kxwvFrDcYA0h7Ndqbmj0HkMIXYWaoj7fli8kgx1eg==", "license": "BSD-3-Clause", "optional": true, "dependencies": { "pvtsutils": "^1.3.6", - "pvutils": "^1.1.3", + "pvutils": "^1.1.5", "tslib": "^2.8.1" }, "engines": { @@ -9121,9 +9346,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", "license": "ISC", "bin": { "semver": "bin/semver.js" diff --git a/package.json b/package.json index 8f1c09d..69bb081 100644 --- a/package.json +++ b/package.json @@ -28,11 +28,13 @@ "example:wallet-evm-erc-4337:check-balances": "tsx wallet-evm-erc-4337/check-balances.ts", "example:wallet-evm-erc-4337:read-only-account": "tsx wallet-evm-erc-4337/read-only-account.ts", "example:wallet-evm-erc-4337:send-transaction": "tsx wallet-evm-erc-4337/send-transaction.ts", + "example:wallet-evm-erc-4337:send-transaction-gas-override": "tsx wallet-evm-erc-4337/send-transaction-gas-override.ts", + "example:wallet-evm-erc-4337:sign-transaction": "tsx wallet-evm-erc-4337/sign-transaction.ts", "example:wallet-evm-erc-4337:token-transfer": "tsx wallet-evm-erc-4337/token-transfer.ts", "example:wallet-evm-erc-4337:sign-verify-message": "tsx wallet-evm-erc-4337/sign-verify-message.ts", "example:wallet-evm-erc-4337:fee-management": "tsx wallet-evm-erc-4337/fee-management.ts", "example:wallet-evm-erc-4337:memory-management": "tsx wallet-evm-erc-4337/memory-management.ts", - "validate:wallet-evm-erc-4337": "tsx wallet-evm-erc-4337/create-wallet.ts && tsx wallet-evm-erc-4337/manage-accounts.ts && tsx wallet-evm-erc-4337/check-balances.ts && tsx wallet-evm-erc-4337/read-only-account.ts && tsx wallet-evm-erc-4337/send-transaction.ts && tsx wallet-evm-erc-4337/token-transfer.ts && tsx wallet-evm-erc-4337/sign-verify-message.ts && tsx wallet-evm-erc-4337/fee-management.ts && tsx wallet-evm-erc-4337/memory-management.ts", + "validate:wallet-evm-erc-4337": "tsx wallet-evm-erc-4337/create-wallet.ts && tsx wallet-evm-erc-4337/manage-accounts.ts && tsx wallet-evm-erc-4337/check-balances.ts && tsx wallet-evm-erc-4337/read-only-account.ts && tsx wallet-evm-erc-4337/send-transaction.ts && tsx wallet-evm-erc-4337/send-transaction-gas-override.ts && tsx wallet-evm-erc-4337/sign-transaction.ts && tsx wallet-evm-erc-4337/token-transfer.ts && tsx wallet-evm-erc-4337/sign-verify-message.ts && tsx wallet-evm-erc-4337/fee-management.ts && tsx wallet-evm-erc-4337/memory-management.ts", "example:wallet-solana:create-wallet": "tsx wallet-solana/create-wallet.ts", "example:wallet-solana:manage-accounts": "tsx wallet-solana/manage-accounts.ts", "example:wallet-solana:check-balances": "tsx wallet-solana/check-balances.ts", @@ -83,7 +85,7 @@ "@tetherto/wdk-protocol-swap-velora-evm": "^1.0.0-beta.4", "@tetherto/wdk-wallet-btc": "^1.0.0-beta.8", "@tetherto/wdk-wallet-evm": "latest", - "@tetherto/wdk-wallet-evm-erc-4337": "latest", + "@tetherto/wdk-wallet-evm-erc-4337": "git+https://github.com/tetherto/wdk-wallet-evm-erc-4337.git#main", "@tetherto/wdk-wallet-solana": "latest", "@tetherto/wdk-wallet-ton": "latest", "@tetherto/wdk-wallet-tron": "latest", diff --git a/shared/config.ts b/shared/config.ts index 89f4fa5..b20f637 100644 --- a/shared/config.ts +++ b/shared/config.ts @@ -26,7 +26,6 @@ export function loadEvmConfig() { const ERC4337_DEFAULTS = { chainId: 11155111, // Sepolia - entryPointAddress: '0x0000000071727De22E5E9d8BAf0edAc6f37da032', safeModulesVersion: '0.3.0', } as const @@ -36,7 +35,6 @@ export function loadErc4337Config() { chainId: ERC4337_DEFAULTS.chainId, rpcUrl: requireEnv('ERC4337_RPC_URL'), bundlerUrl: requireEnv('ERC4337_BUNDLER_URL'), - entryPointAddress: ERC4337_DEFAULTS.entryPointAddress, safeModulesVersion: ERC4337_DEFAULTS.safeModulesVersion, paymasterUrl: optionalEnv('ERC4337_PAYMASTER_URL'), paymasterAddress: optionalEnv('ERC4337_PAYMASTER_ADDRESS'), diff --git a/wallet-evm-erc-4337/README.md b/wallet-evm-erc-4337/README.md index f7cf5d4..203dda3 100644 --- a/wallet-evm-erc-4337/README.md +++ b/wallet-evm-erc-4337/README.md @@ -9,6 +9,8 @@ Examples for the [`@tetherto/wdk-wallet-evm-erc-4337`](https://github.com/tether | [Check Balances](./check-balances.ts) | Query native token and ERC-20 balances for smart accounts | | [Read-Only Account](./read-only-account.ts) | Monitor smart account balances and estimate fees without a private key | | [Send Transaction](./send-transaction.ts) | Send transactions via UserOperations through the bundler | +| [Send Transaction with Gas Overrides](./send-transaction-gas-override.ts) | Override UserOperation gas limits and the EIP-1559 fee pair per-call | +| [Sign Transaction](./sign-transaction.ts) | Build and sign a UserOperation locally without broadcasting it | | [Token Transfer](./token-transfer.ts) | Transfer ERC-20 tokens via UserOperations with gas mode overrides | | [Sign & Verify Message](./sign-verify-message.ts) | Sign messages and verify signatures with ERC-4337 accounts | | [Fee Management](./fee-management.ts) | Retrieve current bundler fee rates | diff --git a/wallet-evm-erc-4337/check-balances.ts b/wallet-evm-erc-4337/check-balances.ts index 01ac83e..325b44f 100644 --- a/wallet-evm-erc-4337/check-balances.ts +++ b/wallet-evm-erc-4337/check-balances.ts @@ -20,7 +20,6 @@ async function main() { chainId: config.chainId, provider: config.rpcUrl, bundlerUrl: config.bundlerUrl, - entryPointAddress: config.entryPointAddress, safeModulesVersion: config.safeModulesVersion, useNativeCoins: true, }) diff --git a/wallet-evm-erc-4337/create-wallet.ts b/wallet-evm-erc-4337/create-wallet.ts index 22e0dd0..df59db4 100644 --- a/wallet-evm-erc-4337/create-wallet.ts +++ b/wallet-evm-erc-4337/create-wallet.ts @@ -20,7 +20,6 @@ async function main() { chainId: config.chainId, provider: config.rpcUrl, bundlerUrl: config.bundlerUrl, - entryPointAddress: config.entryPointAddress, safeModulesVersion: config.safeModulesVersion, useNativeCoins: true, }) @@ -43,7 +42,6 @@ async function main() { chainId: config.chainId, provider: config.rpcUrl, bundlerUrl: config.bundlerUrl, - entryPointAddress: config.entryPointAddress, safeModulesVersion: config.safeModulesVersion, paymasterUrl: config.paymasterUrl, paymasterAddress: config.paymasterAddress, diff --git a/wallet-evm-erc-4337/fee-management.ts b/wallet-evm-erc-4337/fee-management.ts index c0a8b4a..fe8de42 100644 --- a/wallet-evm-erc-4337/fee-management.ts +++ b/wallet-evm-erc-4337/fee-management.ts @@ -20,7 +20,6 @@ async function main() { chainId: config.chainId, provider: config.rpcUrl, bundlerUrl: config.bundlerUrl, - entryPointAddress: config.entryPointAddress, safeModulesVersion: config.safeModulesVersion, useNativeCoins: true, }) diff --git a/wallet-evm-erc-4337/manage-accounts.ts b/wallet-evm-erc-4337/manage-accounts.ts index 68a5fe9..9412034 100644 --- a/wallet-evm-erc-4337/manage-accounts.ts +++ b/wallet-evm-erc-4337/manage-accounts.ts @@ -19,7 +19,6 @@ async function main() { chainId: config.chainId, provider: config.rpcUrl, bundlerUrl: config.bundlerUrl, - entryPointAddress: config.entryPointAddress, safeModulesVersion: config.safeModulesVersion, useNativeCoins: true, }) diff --git a/wallet-evm-erc-4337/memory-management.ts b/wallet-evm-erc-4337/memory-management.ts index 41a4f57..259e4ba 100644 --- a/wallet-evm-erc-4337/memory-management.ts +++ b/wallet-evm-erc-4337/memory-management.ts @@ -20,7 +20,6 @@ async function main() { chainId: config.chainId, provider: config.rpcUrl, bundlerUrl: config.bundlerUrl, - entryPointAddress: config.entryPointAddress, safeModulesVersion: config.safeModulesVersion, useNativeCoins: true, }) diff --git a/wallet-evm-erc-4337/read-only-account.ts b/wallet-evm-erc-4337/read-only-account.ts index 2648767..161e416 100644 --- a/wallet-evm-erc-4337/read-only-account.ts +++ b/wallet-evm-erc-4337/read-only-account.ts @@ -20,7 +20,6 @@ async function main() { chainId: config.chainId, provider: config.rpcUrl, bundlerUrl: config.bundlerUrl, - entryPointAddress: config.entryPointAddress, safeModulesVersion: config.safeModulesVersion, useNativeCoins: true, }) diff --git a/wallet-evm-erc-4337/send-transaction-gas-override.ts b/wallet-evm-erc-4337/send-transaction-gas-override.ts new file mode 100644 index 0000000..14a6d29 --- /dev/null +++ b/wallet-evm-erc-4337/send-transaction-gas-override.ts @@ -0,0 +1,152 @@ +/** + * EVM ERC-4337 Example: Send Transaction with Gas Overrides + * + * Demonstrates: Overriding the gas fields of a UserOperation per-call via the + * EvmErc4337Transaction shape. By default the wallet fetches gas limits from + * AbstractionKit's estimation and the fee pair from the bundler; setting any of + * these fields takes control back from those fallbacks. + * + * Rather than hardcoding magic numbers, this example reads the SDK's own + * estimate first (via signTransaction, which builds a UserOp locally without + * broadcasting), bumps every gas field by BUMP_PERCENT, and submits the bumped + * values as explicit overrides. Because all five fields are provided, the SDK + * skips estimation and submits exactly these values -- so the UserOp shown on a + * UserOp explorer (e.g. Jiffyscan) will match the bumped numbers printed below. + * + * Override fields (all optional, accept number | bigint): + * - callGasLimit, verificationGasLimit, preVerificationGas + * - maxFeePerGas, maxPriorityFeePerGas (treated as a pair: setting either one + * disables the bundler-fetched fee fallback for both) + * + * In a batched call ([tx1, tx2, ...]) only tx1's gas overrides are honored -- + * a UserOperation carries a single set of gas fields regardless of batch size. + * + * By default this only quotes the fee. Set ACTUALLY_SEND=true in .env to send a + * real 0-value UserOperation. The smart account (printed below) must hold enough + * Sepolia ETH to repay the bundler -- in native-coins mode the account pays its + * own gas, so fund the smart account address, not the owner EOA. + * + * Run: npx tsx wallet-evm-erc-4337/send-transaction-gas-override.ts + */ + +import WalletManagerEvmErc4337, { + type EvmErc4337Transaction, +} from '@tetherto/wdk-wallet-evm-erc-4337' +import { loadErc4337Config, optionalEnv } from '../shared/config.js' +import { logSection, logResult, formatWei } from '../shared/helpers.js' + +// How much to bump every estimated gas field by, as a percentage. +const BUMP_PERCENT = 25n + +const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)) + +// Bumps a value up by `percent` (integer percentage), staying in bigint math. +function bump(value: bigint, percent: bigint): bigint { + return (value * (100n + percent)) / 100n +} + +async function main() { + const config = loadErc4337Config() + const actuallySend = optionalEnv('ACTUALLY_SEND') === 'true' + + logSection('Send Transaction with Gas Overrides (ERC-4337 UserOperation)') + + const wallet = new WalletManagerEvmErc4337(config.seedPhrase, { + chainId: config.chainId, + provider: config.rpcUrl, + bundlerUrl: config.bundlerUrl, + safeModulesVersion: config.safeModulesVersion, + useNativeCoins: true, + }) + + const account = await wallet.getAccount(0) + const address = await account.getAddress() + logResult('Smart Account (sender, fund this address)', { address }) + + const baseTx: EvmErc4337Transaction = { + to: config.recipientAddress, + value: 0n, + data: '0x', + } + + // 1) Read the SDK's own estimate by building & signing a UserOp with no + // overrides. The first UserOp from a fresh account also deploys the Safe, + // so the estimated verificationGasLimit is large -- bumping the estimate + // (rather than guessing a fixed number) keeps the override valid to send. + const estimated = await account.signTransaction(baseTx) + logResult('Estimated gas (no overrides)', { + callGasLimit: estimated.callGasLimit, + verificationGasLimit: estimated.verificationGasLimit, + preVerificationGas: estimated.preVerificationGas, + maxFeePerGas: formatWei(estimated.maxFeePerGas), + maxPriorityFeePerGas: formatWei(estimated.maxPriorityFeePerGas), + }) + + // 2) Bump every gas field by BUMP_PERCENT and feed them back as explicit + // overrides on the same call. + const overrideTx: EvmErc4337Transaction = { + ...baseTx, + callGasLimit: bump(estimated.callGasLimit, BUMP_PERCENT), + verificationGasLimit: bump(estimated.verificationGasLimit, BUMP_PERCENT), + preVerificationGas: bump(estimated.preVerificationGas, BUMP_PERCENT), + maxFeePerGas: bump(estimated.maxFeePerGas, BUMP_PERCENT), + maxPriorityFeePerGas: bump(estimated.maxPriorityFeePerGas, BUMP_PERCENT), + } + logResult(`Override gas (estimate + ${BUMP_PERCENT}%)`, { + callGasLimit: overrideTx.callGasLimit, + verificationGasLimit: overrideTx.verificationGasLimit, + preVerificationGas: overrideTx.preVerificationGas, + maxFeePerGas: formatWei(overrideTx.maxFeePerGas as bigint), + maxPriorityFeePerGas: formatWei(overrideTx.maxPriorityFeePerGas as bigint), + }) + + // The fee a quote reports is derived from the (bumped) gas fields above. + const quote = await account.quoteSendTransaction(overrideTx) + logResult('Fee Estimate (with overrides)', { fee: formatWei(quote.fee) }) + + if (!actuallySend) { + console.log('\nSkipping actual send (set ACTUALLY_SEND=true to send)') + wallet.dispose() + console.log('\nDone.') + return + } + + console.log('\nSending real UserOperation with gas overrides...') + const result = await account.sendTransaction(overrideTx) + + // Jiffyscan shows the exact gas fields the bundler received -- compare them + // against the "Override gas" values printed above to confirm the bump took. + const explorerUrl = `https://jiffyscan.xyz/userOpHash/${result.hash}?network=sepolia` + logResult('UserOperation Sent', { + hash: result.hash, + fee: formatWei(result.fee), + explorer: explorerUrl, + }) + + console.log('\nWaiting for the UserOperation to be included on-chain...') + let receipt = null + for (let i = 0; i < 12 && !receipt; i++) { + await sleep(5_000) + receipt = await account.getUserOperationReceipt(result.hash) + } + + if (receipt) { + logResult('On-Chain Receipt', { + success: receipt.success, + actualGasCost: formatWei(receipt.actualGasCost), + actualGasUsed: receipt.actualGasUsed, + }) + } else { + console.log('Receipt not available yet -- check the explorer link above.') + } + + console.log(`\nOpen the explorer link to confirm the bumped gas fields are reflected on-chain:\n ${explorerUrl}`) + + wallet.dispose() + console.log('\nDone.') +} + +main().catch((err) => { + console.error('Error:', err.message) + process.exit(1) +}) diff --git a/wallet-evm-erc-4337/send-transaction.ts b/wallet-evm-erc-4337/send-transaction.ts index 02dbc74..4296f85 100644 --- a/wallet-evm-erc-4337/send-transaction.ts +++ b/wallet-evm-erc-4337/send-transaction.ts @@ -24,7 +24,6 @@ async function main() { chainId: config.chainId, provider: config.rpcUrl, bundlerUrl: config.bundlerUrl, - entryPointAddress: config.entryPointAddress, safeModulesVersion: config.safeModulesVersion, useNativeCoins: true, }) diff --git a/wallet-evm-erc-4337/sign-transaction.ts b/wallet-evm-erc-4337/sign-transaction.ts new file mode 100644 index 0000000..c8916e8 --- /dev/null +++ b/wallet-evm-erc-4337/sign-transaction.ts @@ -0,0 +1,73 @@ +/** + * EVM ERC-4337 Example: Sign Transaction (without broadcasting) + * + * Demonstrates: Building and signing a UserOperation with signTransaction() + * without sending it to the bundler. This is useful when you want to inspect, + * store, or relay the signed UserOperation yourself instead of letting the + * wallet broadcast it. + * + * signTransaction() returns a fully-populated, signed UserOperationV7. It + * accepts the same EvmErc4337Transaction shape as sendTransaction(), so the + * gas-override fields work here too. + * + * No transaction is broadcast by this example -- signing is a local operation + * (the wallet still quotes the fee, which contacts the bundler/RPC). + * + * Run: npx tsx wallet-evm-erc-4337/sign-transaction.ts + */ + +import WalletManagerEvmErc4337, { + type EvmErc4337Transaction, +} from '@tetherto/wdk-wallet-evm-erc-4337' +import { loadErc4337Config } from '../shared/config.js' +import { logSection, logResult, formatWei } from '../shared/helpers.js' + +async function main() { + const config = loadErc4337Config() + + logSection('Sign Transaction (ERC-4337 UserOperation)') + + const wallet = new WalletManagerEvmErc4337(config.seedPhrase, { + chainId: config.chainId, + provider: config.rpcUrl, + bundlerUrl: config.bundlerUrl, + safeModulesVersion: config.safeModulesVersion, + useNativeCoins: true, + }) + + const account = await wallet.getAccount(0) + const address = await account.getAddress() + logResult('Smart Account (signer)', { address }) + + const tx: EvmErc4337Transaction = { + to: config.recipientAddress, + value: 0n, + data: '0x', + } + + // Build and sign the UserOperation locally -- nothing is broadcast. + const userOp = await account.signTransaction(tx) + + logResult('Signed UserOperation', { + sender: userOp.sender, + nonce: userOp.nonce, + callGasLimit: userOp.callGasLimit, + verificationGasLimit: userOp.verificationGasLimit, + preVerificationGas: userOp.preVerificationGas, + maxFeePerGas: formatWei(userOp.maxFeePerGas), + maxPriorityFeePerGas: formatWei(userOp.maxPriorityFeePerGas), + }) + + // The signature is what makes this UserOperation ready to relay to a bundler. + logResult('Signature', { signature: userOp.signature }) + + console.log('\nThe signed UserOperation can now be inspected, stored, or relayed to a bundler.') + + wallet.dispose() + console.log('\nDone.') +} + +main().catch((err) => { + console.error('Error:', err.message) + process.exit(1) +}) diff --git a/wallet-evm-erc-4337/sign-verify-message.ts b/wallet-evm-erc-4337/sign-verify-message.ts index cc44cef..e2ed039 100644 --- a/wallet-evm-erc-4337/sign-verify-message.ts +++ b/wallet-evm-erc-4337/sign-verify-message.ts @@ -20,7 +20,6 @@ async function main() { chainId: config.chainId, provider: config.rpcUrl, bundlerUrl: config.bundlerUrl, - entryPointAddress: config.entryPointAddress, safeModulesVersion: config.safeModulesVersion, useNativeCoins: true, }) diff --git a/wallet-evm-erc-4337/token-transfer.ts b/wallet-evm-erc-4337/token-transfer.ts index cbba350..c0c7583 100644 --- a/wallet-evm-erc-4337/token-transfer.ts +++ b/wallet-evm-erc-4337/token-transfer.ts @@ -24,7 +24,6 @@ async function main() { chainId: config.chainId, provider: config.rpcUrl, bundlerUrl: config.bundlerUrl, - entryPointAddress: config.entryPointAddress, safeModulesVersion: config.safeModulesVersion, useNativeCoins: true, }) From 84aa20afb72c113a7d51c74c130b39af35f9dd72 Mon Sep 17 00:00:00 2001 From: claudiovb Date: Mon, 1 Jun 2026 19:30:28 -0300 Subject: [PATCH 2/2] updated to latest release --- package-lock.json | 138 +++++++++++++++++++++++++++------------------- package.json | 2 +- 2 files changed, 83 insertions(+), 57 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2430b24..33372d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@tetherto/wdk-protocol-swap-velora-evm": "^1.0.0-beta.4", "@tetherto/wdk-wallet-btc": "^1.0.0-beta.8", "@tetherto/wdk-wallet-evm": "latest", - "@tetherto/wdk-wallet-evm-erc-4337": "git+https://github.com/tetherto/wdk-wallet-evm-erc-4337.git#main", + "@tetherto/wdk-wallet-evm-erc-4337": "latest", "@tetherto/wdk-wallet-solana": "latest", "@tetherto/wdk-wallet-ton": "latest", "@tetherto/wdk-wallet-tron": "latest", @@ -5550,40 +5550,17 @@ } }, "node_modules/@tetherto/wdk-wallet-evm-erc-4337": { - "version": "1.0.0-beta.7", - "resolved": "git+ssh://git@github.com/tetherto/wdk-wallet-evm-erc-4337.git#1f3b3061bfcb29fb58ae3322b1866163c51d89b9", + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet-evm-erc-4337/-/wdk-wallet-evm-erc-4337-1.0.0-beta.8.tgz", + "integrity": "sha512-xICw+eZV1WuRb6KFwk/2Dx73k1yzEZ0WTbppWPjwf2WQcjBo0Scccx90dz4Mx1v83Tms1K6xi/mHtKGxbz8oGQ==", "license": "Apache-2.0", "dependencies": { "@tetherto/wdk-failover-provider": "1.0.0-beta.2", "@tetherto/wdk-wallet": "1.0.0-beta.9", - "@tetherto/wdk-wallet-evm": "1.0.0-beta.12", + "@tetherto/wdk-wallet-evm": "1.0.0-beta.13", "abstractionkit": "0.3.8", "bare-node-runtime": "^1.1.4", - "ethers": "6.14.4" - } - }, - "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@noble/curves": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", - "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", - "license": "MIT", - "dependencies": { - "@noble/hashes": "1.3.2" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "license": "MIT", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "ethers": "6.16.0" } }, "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-failover-provider": { @@ -5603,9 +5580,9 @@ } }, "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm": { - "version": "1.0.0-beta.12", - "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet-evm/-/wdk-wallet-evm-1.0.0-beta.12.tgz", - "integrity": "sha512-y101FMTrj9Ys67d80RE9La8B2RAd2jckD5+d50c/Wa8tCNa0uUsTf7YIjVssvfmYFrXUL8uq4vMA0fcJwNFIoQ==", + "version": "1.0.0-beta.13", + "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet-evm/-/wdk-wallet-evm-1.0.0-beta.13.tgz", + "integrity": "sha512-urDlr0u4xxiFgC1/TaXmgntuLH939A8GIZNc8r0fmJX6u+iphnnmgrvw6E3mX1OIAnTB9Tqdr8N08QS1G6AhrQ==", "license": "Apache-2.0", "dependencies": { "@noble/curves": "1.9.2", @@ -5619,47 +5596,72 @@ "sodium-universal": "5.0.1" } }, - "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm/node_modules/@noble/curves": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.2.tgz", - "integrity": "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g==", + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm/node_modules/@tetherto/wdk-wallet": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet/-/wdk-wallet-1.0.0-beta.8.tgz", + "integrity": "sha512-eCOpPbgRrwVuB7mJS1zGVVN47n/pvX5gLRG+WERH0NmpcIS8OHxa4DYuTJ9P1qEZYRvYl4XOSrhfizC/foonDQ==", + "license": "Apache-2.0", + "dependencies": { + "bare-node-runtime": "^1.1.4", + "bip39": "3.1.0" + } + }, + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm/node_modules/ethers": { + "version": "6.14.4", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.14.4.tgz", + "integrity": "sha512-Jm/dzRs2Z9iBrT6e9TvGxyb5YVKAPLlpna7hjxH7KH/++DSh2T/JVmQUv7iHI5E55hDbp/gEVvstWYXVxXFzsA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "license": "MIT", "dependencies": { - "@noble/hashes": "1.8.0" + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" }, "engines": { - "node": "^14.21.3 || >=16" + "node": ">=14.0.0" + } + }, + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm/node_modules/ethers/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.3.2" }, "funding": { "url": "https://paulmillr.com/funding/" } }, - "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm/node_modules/@noble/hashes": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", - "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm/node_modules/ethers/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", "license": "MIT", "engines": { - "node": "^14.21.3 || >=16" + "node": ">= 16" }, "funding": { "url": "https://paulmillr.com/funding/" } }, - "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/@tetherto/wdk-wallet-evm/node_modules/@tetherto/wdk-wallet": { - "version": "1.0.0-beta.8", - "resolved": "https://registry.npmjs.org/@tetherto/wdk-wallet/-/wdk-wallet-1.0.0-beta.8.tgz", - "integrity": "sha512-eCOpPbgRrwVuB7mJS1zGVVN47n/pvX5gLRG+WERH0NmpcIS8OHxa4DYuTJ9P1qEZYRvYl4XOSrhfizC/foonDQ==", - "license": "Apache-2.0", - "dependencies": { - "bare-node-runtime": "^1.1.4", - "bip39": "3.1.0" - } - }, "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/ethers": { - "version": "6.14.4", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.14.4.tgz", - "integrity": "sha512-Jm/dzRs2Z9iBrT6e9TvGxyb5YVKAPLlpna7hjxH7KH/++DSh2T/JVmQUv7iHI5E55hDbp/gEVvstWYXVxXFzsA==", + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.16.0.tgz", + "integrity": "sha512-U1wulmetNymijEhpSEQ7Ct/P/Jw9/e7R1j5XIbPRydgV2DjLVMsULDlNksq3RQnFgKoLlZf88ijYtWEXcPa07A==", "funding": [ { "type": "individual", @@ -5684,6 +5686,30 @@ "node": ">=14.0.0" } }, + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/ethers/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/ethers/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@tetherto/wdk-wallet-evm-erc-4337/node_modules/tslib": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", diff --git a/package.json b/package.json index 69bb081..3c3c8c8 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@tetherto/wdk-protocol-swap-velora-evm": "^1.0.0-beta.4", "@tetherto/wdk-wallet-btc": "^1.0.0-beta.8", "@tetherto/wdk-wallet-evm": "latest", - "@tetherto/wdk-wallet-evm-erc-4337": "git+https://github.com/tetherto/wdk-wallet-evm-erc-4337.git#main", + "@tetherto/wdk-wallet-evm-erc-4337": "latest", "@tetherto/wdk-wallet-solana": "latest", "@tetherto/wdk-wallet-ton": "latest", "@tetherto/wdk-wallet-tron": "latest",