From d796088b9beb8b9fa49f93cddbd708002187ef52 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Mon, 19 Aug 2024 16:32:26 +0200 Subject: [PATCH 01/20] chore: upgrade celo dependencies (closes https://github.com/LedgerHQ/ledger-live/issues/7551) --- .changeset/nasty-boats-chew.md | 5 + .pnpmfile.cjs | 14 - libs/ledger-live-common/package.json | 10 +- pnpm-lock.yaml | 930 +++++++++++++++++---------- 4 files changed, 595 insertions(+), 364 deletions(-) create mode 100644 .changeset/nasty-boats-chew.md diff --git a/.changeset/nasty-boats-chew.md b/.changeset/nasty-boats-chew.md new file mode 100644 index 000000000000..9719ce050055 --- /dev/null +++ b/.changeset/nasty-boats-chew.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/live-common": patch +--- + +Upgrade @celo/\* dependencies for compatibility with Celo as Layer 2 diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs index 2ae98589f2d5..e13dbdc7cad4 100644 --- a/.pnpmfile.cjs +++ b/.pnpmfile.cjs @@ -62,20 +62,6 @@ function readPackage(pkg, context) { addPeerDependencies("@storybook/addon-react-native-web", { webpack: "*", }), - /* @celo/* packages */ - addDependencies(/@celo\/(?!base)+/, { "@celo/base": `^${pkg.version}` }), - addDependencies("@celo/connect", { - "@celo/base": `^${pkg.version}`, - "web3-eth-contract": pkg.peerDependencies?.web3 ?? "*", - }), - addDependencies("@celo/contractkit", { - "web3-utils": pkg.dependencies?.["web3"], - }), - addDependencies("@celo/utils", { - "fp-ts": "*", - rlp: "*", - }), - /* @cosmjs/* packages */ addDependencies("@cosmjs/proto-signing", { "@cosmjs/crypto": pkg.version, "@cosmjs/encoding": pkg.version, diff --git a/libs/ledger-live-common/package.json b/libs/ledger-live-common/package.json index 956cdf109756..cd705940c897 100644 --- a/libs/ledger-live-common/package.json +++ b/libs/ledger-live-common/package.json @@ -121,11 +121,11 @@ "dependencies": { "@blooo/hw-app-acre": "^1.0.1", "@cardano-foundation/ledgerjs-hw-app-cardano": "^7.1.2", - "@celo/connect": "^3.0.1", - "@celo/contractkit": "^3.0.1", - "@celo/utils": "^3.0.1", - "@celo/wallet-base": "^3.0.1", - "@celo/wallet-ledger": "^3.0.1", + "@celo/connect": "^6.0.1", + "@celo/contractkit": "^8.1.1", + "@celo/utils": "^7.0.0", + "@celo/wallet-base": "^6.0.1", + "@celo/wallet-ledger": "^6.0.1", "@crypto-org-chain/chain-jslib": "1.1.2", "@dfinity/agent": "^0.21.0", "@dfinity/candid": "^0.21.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0cbfcedb0e61..712b61bfb3ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ overrides: packageExtensionsChecksum: bcc0ac67c2d7bcc88fe46412ebcf46be -pnpmfileChecksum: ju3gjuq3tfou7jpj6cwyr6jtr4 +pnpmfileChecksum: 5u75dtojn5ihmrmct6hd2yqpdq patchedDependencies: '@changesets/get-github-info@0.6.0': @@ -3488,20 +3488,20 @@ importers: specifier: ^7.1.2 version: 7.1.2 '@celo/connect': - specifier: ^3.0.1 - version: 3.2.0 + specifier: ^6.0.1 + version: 6.0.1 '@celo/contractkit': - specifier: ^3.0.1 - version: 3.2.0 + specifier: ^8.1.1 + version: 8.1.1 '@celo/utils': - specifier: ^3.0.1 - version: 3.2.0 + specifier: ^7.0.0 + version: 7.0.0 '@celo/wallet-base': - specifier: ^3.0.1 - version: 3.2.0 + specifier: ^6.0.1 + version: 6.0.1 '@celo/wallet-ledger': - specifier: ^3.0.1 - version: 3.2.0 + specifier: ^6.0.1 + version: 6.0.1 '@crypto-org-chain/chain-jslib': specifier: 1.1.2 version: 1.1.2 @@ -8685,40 +8685,55 @@ packages: '@casperlabs/ts-results@3.3.5': resolution: {integrity: sha512-ymSQqqb4mOSet592li02u1Gd28LoOFJUm6R3jkdNQ+nqsnbHvN+izBigtP4aYmNwh6gFyCwDgjYporEJgDT4eA==} - '@celo/base@3.2.0': - resolution: {integrity: sha512-9wfZYiYv7dzt17a29fxU6sV7JssyXfpSQ9kPSpfOlsewPICXwfOMQ+25Jn6xZu20Vx9rmKebmLHiQyiuYEDOcQ==} + '@celo/abis@11.0.0': + resolution: {integrity: sha512-rPjHQxHbWaKQU3MX6hE3A3xRkBFBphjFvfCs4t+19dqPPys6Q+cneHmRWGBX4NLiBh5BLZcNZjQoMf2jxRLMpg==} + + '@celo/abis@12.0.0-canary.16': + resolution: {integrity: sha512-nbynuyhXUZKQTEUlkvQaWI7y4lPXa5xuVLJDLqzNfWbF27E6V1xGoMNUK4XxzmTC161VOPp18Guah2C49kXQ0w==} - '@celo/connect@3.2.0': - resolution: {integrity: sha512-iLOLo8d1OqNcX827/iCfWCeWaewUl0kyhL1xgyXrf//YaPU+ljKtruJmiLLrxkfdB/etWUdcryrbmuUhjHZmKg==} - engines: {node: '>=8.13.0'} - deprecated: Versions less than 5.1 are deprecated and will no longer be able to submit transactions to celo in a future hardfork + '@celo/base@6.1.0': + resolution: {integrity: sha512-R6ko2QCfEU32akBsaSNsDYduktgwIKHcJ61SbR7EsXA1VE31/44Qh8kMzfgeahyk375DUCe3pJIKwx5zg1tFHg==} + + '@celo/connect@6.0.1': + resolution: {integrity: sha512-nMWivxDeXSILRqsnFZNDz4Rv3eX3xj7++16LT03m5fa6GvlfLvxx1jQ1yv6Hf2Z8yvHEeL36zzBIfqyHOyF99Q==} + engines: {node: '>=8.14.2'} peerDependencies: - web3: 1.3.6 + web3: 1.10.4 - '@celo/contractkit@3.2.0': - resolution: {integrity: sha512-kt4ViBRMg7ezCPi2SdcrYdDorA1Meg/qk97/u4izEIthl9GM4QSRfhhHYsbXYm0NV/MZ2BkS0cCsQ/SHcILSaA==} - engines: {node: '>=8.13.0'} - deprecated: Versions less than 5.1 are deprecated and will no longer be able to submit transactions to celo in a future hardfork + '@celo/contractkit@8.1.1': + resolution: {integrity: sha512-EUZaoo8BQIkXKWF4h0UI9yNmVAsDSsDOjTB5C4RrdDkylzn7PGICPmUMq/9WU2QH1zFV9kf1JpGzxlA8Uci6MQ==} + engines: {node: '>=8.14.2'} - '@celo/utils@3.2.0': - resolution: {integrity: sha512-Om1mTzwsdV6FVPvraafcJeRnzz7Xv/lyGmyZaoEZ9fErRadu9ZrOsuDQniYe+lD78DQ0NATxJL04WjhEKVkn+A==} + '@celo/ledger-token-signer@0.4.0': + resolution: {integrity: sha512-8uedsklE2ygKnJiy/nbnNde3KHlhp0PaEyKTc2Eq/FFiIE6NfBosdvJbLQHemq15jJccPcJQohfSqbrfOpRyzg==} - '@celo/wallet-base@3.2.0': - resolution: {integrity: sha512-lwhesT2BkXIyPI/ox/QbVVCRtLzTAGO25M3TlWBfSCzkRAf/AiV41lzEf9J7A1ozDKXS9s7bj8odiRkMAcelyQ==} - engines: {node: '>=8.13.0'} - deprecated: Versions less than 5.1 are deprecated and will no longer be able to submit transactions to celo in a future hardfork + '@celo/utils@7.0.0': + resolution: {integrity: sha512-oxAMm19lMs3myhHt2BpuWm01mxZ9ZD73uydQFdgeVj5cNVRKumzMGSEfb0qCQ2hiCHL15R/lCtBqqiRy0wD1LA==} - '@celo/wallet-ledger@3.2.0': - resolution: {integrity: sha512-z/C+QPnZKdrgYgWCBf++bw9wVXcTgUBooHouWQgdCeyX12RHRJ9WpNOi5v0wx5YyG+M7aNAWHphOklA3e+XBQg==} - engines: {node: '>=8.13.0'} + '@celo/wallet-base@6.0.1': + resolution: {integrity: sha512-6vZxEkm6VcT/LmKDnyxmS6n8YWEUo20E5tccY8XrBxcLAPinaiLfcwEQsgvspIB6m4hG/AH3qtuKby5nC4T/6g==} + engines: {node: '>=8.14.2'} - '@celo/wallet-local@3.2.0': - resolution: {integrity: sha512-hR70gzNCDHgf/GskaaLtB7Jz4AqJEW0b+1jG1rsuAyaXLJomSRADGBwUUgMy1dKU87fcQ9h7Uh+AuRAP4/5COQ==} - engines: {node: '>=8.13.0'} + '@celo/wallet-ledger@6.0.1': + resolution: {integrity: sha512-gPUJX2zhtNT9xwVKyVjrMZR0cTgQceF+AUbgOYjigMEwctnjBtfxkmUAL12gmTNIF0j4nyPx7Gil8Le0aFNdfg==} + engines: {node: '>=8.14.2'} - '@celo/wallet-remote@3.2.0': - resolution: {integrity: sha512-ORT5PB1M5+wKg/LXcIy4hZ4X01qoMCYlKCH/5LuIMzMb/8IxsW7/9oPwdqutG7YaM9EJoNgOn1snkmAXPeE+hg==} - engines: {node: '>=8.13.0'} + '@celo/wallet-local@6.0.1': + resolution: {integrity: sha512-bSf7qxAs4ONEDrpdJZRqiayWWyKsO7fu2ai8PDQsICnLw8ZsyVP7+oNgr7zberHk6ghdmG1Qp957a0Myw7w6lA==} + engines: {node: '>=8.14.2'} + + '@celo/wallet-remote@6.0.1': + resolution: {integrity: sha512-eQVyg11s8ncL+CC5R4aqisli8sPREyVJk6doh2DhUGoNbG0Opx8ZiEZ+z1QPDs1bX1U9zY61Jctpd8e7B9UrrQ==} + engines: {node: '>=8.14.2'} + + '@chainsafe/as-sha256@0.3.1': + resolution: {integrity: sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==} + + '@chainsafe/persistent-merkle-tree@0.4.2': + resolution: {integrity: sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==} + + '@chainsafe/ssz@0.9.4': + resolution: {integrity: sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==} '@changesets/apply-release-plan@7.0.4': resolution: {integrity: sha512-HLFwhKWayKinWAul0Vj+76jVx1Pc2v55MGPVjZ924Y/ROeSsBMFutv9heHmCUj48lJyRfOTJG5+ar+29FUky/A==} @@ -9717,9 +9732,27 @@ packages: '@ethereumjs/common@2.6.5': resolution: {integrity: sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==} + '@ethereumjs/rlp@4.0.1': + resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==} + engines: {node: '>=14'} + hasBin: true + + '@ethereumjs/rlp@5.0.2': + resolution: {integrity: sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==} + engines: {node: '>=18'} + hasBin: true + '@ethereumjs/tx@3.5.2': resolution: {integrity: sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==} + '@ethereumjs/util@8.0.5': + resolution: {integrity: sha512-259rXKK3b3D8HRVdRmlOEi6QFvwxdt304hhrEAmpZhsj7ufXEOTIc9JRZPMnXatKjECokdLNBcDOFBeBSzAIaw==} + engines: {node: '>=14'} + + '@ethereumjs/util@8.1.0': + resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} + engines: {node: '>=14'} + '@ethersproject/abi@5.0.7': resolution: {integrity: sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==} @@ -10635,22 +10668,32 @@ packages: '@types/react': optional: true + '@ledgerhq/cryptoassets@13.3.0': + resolution: {integrity: sha512-OeJ1fTd/vuSiwSBkgQTnTrp+VB1S3MsJRwQ2fxRD1eeqyRvmC0rzpklSlx0I3XVsGUU5MHxQ5anfceA6Mxkrrw==} + + '@ledgerhq/domain-service@1.2.3': + resolution: {integrity: sha512-q46q4fxnZgS7Fn+4P+UKJD4ccSZftljq4Jj36J8dNhuj+fdi0JG1B2B1pk4HbfkaWPMcpbNLXx4NyriN7+ncEQ==} + '@ledgerhq/errors@5.50.0': resolution: {integrity: sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==} '@ledgerhq/errors@6.19.1': resolution: {integrity: sha512-75yK7Nnit/Gp7gdrJAz0ipp31CCgncRp+evWt6QawQEtQKYEDfGo10QywgrrBBixeRxwnMy1DP6g2oCWRf1bjw==} - '@ledgerhq/hw-app-eth@5.11.0': - resolution: {integrity: sha512-qgpPwZzM8UMHYMC5+9xYV2O+8kgkDAl9+38w9JiBksaGmUFqcS4najsB1nj6AWf2rGEuXdKMb2WEYRskVypJrA==} + '@ledgerhq/evm-tools@1.2.0': + resolution: {integrity: sha512-cuBcACAMyUqYcJGipFJJwTGtKn6mVHInLHgoXPhI+rtbCa89AgehDP+LTb4PiVn0kZQnK7JD1xn6Jyyr/r7gaw==} + + '@ledgerhq/hw-app-eth@https://codeload.github.com/celo-org/ledgerjs-hw-app-eth/tar.gz/49bdd4f163f5ff73daa9f54f8e46aa2882b85f44': + resolution: {tarball: https://codeload.github.com/celo-org/ledgerjs-hw-app-eth/tar.gz/49bdd4f163f5ff73daa9f54f8e46aa2882b85f44} + version: 6.37.1 + + '@ledgerhq/hw-transport-mocker@6.29.2': + resolution: {integrity: sha512-s+YcMy0Bna6r1Sm6qiawrd8FBE6AJhUTIUqBxP9n7OuzaIGKdf/Y++16PWfNE1rBuzplbzBDRBLAa4XnQ8uCEA==} '@ledgerhq/hw-transport-u2f@5.36.0-deprecated': resolution: {integrity: sha512-T/+mGHIiUK/ZQATad6DMDmobCMZ1mVST952009jKzhaE1Et2Uy2secU+QhRkx3BfEAkvwa0zSRSYCL9d20Iqjg==} deprecated: '@ledgerhq/hw-transport-u2f is deprecated. Please use @ledgerhq/hw-transport-webusb or @ledgerhq/hw-transport-webhid. https://github.com/LedgerHQ/ledgerjs/blob/master/docs/migrate_webusb.md' - '@ledgerhq/hw-transport@5.11.0': - resolution: {integrity: sha512-z56iwv0DZZu20T5q9sNMHFQNVuRKYqzCuNFhY9woWSpmOQkyVHCRiEgOQbN5h6kVri6fkfPkDzqqcsYjJlnT9g==} - '@ledgerhq/hw-transport@5.51.1': resolution: {integrity: sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw==} @@ -10684,12 +10727,24 @@ packages: '@ledgerhq/live-app-sdk@0.8.2': resolution: {integrity: sha512-yD+L02pAwTfjeSyixWkfqlh6Xg3yAGFnFitrcHk2WWUtKg1TVmNpWNHLS22LKYYWJ7Lflj/pLLQ0nKm1OsJB9g==} + '@ledgerhq/live-env@2.2.0': + resolution: {integrity: sha512-8cNEk8nvHcgovyIFujPI7Ynr+eJvNwiOE0regn685i4ISK7T5MTQGoIhONYbBxorWRhQaxXWyT8svB8ZwPgKmQ==} + '@ledgerhq/logs@5.50.0': resolution: {integrity: sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA==} '@ledgerhq/logs@6.12.0': resolution: {integrity: sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA==} + '@ledgerhq/types-cryptoassets@7.15.0': + resolution: {integrity: sha512-W+CUX9QFIDdwCQt7HNLdSjufAMipTVLGQtPgrw54oeLqWoE75My9/+JjnuZkZB8fBa052EF4pSBcg3YSUelg0g==} + + '@ledgerhq/types-devices@6.25.3': + resolution: {integrity: sha512-AUThbVlRugs9sVJGbwQuZGXr0ZKDClQySFERhqCyeHKQAdO9TJ9pKFth/9wKKAo5i7fYRC9sx0P5CvPqOwLqIw==} + + '@ledgerhq/types-live@6.50.0': + resolution: {integrity: sha512-6+PQ8/vG1inO0z1wauYdtyWZYKClm+rTigdFBrAuUBYkdkvf9j4TRR0Ekn98qXuWYwjq38rTY9M5C/q2L64oZw==} + '@ledgerhq/wallet-api-client-react@1.3.12': resolution: {integrity: sha512-hf7OlhGtj6yuo42OGyKt0dMPNoIpBHm7u1vTH40yWfsabFaDtPzJFGSkWhBb19/zRtDGpbFr3Plo/WnBLFDfXQ==} peerDependencies: @@ -11033,6 +11088,9 @@ packages: '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==} + '@noble/ciphers@0.4.1': + resolution: {integrity: sha512-QCOA9cgf3Rc33owG0AYBB9wszz+Ul2kramWN8tXG44Gyciud/tbkEqvxRF/IpqQaBpRBNi9f4jdNxqB2CQCIXg==} + '@noble/curves@1.2.0': resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} @@ -11048,6 +11106,9 @@ packages: '@noble/hashes@1.1.5': resolution: {integrity: sha512-LTMZiiLc+V4v1Yi16TD6aX2gmtKszNye0pQgbaLqkvhIqP7nVsSaJsWloGQjJfJ8offaoP5GtX3yY5swbcJxxQ==} + '@noble/hashes@1.2.0': + resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} + '@noble/hashes@1.3.2': resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} @@ -12566,12 +12627,18 @@ packages: '@scure/base@1.1.6': resolution: {integrity: sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==} + '@scure/bip32@1.1.5': + resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} + '@scure/bip32@1.3.3': resolution: {integrity: sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==} '@scure/bip32@1.4.0': resolution: {integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==} + '@scure/bip39@1.1.1': + resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==} + '@scure/bip39@1.2.2': resolution: {integrity: sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==} @@ -14679,6 +14746,10 @@ packages: resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} engines: {node: '>=10'} + '@szmarczak/http-timer@5.0.1': + resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} + engines: {node: '>=14.16'} + '@tanstack/query-core@5.28.9': resolution: {integrity: sha512-hNlfCiqZevr3GRVPXS3MhaGW5hjcxvCsIQ4q6ff7EPlvFwYZaS+0d9EIIgofnegDaU2BbCDlyURoYfRl5rmzow==} @@ -15050,12 +15121,15 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} +<<<<<<< HEAD '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} '@types/ethereumjs-util@5.2.0': resolution: {integrity: sha512-qwQgQqXXTRv2h2AlJef+tMEszLFkCB9dWnrJYIdAwqjubERXEc/geB+S3apRw0yQyTVnsBf8r6BhlrE8vx+3WQ==} +======= +>>>>>>> d098269cea (chore: upgrade celo dependencies (closes https://github.com/LedgerHQ/ledger-live/issues/7551)) '@types/events@3.0.3': resolution: {integrity: sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g==} @@ -16101,6 +16175,9 @@ packages: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} + abortcontroller-polyfill@1.7.5: + resolution: {integrity: sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==} + abstract-leveldown@0.12.4: resolution: {integrity: sha512-TOod9d5RDExo6STLMGa+04HGkl+TlMfbDnTyN93/ETJ9DpQ0DaYLqcMZlbXvdc4W3vVo1Qrl+WhSp8zvDsJ+jA==} @@ -17286,6 +17363,10 @@ packages: resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} engines: {node: '>=10.6.0'} + cacheable-lookup@6.1.0: + resolution: {integrity: sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==} + engines: {node: '>=10.6.0'} + cacheable-request@6.1.0: resolution: {integrity: sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==} engines: {node: '>=8'} @@ -17363,6 +17444,10 @@ packages: resolution: {integrity: sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==} engines: {node: '>=4'} + case@1.6.3: + resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} + engines: {node: '>= 0.8.0'} + caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -18185,9 +18270,15 @@ packages: engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} hasBin: true + cross-fetch@3.1.5: + resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} + cross-fetch@3.1.8: resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + cross-fetch@4.0.0: + resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} + cross-sha256@1.2.0: resolution: {integrity: sha512-KViLNMDZKV7jwFqjFx+rNhG26amnFYYQ0S+VaFlVvpk8tM+2XbFia/don/SjGHg9WQxnFVi6z64CGPuF3T+nNw==} @@ -19726,23 +19817,12 @@ packages: ethereum-cryptography@0.1.3: resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} + ethereum-cryptography@1.2.0: + resolution: {integrity: sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==} + ethereum-cryptography@2.1.3: resolution: {integrity: sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==} - ethereumjs-common@1.5.2: - resolution: {integrity: sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==} - deprecated: 'New package name format for new versions: @ethereumjs/common. Please update.' - - ethereumjs-tx@2.1.2: - resolution: {integrity: sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==} - deprecated: 'New package name format for new versions: @ethereumjs/tx. Please update.' - - ethereumjs-util@5.2.1: - resolution: {integrity: sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==} - - ethereumjs-util@6.2.1: - resolution: {integrity: sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==} - ethereumjs-util@7.1.5: resolution: {integrity: sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==} engines: {node: '>=10.0.0'} @@ -19758,10 +19838,6 @@ packages: resolution: {integrity: sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==} engines: {node: '>=6.5.0', npm: '>=3'} - ethjs-util@0.1.6: - resolution: {integrity: sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==} - engines: {node: '>=6.5.0', npm: '>=3'} - event-emitter@0.3.5: resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} @@ -20714,6 +20790,9 @@ packages: typescript: '>3.6.0' webpack: ^5.11.0 + form-data-encoder@1.7.1: + resolution: {integrity: sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==} + form-data@2.3.3: resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} engines: {node: '>= 0.12'} @@ -20748,9 +20827,6 @@ packages: fp-ts@2.1.1: resolution: {integrity: sha512-YcWhMdDCFCja0MmaDroTgNu+NWWrrnUEn92nvDgrtVy9Z71YFnhNVIghoHPt8gs82ijoMzFGeWKvArbyICiJgw==} - fp-ts@2.16.5: - resolution: {integrity: sha512-N8T8PwMSeTKKtkm9lkj/zSTAnPC/aJIIrQhnHxxkL0KLsRCNUPANksJOlMXxcKKCo7H1ORP3No9EMD+fP0tsdA==} - fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} @@ -21090,6 +21166,10 @@ packages: resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} engines: {node: '>=10.19.0'} + got@12.1.0: + resolution: {integrity: sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==} + engines: {node: '>=14.16'} + got@9.6.0: resolution: {integrity: sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==} engines: {node: '>=8.6'} @@ -21473,6 +21553,10 @@ packages: resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} engines: {node: '>=10.19.0'} + http2-wrapper@2.2.1: + resolution: {integrity: sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==} + engines: {node: '>=10.19.0'} + https-browserify@1.0.0: resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} @@ -23562,6 +23646,10 @@ packages: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} + lowercase-keys@3.0.0: + resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + lru-cache@10.2.0: resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} engines: {node: 14 || >=16.14} @@ -24051,6 +24139,9 @@ packages: engines: {node: '>=18'} hasBin: true + micro-ftch@0.3.1: + resolution: {integrity: sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==} + micromark-core-commonmark@1.1.0: resolution: {integrity: sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==} @@ -25092,6 +25183,10 @@ packages: resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} engines: {node: '>=8'} + p-cancelable@3.0.0: + resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} + engines: {node: '>=12.20'} + p-filter@2.1.0: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} engines: {node: '>=8'} @@ -30033,168 +30128,168 @@ packages: web-worker@1.3.0: resolution: {integrity: sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==} - web3-bzz@1.3.6: - resolution: {integrity: sha512-ibHdx1wkseujFejrtY7ZyC0QxQ4ATXjzcNUpaLrvM6AEae8prUiyT/OloG9FWDgFD2CPLwzKwfSQezYQlANNlw==} + web3-bzz@1.10.4: + resolution: {integrity: sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw==} engines: {node: '>=8.0.0'} web3-bzz@1.5.2: resolution: {integrity: sha512-W/sPCdA+XQ9duUYKHAwf/g69cbbV8gTCRsa1MpZwU7spXECiyJ2EvD/QzAZ+UpJk3GELXFF/fUByeZ3VRQKF2g==} engines: {node: '>=8.0.0'} - web3-core-helpers@1.3.6: - resolution: {integrity: sha512-nhtjA2ZbkppjlxTSwG0Ttu6FcPkVu1rCN5IFAOVpF/L0SEt+jy+O5l90+cjDq0jAYvlBwUwnbh2mR9hwDEJCNA==} + web3-core-helpers@1.10.4: + resolution: {integrity: sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==} engines: {node: '>=8.0.0'} web3-core-helpers@1.5.2: resolution: {integrity: sha512-U7LJoeUdQ3aY9t5gU7t/1XpcApsWm+4AcW5qKl/44ZxD44w0Dmsq1c5zJm3GuLr/a9MwQfXK4lpmvxVQWHHQRg==} engines: {node: '>=8.0.0'} - web3-core-method@1.3.6: - resolution: {integrity: sha512-RyegqVGxn0cyYW5yzAwkPlsSEynkdPiegd7RxgB4ak1eKk2Cv1q2x4C7D2sZjeeCEF+q6fOkVmo2OZNqS2iQxg==} + web3-core-method@1.10.4: + resolution: {integrity: sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA==} engines: {node: '>=8.0.0'} web3-core-method@1.5.2: resolution: {integrity: sha512-/mC5t9UjjJoQmJJqO5nWK41YHo+tMzFaT7Tp7jDCQsBkinE68KsUJkt0jzygpheW84Zra0DVp6q19gf96+cugg==} engines: {node: '>=8.0.0'} - web3-core-promievent@1.3.6: - resolution: {integrity: sha512-Z+QzfyYDTXD5wJmZO5wwnRO8bAAHEItT1XNSPVb4J1CToV/I/SbF7CuF8Uzh2jns0Cm1109o666H7StFFvzVKw==} + web3-core-promievent@1.10.4: + resolution: {integrity: sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ==} engines: {node: '>=8.0.0'} web3-core-promievent@1.5.2: resolution: {integrity: sha512-5DacbJXe98ozSor7JlkTNCy6G8945VunRRkPxMk98rUrg60ECVEM/vuefk1atACzjQsKx6tmLZuHxbJQ64TQeQ==} engines: {node: '>=8.0.0'} - web3-core-requestmanager@1.3.6: - resolution: {integrity: sha512-2rIaeuqeo7QN1Eex7aXP0ZqeteJEPWXYFS/M3r3LXMiV8R4STQBKE+//dnHJXoo2ctzEB5cgd+7NaJM8S3gPyA==} + web3-core-requestmanager@1.10.4: + resolution: {integrity: sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg==} engines: {node: '>=8.0.0'} web3-core-requestmanager@1.5.2: resolution: {integrity: sha512-oRVW9OrAsXN2JIZt68OEg1Mb1A9a/L3JAGMv15zLEFEnJEGw0KQsGK1ET2kvZBzvpFd5G0EVkYCnx7WDe4HSNw==} engines: {node: '>=8.0.0'} - web3-core-subscriptions@1.3.6: - resolution: {integrity: sha512-wi9Z9X5X75OKvxAg42GGIf81ttbNR2TxzkAsp1g+nnp5K8mBwgZvXrIsDuj7Z7gx72Y45mWJADCWjk/2vqNu8g==} + web3-core-subscriptions@1.10.4: + resolution: {integrity: sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw==} engines: {node: '>=8.0.0'} web3-core-subscriptions@1.5.2: resolution: {integrity: sha512-hapI4rKFk22yurtIv0BYvkraHsM7epA4iI8Np+HuH6P9DD0zj/llaps6TXLM9HyacLBRwmOLZmr+pHBsPopUnQ==} engines: {node: '>=8.0.0'} - web3-core@1.3.6: - resolution: {integrity: sha512-gkLDM4T1Sc0T+HZIwxrNrwPg0IfWI0oABSglP2X5ZbBAYVUeEATA0o92LWV8BeF+okvKXLK1Fek/p6axwM/h3Q==} + web3-core@1.10.4: + resolution: {integrity: sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==} engines: {node: '>=8.0.0'} web3-core@1.5.2: resolution: {integrity: sha512-sebMpQbg3kbh3vHUbHrlKGKOxDWqjgt8KatmTBsTAWj/HwWYVDzeX+2Q84+swNYsm2DrTBVFlqTErFUwPBvyaA==} engines: {node: '>=8.0.0'} - web3-eth-abi@1.3.6: - resolution: {integrity: sha512-Or5cRnZu6WzgScpmbkvC6bfNxR26hqiKK4i8sMPFeTUABQcb/FU3pBj7huBLYbp9dH+P5W79D2MqwbWwjj9DoQ==} + web3-eth-abi@1.10.4: + resolution: {integrity: sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ==} engines: {node: '>=8.0.0'} web3-eth-abi@1.5.2: resolution: {integrity: sha512-P3bJbDR5wib4kWGfVeBKBVi27T+AiHy4EJxYM6SMNbpm3DboLDdisu9YBd6INMs8rzxgnprBbGmmyn4jKIDKAA==} engines: {node: '>=8.0.0'} - web3-eth-accounts@1.3.6: - resolution: {integrity: sha512-Ilr0hG6ONbCdSlVKffasCmNwftD5HsNpwyQASevocIQwHdTlvlwO0tb3oGYuajbKOaDzNTwXfz25bttAEoFCGA==} + web3-eth-accounts@1.10.4: + resolution: {integrity: sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg==} engines: {node: '>=8.0.0'} web3-eth-accounts@1.5.2: resolution: {integrity: sha512-F8mtzxgEhxfLc66vPi0Gqd6mpscvvk7Ua575bsJ1p9J2X/VtuKgDgpWcU4e4LKeROQ+ouCpAG9//0j9jQuij3A==} engines: {node: '>=8.0.0'} - web3-eth-contract@1.3.6: - resolution: {integrity: sha512-8gDaRrLF2HCg+YEZN1ov0zN35vmtPnGf3h1DxmJQK5Wm2lRMLomz9rsWsuvig3UJMHqZAQKD7tOl3ocJocQsmA==} + web3-eth-contract@1.10.4: + resolution: {integrity: sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A==} engines: {node: '>=8.0.0'} web3-eth-contract@1.5.2: resolution: {integrity: sha512-4B8X/IPFxZCTmtENpdWXtyw5fskf2muyc3Jm5brBQRb4H3lVh1/ZyQy7vOIkdphyaXu4m8hBLHzeyKkd37mOUg==} engines: {node: '>=8.0.0'} - web3-eth-ens@1.3.6: - resolution: {integrity: sha512-n27HNj7lpSkRxTgSx+Zo7cmKAgyg2ElFilaFlUu/X2CNH23lXfcPm2bWssivH9z0ndhg0OyR4AYFZqPaqDHkJA==} + web3-eth-ens@1.10.4: + resolution: {integrity: sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg==} engines: {node: '>=8.0.0'} web3-eth-ens@1.5.2: resolution: {integrity: sha512-/UrLL42ZOCYge+BpFBdzG8ICugaRS4f6X7PxJKO+zAt+TwNgBpjuWfW/ZYNcuqJun/ZyfcTuj03TXqA1RlNhZQ==} engines: {node: '>=8.0.0'} - web3-eth-iban@1.3.6: - resolution: {integrity: sha512-nfMQaaLA/zsg5W4Oy/EJQbs8rSs1vBAX6b/35xzjYoutXlpHMQadujDx2RerTKhSHqFXSJeQAfE+2f6mdhYkRQ==} + web3-eth-iban@1.10.4: + resolution: {integrity: sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==} engines: {node: '>=8.0.0'} web3-eth-iban@1.5.2: resolution: {integrity: sha512-C04YDXuSG/aDwOHSX+HySBGb0KraiAVt+/l1Mw7y/fCUrKC/K0yYzMYqY/uYOcvLtepBPsC4ZfUYWUBZ2PO8Vg==} engines: {node: '>=8.0.0'} - web3-eth-personal@1.3.6: - resolution: {integrity: sha512-pOHU0+/h1RFRYoh1ehYBehRbcKWP4OSzd4F7mDljhHngv6W8ewMHrAN8O1ol9uysN2MuCdRE19qkRg5eNgvzFQ==} + web3-eth-personal@1.10.4: + resolution: {integrity: sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w==} engines: {node: '>=8.0.0'} web3-eth-personal@1.5.2: resolution: {integrity: sha512-nH5N2GiVC0C5XeMEKU16PeFP3Hb3hkPvlR6Tf9WQ+pE+jw1c8eaXBO1CJQLr15ikhUF3s94ICyHcfjzkDsmRbA==} engines: {node: '>=8.0.0'} - web3-eth@1.3.6: - resolution: {integrity: sha512-9+rnywRRpyX3C4hfsAQXPQh6vHh9XzQkgLxo3gyeXfbhbShUoq2gFVuy42vsRs//6JlsKdyZS7Z3hHPHz2wreA==} + web3-eth@1.10.4: + resolution: {integrity: sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA==} engines: {node: '>=8.0.0'} web3-eth@1.5.2: resolution: {integrity: sha512-DwWQ6TCOUqvYyo7T20S7HpQDPveNHNqOn2Q2F3E8ZFyEjmqT4XsGiwvm08kB/VgQ4e/ANyq/i8PPFSYMT8JKHg==} engines: {node: '>=8.0.0'} - web3-net@1.3.6: - resolution: {integrity: sha512-KhzU3wMQY/YYjyMiQzbaLPt2kut88Ncx2iqjy3nw28vRux3gVX0WOCk9EL/KVJBiAA/fK7VklTXvgy9dZnnipw==} + web3-net@1.10.4: + resolution: {integrity: sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow==} engines: {node: '>=8.0.0'} web3-net@1.5.2: resolution: {integrity: sha512-VEc9c+jfoERhbJIxnx0VPlQDot8Lm4JW/tOWFU+ekHgIiu2zFKj5YxhURIth7RAbsaRsqCb79aE+M0eI8maxVQ==} engines: {node: '>=8.0.0'} - web3-providers-http@1.3.6: - resolution: {integrity: sha512-OQkT32O1A06dISIdazpGLveZcOXhEo5cEX6QyiSQkiPk/cjzDrXMw4SKZOGQbbS1+0Vjizm1Hrp7O8Vp2D1M5Q==} + web3-providers-http@1.10.4: + resolution: {integrity: sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ==} engines: {node: '>=8.0.0'} web3-providers-http@1.5.2: resolution: {integrity: sha512-dUNFJc9IMYDLZnkoQX3H4ZjvHjGO6VRVCqrBrdh84wPX/0da9dOA7DwIWnG0Gv3n9ybWwu5JHQxK4MNQ444lyA==} engines: {node: '>=8.0.0'} - web3-providers-ipc@1.3.6: - resolution: {integrity: sha512-+TVsSd2sSVvVgHG4s6FXwwYPPT91boKKcRuEFXqEfAbUC5t52XOgmyc2LNiD9LzPhed65FbV4LqICpeYGUvSwA==} + web3-providers-ipc@1.10.4: + resolution: {integrity: sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw==} engines: {node: '>=8.0.0'} web3-providers-ipc@1.5.2: resolution: {integrity: sha512-SJC4Sivt4g9LHKlRy7cs1jkJgp7bjrQeUndE6BKs0zNALKguxu6QYnzbmuHCTFW85GfMDjhvi24jyyZHMnBNXQ==} engines: {node: '>=8.0.0'} - web3-providers-ws@1.3.6: - resolution: {integrity: sha512-bk7MnJf5or0Re2zKyhR3L3CjGululLCHXx4vlbc/drnaTARUVvi559OI5uLytc/1k5HKUUyENAxLvetz2G1dnQ==} + web3-providers-ws@1.10.4: + resolution: {integrity: sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==} engines: {node: '>=8.0.0'} web3-providers-ws@1.5.2: resolution: {integrity: sha512-xy9RGlyO8MbJDuKv2vAMDkg+en+OvXG0CGTCM2BTl6l1vIdHpCa+6A/9KV2rK8aU9OBZ7/Pf+Y19517kHVl9RA==} engines: {node: '>=8.0.0'} - web3-shh@1.3.6: - resolution: {integrity: sha512-9zRo415O0iBslxBnmu9OzYjNErzLnzOsy+IOvSpIreLYbbAw0XkDWxv3SfcpKnTIWIACBR4AYMIxmmyi5iB3jw==} + web3-shh@1.10.4: + resolution: {integrity: sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw==} engines: {node: '>=8.0.0'} web3-shh@1.5.2: resolution: {integrity: sha512-wOxOcYt4Sa0AHAI8gG7RulCwVuVjSRS/M/AbFsea3XfJdN6sU13/syY7OdZNjNYuKjYTzxKYrd3dU/K2iqffVw==} engines: {node: '>=8.0.0'} - web3-utils@1.3.6: - resolution: {integrity: sha512-hHatFaQpkQgjGVER17gNx8u1qMyaXFZtM0y0XLGH1bzsjMPlkMPLRcYOrZ00rOPfTEuYFOdrpGOqZXVmGrMZRg==} + web3-utils@1.10.4: + resolution: {integrity: sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==} engines: {node: '>=8.0.0'} web3-utils@1.5.2: resolution: {integrity: sha512-quTtTeQJHYSxAwIBOCGEcQtqdVcFWX6mCFNoqnp+mRbq+Hxbs8CGgO/6oqfBx4OvxIOfCpgJWYVHswRXnbEu9Q==} engines: {node: '>=8.0.0'} - web3@1.3.6: - resolution: {integrity: sha512-jEpPhnL6GDteifdVh7ulzlPrtVQeA30V9vnki9liYlUvLV82ZM7BNOQJiuzlDePuE+jZETZSP/0G/JlUVt6pOA==} + web3@1.10.4: + resolution: {integrity: sha512-kgJvQZjkmjOEKimx/tJQsqWfRDPTTcBfYPa9XletxuHLpHcXdx67w8EFn5AW3eVxCutE9dTVHgGa9VYe8vgsEA==} engines: {node: '>=8.0.0'} web3@1.5.2: @@ -32998,146 +33093,175 @@ snapshots: dependencies: tslib: 2.6.2 - '@celo/base@3.2.0': {} + '@celo/abis@11.0.0': {} - '@celo/connect@3.2.0': + '@celo/abis@12.0.0-canary.16': {} + + '@celo/base@6.1.0': {} + + '@celo/connect@6.0.1': dependencies: - '@celo/base': 3.2.0 - '@celo/utils': 3.2.0 + '@celo/base': 6.1.0 + '@celo/utils': 7.0.0 + '@ethereumjs/util': 8.0.5 '@types/debug': 4.1.12 '@types/utf8': 2.1.6 bignumber.js: 9.1.2 debug: 4.3.4 utf8: 3.0.0 - web3-eth-contract: 1.3.6 + web3-core: 1.10.4 + web3-eth: 1.10.4 + web3-eth-contract: 1.10.4 transitivePeerDependencies: + - encoding - supports-color - '@celo/connect@3.2.0(web3@1.3.6)': + '@celo/connect@6.0.1(web3@1.10.4)': dependencies: - '@celo/base': 3.2.0 - '@celo/utils': 3.2.0 + '@celo/base': 6.1.0 + '@celo/utils': 7.0.0 + '@ethereumjs/util': 8.0.5 '@types/debug': 4.1.12 '@types/utf8': 2.1.6 bignumber.js: 9.1.2 debug: 4.3.4 utf8: 3.0.0 - web3: 1.3.6 - web3-eth-contract: 1.3.6 + web3: 1.10.4 + web3-core: 1.10.4 + web3-eth: 1.10.4 + web3-eth-contract: 1.10.4 transitivePeerDependencies: + - encoding - supports-color - '@celo/contractkit@3.2.0': + '@celo/contractkit@8.1.1': dependencies: - '@celo/base': 3.2.0 - '@celo/connect': 3.2.0(web3@1.3.6) - '@celo/utils': 3.2.0 - '@celo/wallet-local': 3.2.0(web3@1.3.6) + '@celo/abis': 11.0.0 + '@celo/abis-12': '@celo/abis@12.0.0-canary.16' + '@celo/base': 6.1.0 + '@celo/connect': 6.0.1(web3@1.10.4) + '@celo/utils': 7.0.0 + '@celo/wallet-local': 6.0.1(web3@1.10.4) '@types/bn.js': 5.1.5 '@types/debug': 4.1.12 bignumber.js: 9.1.2 - cross-fetch: 3.1.8 + cross-fetch: 3.1.5 debug: 4.3.4 fp-ts: 2.1.1 io-ts: 2.0.1(fp-ts@2.1.1) +<<<<<<< HEAD semver: 7.5.4 web3: 1.3.6 web3-utils: 1.3.6 +======= + semver: 7.6.3 + web3: 1.10.4 + web3-core-helpers: 1.10.4 +>>>>>>> 182ccc1655 (chore: upgrade celo dependencies (closes https://github.com/LedgerHQ/ledger-live/issues/7551)) transitivePeerDependencies: - bufferutil - encoding - supports-color - utf-8-validate - '@celo/utils@3.2.0': + '@celo/ledger-token-signer@0.4.0': {} + + '@celo/utils@7.0.0': dependencies: - '@celo/base': 3.2.0 + '@celo/base': 6.1.0 + '@ethereumjs/rlp': 5.0.2 + '@ethereumjs/util': 8.0.5 + '@noble/ciphers': 0.4.1 + '@noble/curves': 1.3.0 + '@noble/hashes': 1.3.3 '@types/bn.js': 5.1.5 - '@types/elliptic': 6.4.18 - '@types/ethereumjs-util': 5.2.0 - '@types/node': 10.17.60 + '@types/node': 18.19.26 bignumber.js: 9.1.2 - elliptic: 6.5.5 - ethereumjs-util: 5.2.1 - fp-ts: 2.16.5 - io-ts: 2.0.1(fp-ts@2.16.5) - rlp: 3.0.0 - web3-eth-abi: 1.3.6 - web3-utils: 1.3.6 + fp-ts: 2.1.1 + io-ts: 2.0.1(fp-ts@2.1.1) + web3-eth-abi: 1.10.4 + web3-utils: 1.10.4 - '@celo/wallet-base@3.2.0': + '@celo/wallet-base@6.0.1': dependencies: - '@celo/base': 3.2.0 - '@celo/connect': 3.2.0 - '@celo/utils': 3.2.0 + '@celo/base': 6.1.0 + '@celo/connect': 6.0.1(web3@1.10.4) + '@celo/utils': 7.0.0 + '@ethereumjs/rlp': 5.0.2 + '@ethereumjs/util': 8.0.5 + '@noble/curves': 1.4.0 + '@noble/hashes': 1.4.0 '@types/debug': 4.1.12 - '@types/ethereumjs-util': 5.2.0 bignumber.js: 9.1.2 debug: 4.3.4 - eth-lib: 0.2.8 - ethereumjs-util: 5.2.1 + web3: 1.10.4 + web3-eth-accounts: 1.10.4 transitivePeerDependencies: + - bufferutil + - encoding - supports-color - - web3 + - utf-8-validate - '@celo/wallet-base@3.2.0(web3@1.3.6)': + '@celo/wallet-ledger@6.0.1': dependencies: - '@celo/base': 3.2.0 - '@celo/connect': 3.2.0(web3@1.3.6) - '@celo/utils': 3.2.0 - '@types/debug': 4.1.12 - '@types/ethereumjs-util': 5.2.0 - bignumber.js: 9.1.2 + '@celo/base': 6.1.0 + '@celo/connect': 6.0.1 + '@celo/ledger-token-signer': 0.4.0 + '@celo/utils': 7.0.0 + '@celo/wallet-base': 6.0.1 + '@celo/wallet-remote': 6.0.1 + '@ethereumjs/util': 8.0.5 + '@ledgerhq/errors': 6.19.1 + '@ledgerhq/hw-app-eth': https://codeload.github.com/celo-org/ledgerjs-hw-app-eth/tar.gz/49bdd4f163f5ff73daa9f54f8e46aa2882b85f44 + '@ledgerhq/hw-transport': 6.30.6 debug: 4.3.4 - eth-lib: 0.2.8 - ethereumjs-util: 5.2.1 + semver: 7.6.3 transitivePeerDependencies: + - bufferutil + - encoding - supports-color + - utf-8-validate - web3 - '@celo/wallet-ledger@3.2.0': + '@celo/wallet-local@6.0.1(web3@1.10.4)': dependencies: - '@celo/base': 3.2.0 - '@celo/connect': 3.2.0 - '@celo/utils': 3.2.0 - '@celo/wallet-base': 3.2.0 - '@celo/wallet-remote': 3.2.0 - '@ledgerhq/hw-app-eth': 5.11.0 - '@ledgerhq/hw-transport': 5.11.0 - '@types/ethereumjs-util': 5.2.0 - debug: 4.3.4 - eth-lib: 0.2.8 - ethereumjs-util: 5.2.1 + '@celo/base': 6.1.0 + '@celo/connect': 6.0.1(web3@1.10.4) + '@celo/utils': 7.0.0 + '@celo/wallet-base': 6.0.1 + '@ethereumjs/util': 8.0.5 transitivePeerDependencies: + - bufferutil + - encoding - supports-color + - utf-8-validate - web3 - '@celo/wallet-local@3.2.0(web3@1.3.6)': + '@celo/wallet-remote@6.0.1': dependencies: - '@celo/base': 3.2.0 - '@celo/connect': 3.2.0(web3@1.3.6) - '@celo/utils': 3.2.0 - '@celo/wallet-base': 3.2.0(web3@1.3.6) - '@types/ethereumjs-util': 5.2.0 - eth-lib: 0.2.8 - ethereumjs-util: 5.2.1 + '@celo/connect': 6.0.1 + '@celo/utils': 7.0.0 + '@celo/wallet-base': 6.0.1 + '@ethereumjs/util': 8.0.5 + '@types/debug': 4.1.12 transitivePeerDependencies: + - bufferutil + - encoding - supports-color + - utf-8-validate - web3 - '@celo/wallet-remote@3.2.0': + '@chainsafe/as-sha256@0.3.1': {} + + '@chainsafe/persistent-merkle-tree@0.4.2': dependencies: - '@celo/base': 3.2.0 - '@celo/connect': 3.2.0 - '@celo/utils': 3.2.0 - '@celo/wallet-base': 3.2.0 - '@types/debug': 4.1.12 - '@types/ethereumjs-util': 5.2.0 - eth-lib: 0.2.8 - ethereumjs-util: 5.2.1 - transitivePeerDependencies: - - supports-color - - web3 + '@chainsafe/as-sha256': 0.3.1 + + '@chainsafe/ssz@0.9.4': + dependencies: + '@chainsafe/as-sha256': 0.3.1 + '@chainsafe/persistent-merkle-tree': 0.4.2 + case: 1.6.3 '@changesets/apply-release-plan@7.0.4': dependencies: @@ -34504,11 +34628,27 @@ snapshots: crc-32: 1.2.2 ethereumjs-util: 7.1.5 + '@ethereumjs/rlp@4.0.1': {} + + '@ethereumjs/rlp@5.0.2': {} + '@ethereumjs/tx@3.5.2': dependencies: '@ethereumjs/common': 2.6.5 ethereumjs-util: 7.1.5 + '@ethereumjs/util@8.0.5': + dependencies: + '@chainsafe/ssz': 0.9.4 + '@ethereumjs/rlp': 4.0.1 + ethereum-cryptography: 1.2.0 + + '@ethereumjs/util@8.1.0': + dependencies: + '@ethereumjs/rlp': 4.0.1 + ethereum-cryptography: 2.1.3 + micro-ftch: 0.3.1 + '@ethersproject/abi@5.0.7': dependencies: '@ethersproject/address': 5.7.0 @@ -36924,14 +37064,62 @@ snapshots: optionalDependencies: '@types/react': 18.2.73 + '@ledgerhq/cryptoassets@13.3.0': + dependencies: + axios: 1.7.7 + bs58check: 2.1.2 + invariant: 2.2.4 + + '@ledgerhq/domain-service@1.2.3': + dependencies: + '@ledgerhq/errors': 6.19.1 + '@ledgerhq/logs': 6.12.0 + '@ledgerhq/types-live': 6.50.0 + axios: 1.7.7 + eip55: 2.1.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + '@ledgerhq/errors@5.50.0': {} '@ledgerhq/errors@6.19.1': {} - '@ledgerhq/hw-app-eth@5.11.0': + '@ledgerhq/evm-tools@1.2.0': dependencies: - '@ledgerhq/errors': 5.50.0 - '@ledgerhq/hw-transport': 5.11.0 + '@ledgerhq/cryptoassets': 13.3.0 + '@ledgerhq/live-env': 2.2.0 + axios: 1.7.7 + crypto-js: 4.2.0 + ethers: 5.7.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@ledgerhq/hw-app-eth@https://codeload.github.com/celo-org/ledgerjs-hw-app-eth/tar.gz/49bdd4f163f5ff73daa9f54f8e46aa2882b85f44': + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ledgerhq/cryptoassets': 13.3.0 + '@ledgerhq/domain-service': 1.2.3 + '@ledgerhq/errors': 6.19.1 + '@ledgerhq/evm-tools': 1.2.0 + '@ledgerhq/hw-transport': 6.31.4 + '@ledgerhq/hw-transport-mocker': 6.29.2 + '@ledgerhq/logs': 6.12.0 + '@ledgerhq/types-cryptoassets': 7.15.0 + '@ledgerhq/types-devices': 6.25.3 + '@ledgerhq/types-live': 6.50.0 + axios: 1.7.7 + bignumber.js: 9.1.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@ledgerhq/hw-transport-mocker@6.29.2': + dependencies: + '@ledgerhq/hw-transport': 6.31.4 + '@ledgerhq/logs': 6.12.0 + rxjs: 7.8.1 '@ledgerhq/hw-transport-u2f@5.36.0-deprecated': dependencies: @@ -36940,12 +37128,6 @@ snapshots: '@ledgerhq/logs': 5.50.0 u2f-api: 0.2.7 - '@ledgerhq/hw-transport@5.11.0': - dependencies: - '@ledgerhq/devices': link:libs/ledgerjs/packages/devices - '@ledgerhq/errors': 5.50.0 - events: 3.3.0 - '@ledgerhq/hw-transport@5.51.1': dependencies: '@ledgerhq/devices': link:libs/ledgerjs/packages/devices @@ -36998,11 +37180,29 @@ snapshots: bignumber.js: 9.1.2 json-rpc-2.0: 1.7.0 + '@ledgerhq/live-env@2.2.0': + dependencies: + rxjs: 7.8.1 + utility-types: 3.11.0 + '@ledgerhq/logs@5.50.0': {} '@ledgerhq/logs@6.12.0': {} +<<<<<<< HEAD '@ledgerhq/wallet-api-client-react@1.3.12(react@18.3.1)': +======= + '@ledgerhq/types-cryptoassets@7.15.0': {} + + '@ledgerhq/types-devices@6.25.3': {} + + '@ledgerhq/types-live@6.50.0': + dependencies: + bignumber.js: 9.1.2 + rxjs: 7.8.1 + + '@ledgerhq/wallet-api-client-react@1.3.12(react@18.2.0)': +>>>>>>> d098269cea (chore: upgrade celo dependencies (closes https://github.com/LedgerHQ/ledger-live/issues/7551)) dependencies: '@ledgerhq/wallet-api-client': 1.6.0 react: 18.3.1 @@ -37402,6 +37602,8 @@ snapshots: dependencies: eslint-scope: 5.1.1 + '@noble/ciphers@0.4.1': {} + '@noble/curves@1.2.0': dependencies: '@noble/hashes': 1.3.2 @@ -37418,6 +37620,8 @@ snapshots: '@noble/hashes@1.1.5': {} + '@noble/hashes@1.2.0': {} + '@noble/hashes@1.3.2': {} '@noble/hashes@1.3.3': {} @@ -39940,6 +40144,12 @@ snapshots: '@scure/base@1.1.6': {} + '@scure/bip32@1.1.5': + dependencies: + '@noble/hashes': 1.2.0 + '@noble/secp256k1': 1.7.1 + '@scure/base': 1.1.6 + '@scure/bip32@1.3.3': dependencies: '@noble/curves': 1.3.0 @@ -39952,6 +40162,11 @@ snapshots: '@noble/hashes': 1.4.0 '@scure/base': 1.1.6 + '@scure/bip39@1.1.1': + dependencies: + '@noble/hashes': 1.2.0 + '@scure/base': 1.1.6 + '@scure/bip39@1.2.2': dependencies: '@noble/hashes': 1.3.3 @@ -43843,6 +44058,10 @@ snapshots: dependencies: defer-to-connect: 2.0.1 + '@szmarczak/http-timer@5.0.1': + dependencies: + defer-to-connect: 2.0.1 + '@tanstack/query-core@5.28.9': {} '@tanstack/query-devtools@5.28.10': {} @@ -44323,6 +44542,7 @@ snapshots: '@types/estree@1.0.5': {} +<<<<<<< HEAD '@types/estree@1.0.6': {} '@types/ethereumjs-util@5.2.0': @@ -44330,6 +44550,8 @@ snapshots: '@types/bn.js': 5.1.5 '@types/node': 20.12.12 +======= +>>>>>>> d098269cea (chore: upgrade celo dependencies (closes https://github.com/LedgerHQ/ledger-live/issues/7551)) '@types/events@3.0.3': {} '@types/express-serve-static-core@4.17.43': @@ -45909,6 +46131,8 @@ snapshots: dependencies: event-target-shim: 5.0.1 + abortcontroller-polyfill@1.7.5: {} + abstract-leveldown@0.12.4: dependencies: xtend: 3.0.0 @@ -47563,6 +47787,8 @@ snapshots: cacheable-lookup@5.0.4: {} + cacheable-lookup@6.1.0: {} + cacheable-request@6.1.0: dependencies: clone-response: 1.0.3 @@ -47648,6 +47874,8 @@ snapshots: case-sensitive-paths-webpack-plugin@2.4.0: {} + case@1.6.3: {} + caseless@0.12.0: {} cashaddrjs@0.4.4: @@ -48542,12 +48770,24 @@ snapshots: dependencies: cross-spawn: 7.0.3 + cross-fetch@3.1.5: + dependencies: + node-fetch: 2.6.7 + transitivePeerDependencies: + - encoding + cross-fetch@3.1.8: dependencies: node-fetch: 2.7.0 transitivePeerDependencies: - encoding + cross-fetch@4.0.0: + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + cross-sha256@1.2.0: dependencies: buffer: 5.7.1 @@ -50778,6 +51018,13 @@ snapshots: secp256k1: 4.0.3 setimmediate: 1.0.5 + ethereum-cryptography@1.2.0: + dependencies: + '@noble/hashes': 1.2.0 + '@noble/secp256k1': 1.7.1 + '@scure/bip32': 1.1.5 + '@scure/bip39': 1.1.1 + ethereum-cryptography@2.1.3: dependencies: '@noble/curves': 1.3.0 @@ -50785,33 +51032,6 @@ snapshots: '@scure/bip32': 1.3.3 '@scure/bip39': 1.2.2 - ethereumjs-common@1.5.2: {} - - ethereumjs-tx@2.1.2: - dependencies: - ethereumjs-common: 1.5.2 - ethereumjs-util: 6.2.1 - - ethereumjs-util@5.2.1: - dependencies: - bn.js: 4.12.0 - create-hash: 1.2.0 - elliptic: 6.5.5 - ethereum-cryptography: 0.1.3 - ethjs-util: 0.1.6 - rlp: 2.2.7 - safe-buffer: 5.2.1 - - ethereumjs-util@6.2.1: - dependencies: - '@types/bn.js': 4.11.6 - bn.js: 4.12.0 - create-hash: 1.2.0 - elliptic: 6.5.5 - ethereum-cryptography: 0.1.3 - ethjs-util: 0.1.6 - rlp: 2.2.7 - ethereumjs-util@7.1.5: dependencies: '@types/bn.js': 5.1.5 @@ -50874,11 +51094,6 @@ snapshots: bn.js: 4.11.6 number-to-bn: 1.7.0 - ethjs-util@0.1.6: - dependencies: - is-hex-prefixed: 1.0.0 - strip-hex-prefix: 1.0.0 - event-emitter@0.3.5: dependencies: d: 1.0.2 @@ -51885,6 +52100,8 @@ snapshots: typescript: 5.4.3 webpack: 5.94.0(metro@0.80.12) + form-data-encoder@1.7.1: {} + form-data@2.3.3: dependencies: asynckit: 0.4.0 @@ -51926,8 +52143,6 @@ snapshots: fp-ts@2.1.1: {} - fp-ts@2.16.5: {} - fraction.js@4.3.7: {} framer-motion@11.3.28(react-dom@18.2.0(react@18.2.0))(react@18.2.0): @@ -52321,6 +52536,22 @@ snapshots: p-cancelable: 2.1.1 responselike: 2.0.1 + got@12.1.0: + dependencies: + '@sindresorhus/is': 4.6.0 + '@szmarczak/http-timer': 5.0.1 + '@types/cacheable-request': 6.0.3 + '@types/responselike': 1.0.3 + cacheable-lookup: 6.1.0 + cacheable-request: 7.0.4 + decompress-response: 6.0.0 + form-data-encoder: 1.7.1 + get-stream: 6.0.1 + http2-wrapper: 2.2.1 + lowercase-keys: 3.0.0 + p-cancelable: 3.0.0 + responselike: 2.0.1 + got@9.6.0: dependencies: '@sindresorhus/is': 0.14.0 @@ -52911,6 +53142,11 @@ snapshots: quick-lru: 5.1.1 resolve-alpn: 1.2.1 + http2-wrapper@2.2.1: + dependencies: + quick-lru: 5.1.1 + resolve-alpn: 1.2.1 + https-browserify@1.0.0: {} https-proxy-agent@4.0.0: @@ -53127,10 +53363,6 @@ snapshots: dependencies: fp-ts: 2.1.1 - io-ts@2.0.1(fp-ts@2.16.5): - dependencies: - fp-ts: 2.16.5 - ioredis@5.3.2: dependencies: '@ioredis/commands': 1.2.0 @@ -55779,7 +56011,7 @@ snapshots: parse5: 6.0.1 saxes: 5.0.1 symbol-tree: 3.2.4 - tough-cookie: 4.1.3 + tough-cookie: 4.1.4 w3c-hr-time: 1.0.2 w3c-xmlserializer: 3.0.0 webidl-conversions: 7.0.0 @@ -56596,6 +56828,8 @@ snapshots: lowercase-keys@2.0.0: {} + lowercase-keys@3.0.0: {} + lru-cache@10.2.0: {} lru-cache@4.1.5: @@ -57589,6 +57823,8 @@ snapshots: - supports-color - utf-8-validate + micro-ftch@0.3.1: {} + micromark-core-commonmark@1.1.0: dependencies: decode-named-character-reference: 1.0.2 @@ -59014,6 +59250,8 @@ snapshots: p-cancelable@2.1.1: {} + p-cancelable@3.0.0: {} + p-filter@2.1.0: dependencies: p-map: 2.1.0 @@ -65689,12 +65927,11 @@ snapshots: web-worker@1.3.0: {} - web3-bzz@1.3.6: + web3-bzz@1.10.4: dependencies: '@types/node': 12.20.55 - got: 9.6.0 + got: 12.1.0 swarm-js: 0.1.42 - underscore: 1.12.1 transitivePeerDependencies: - bufferutil - supports-color @@ -65710,25 +65947,23 @@ snapshots: - supports-color - utf-8-validate - web3-core-helpers@1.3.6: + web3-core-helpers@1.10.4: dependencies: - underscore: 1.12.1 - web3-eth-iban: 1.3.6 - web3-utils: 1.3.6 + web3-eth-iban: 1.10.4 + web3-utils: 1.10.4 web3-core-helpers@1.5.2: dependencies: web3-eth-iban: 1.5.2 web3-utils: 1.5.2 - web3-core-method@1.3.6: + web3-core-method@1.10.4: dependencies: '@ethersproject/transactions': 5.7.0 - underscore: 1.12.1 - web3-core-helpers: 1.3.6 - web3-core-promievent: 1.3.6 - web3-core-subscriptions: 1.3.6 - web3-utils: 1.3.6 + web3-core-helpers: 1.10.4 + web3-core-promievent: 1.10.4 + web3-core-subscriptions: 1.10.4 + web3-utils: 1.10.4 web3-core-method@1.5.2: dependencies: @@ -65739,7 +65974,7 @@ snapshots: web3-core-subscriptions: 1.5.2 web3-utils: 1.5.2 - web3-core-promievent@1.3.6: + web3-core-promievent@1.10.4: dependencies: eventemitter3: 4.0.4 @@ -65747,15 +65982,15 @@ snapshots: dependencies: eventemitter3: 4.0.4 - web3-core-requestmanager@1.3.6: + web3-core-requestmanager@1.10.4: dependencies: - underscore: 1.12.1 util: 0.12.5 - web3-core-helpers: 1.3.6 - web3-providers-http: 1.3.6 - web3-providers-ipc: 1.3.6 - web3-providers-ws: 1.3.6 + web3-core-helpers: 1.10.4 + web3-providers-http: 1.10.4 + web3-providers-ipc: 1.10.4 + web3-providers-ws: 1.10.4 transitivePeerDependencies: + - encoding - supports-color web3-core-requestmanager@1.5.2: @@ -65768,27 +66003,27 @@ snapshots: transitivePeerDependencies: - supports-color - web3-core-subscriptions@1.3.6: + web3-core-subscriptions@1.10.4: dependencies: eventemitter3: 4.0.4 - underscore: 1.12.1 - web3-core-helpers: 1.3.6 + web3-core-helpers: 1.10.4 web3-core-subscriptions@1.5.2: dependencies: eventemitter3: 4.0.4 web3-core-helpers: 1.5.2 - web3-core@1.3.6: + web3-core@1.10.4: dependencies: - '@types/bn.js': 4.11.6 + '@types/bn.js': 5.1.5 '@types/node': 12.20.55 bignumber.js: 9.1.2 - web3-core-helpers: 1.3.6 - web3-core-method: 1.3.6 - web3-core-requestmanager: 1.3.6 - web3-utils: 1.3.6 + web3-core-helpers: 1.10.4 + web3-core-method: 1.10.4 + web3-core-requestmanager: 1.10.4 + web3-utils: 1.10.4 transitivePeerDependencies: + - encoding - supports-color web3-core@1.5.2: @@ -65803,31 +66038,30 @@ snapshots: transitivePeerDependencies: - supports-color - web3-eth-abi@1.3.6: + web3-eth-abi@1.10.4: dependencies: - '@ethersproject/abi': 5.0.7 - underscore: 1.12.1 - web3-utils: 1.3.6 + '@ethersproject/abi': 5.7.0 + web3-utils: 1.10.4 web3-eth-abi@1.5.2: dependencies: '@ethersproject/abi': 5.0.7 web3-utils: 1.5.2 - web3-eth-accounts@1.3.6: + web3-eth-accounts@1.10.4: dependencies: - crypto-browserify: 3.12.0 + '@ethereumjs/common': 2.6.5 + '@ethereumjs/tx': 3.5.2 + '@ethereumjs/util': 8.1.0 eth-lib: 0.2.8 - ethereumjs-common: 1.5.2 - ethereumjs-tx: 2.1.2 scrypt-js: 3.0.1 - underscore: 1.12.1 - uuid: 3.3.2 - web3-core: 1.3.6 - web3-core-helpers: 1.3.6 - web3-core-method: 1.3.6 - web3-utils: 1.3.6 + uuid: 9.0.1 + web3-core: 1.10.4 + web3-core-helpers: 1.10.4 + web3-core-method: 1.10.4 + web3-utils: 1.10.4 transitivePeerDependencies: + - encoding - supports-color web3-eth-accounts@1.5.2: @@ -65846,18 +66080,18 @@ snapshots: transitivePeerDependencies: - supports-color - web3-eth-contract@1.3.6: + web3-eth-contract@1.10.4: dependencies: - '@types/bn.js': 4.11.6 - underscore: 1.12.1 - web3-core: 1.3.6 - web3-core-helpers: 1.3.6 - web3-core-method: 1.3.6 - web3-core-promievent: 1.3.6 - web3-core-subscriptions: 1.3.6 - web3-eth-abi: 1.3.6 - web3-utils: 1.3.6 + '@types/bn.js': 5.1.5 + web3-core: 1.10.4 + web3-core-helpers: 1.10.4 + web3-core-method: 1.10.4 + web3-core-promievent: 1.10.4 + web3-core-subscriptions: 1.10.4 + web3-eth-abi: 1.10.4 + web3-utils: 1.10.4 transitivePeerDependencies: + - encoding - supports-color web3-eth-contract@1.5.2: @@ -65873,18 +66107,18 @@ snapshots: transitivePeerDependencies: - supports-color - web3-eth-ens@1.3.6: + web3-eth-ens@1.10.4: dependencies: content-hash: 2.5.2 eth-ens-namehash: 2.0.8 - underscore: 1.12.1 - web3-core: 1.3.6 - web3-core-helpers: 1.3.6 - web3-core-promievent: 1.3.6 - web3-eth-abi: 1.3.6 - web3-eth-contract: 1.3.6 - web3-utils: 1.3.6 + web3-core: 1.10.4 + web3-core-helpers: 1.10.4 + web3-core-promievent: 1.10.4 + web3-eth-abi: 1.10.4 + web3-eth-contract: 1.10.4 + web3-utils: 1.10.4 transitivePeerDependencies: + - encoding - supports-color web3-eth-ens@1.5.2: @@ -65900,25 +66134,26 @@ snapshots: transitivePeerDependencies: - supports-color - web3-eth-iban@1.3.6: + web3-eth-iban@1.10.4: dependencies: - bn.js: 4.12.0 - web3-utils: 1.3.6 + bn.js: 5.2.1 + web3-utils: 1.10.4 web3-eth-iban@1.5.2: dependencies: bn.js: 4.12.0 web3-utils: 1.5.2 - web3-eth-personal@1.3.6: + web3-eth-personal@1.10.4: dependencies: '@types/node': 12.20.55 - web3-core: 1.3.6 - web3-core-helpers: 1.3.6 - web3-core-method: 1.3.6 - web3-net: 1.3.6 - web3-utils: 1.3.6 + web3-core: 1.10.4 + web3-core-helpers: 1.10.4 + web3-core-method: 1.10.4 + web3-net: 1.10.4 + web3-utils: 1.10.4 transitivePeerDependencies: + - encoding - supports-color web3-eth-personal@1.5.2: @@ -65932,22 +66167,22 @@ snapshots: transitivePeerDependencies: - supports-color - web3-eth@1.3.6: - dependencies: - underscore: 1.12.1 - web3-core: 1.3.6 - web3-core-helpers: 1.3.6 - web3-core-method: 1.3.6 - web3-core-subscriptions: 1.3.6 - web3-eth-abi: 1.3.6 - web3-eth-accounts: 1.3.6 - web3-eth-contract: 1.3.6 - web3-eth-ens: 1.3.6 - web3-eth-iban: 1.3.6 - web3-eth-personal: 1.3.6 - web3-net: 1.3.6 - web3-utils: 1.3.6 + web3-eth@1.10.4: + dependencies: + web3-core: 1.10.4 + web3-core-helpers: 1.10.4 + web3-core-method: 1.10.4 + web3-core-subscriptions: 1.10.4 + web3-eth-abi: 1.10.4 + web3-eth-accounts: 1.10.4 + web3-eth-contract: 1.10.4 + web3-eth-ens: 1.10.4 + web3-eth-iban: 1.10.4 + web3-eth-personal: 1.10.4 + web3-net: 1.10.4 + web3-utils: 1.10.4 transitivePeerDependencies: + - encoding - supports-color web3-eth@1.5.2: @@ -65967,12 +66202,13 @@ snapshots: transitivePeerDependencies: - supports-color - web3-net@1.3.6: + web3-net@1.10.4: dependencies: - web3-core: 1.3.6 - web3-core-method: 1.3.6 - web3-utils: 1.3.6 + web3-core: 1.10.4 + web3-core-method: 1.10.4 + web3-utils: 1.10.4 transitivePeerDependencies: + - encoding - supports-color web3-net@1.5.2: @@ -65983,32 +66219,34 @@ snapshots: transitivePeerDependencies: - supports-color - web3-providers-http@1.3.6: + web3-providers-http@1.10.4: dependencies: - web3-core-helpers: 1.3.6 - xhr2-cookies: 1.1.0 + abortcontroller-polyfill: 1.7.5 + cross-fetch: 4.0.0 + es6-promise: 4.2.8 + web3-core-helpers: 1.10.4 + transitivePeerDependencies: + - encoding web3-providers-http@1.5.2: dependencies: web3-core-helpers: 1.5.2 xhr2-cookies: 1.1.0 - web3-providers-ipc@1.3.6: + web3-providers-ipc@1.10.4: dependencies: oboe: 2.1.5 - underscore: 1.12.1 - web3-core-helpers: 1.3.6 + web3-core-helpers: 1.10.4 web3-providers-ipc@1.5.2: dependencies: oboe: 2.1.5 web3-core-helpers: 1.5.2 - web3-providers-ws@1.3.6: + web3-providers-ws@1.10.4: dependencies: eventemitter3: 4.0.4 - underscore: 1.12.1 - web3-core-helpers: 1.3.6 + web3-core-helpers: 1.10.4 websocket: 1.0.34 transitivePeerDependencies: - supports-color @@ -66021,13 +66259,14 @@ snapshots: transitivePeerDependencies: - supports-color - web3-shh@1.3.6: + web3-shh@1.10.4: dependencies: - web3-core: 1.3.6 - web3-core-method: 1.3.6 - web3-core-subscriptions: 1.3.6 - web3-net: 1.3.6 + web3-core: 1.10.4 + web3-core-method: 1.10.4 + web3-core-subscriptions: 1.10.4 + web3-net: 1.10.4 transitivePeerDependencies: + - encoding - supports-color web3-shh@1.5.2: @@ -66039,15 +66278,15 @@ snapshots: transitivePeerDependencies: - supports-color - web3-utils@1.3.6: + web3-utils@1.10.4: dependencies: - bn.js: 4.12.0 - eth-lib: 0.2.8 + '@ethereumjs/util': 8.1.0 + bn.js: 5.2.1 ethereum-bloom-filters: 1.0.10 + ethereum-cryptography: 2.1.3 ethjs-unit: 0.1.6 number-to-bn: 1.7.0 randombytes: 2.1.0 - underscore: 1.12.1 utf8: 3.0.0 web3-utils@1.5.2: @@ -66060,17 +66299,18 @@ snapshots: randombytes: 2.1.0 utf8: 3.0.0 - web3@1.3.6: + web3@1.10.4: dependencies: - web3-bzz: 1.3.6 - web3-core: 1.3.6 - web3-eth: 1.3.6 - web3-eth-personal: 1.3.6 - web3-net: 1.3.6 - web3-shh: 1.3.6 - web3-utils: 1.3.6 + web3-bzz: 1.10.4 + web3-core: 1.10.4 + web3-eth: 1.10.4 + web3-eth-personal: 1.10.4 + web3-net: 1.10.4 + web3-shh: 1.10.4 + web3-utils: 1.10.4 transitivePeerDependencies: - bufferutil + - encoding - supports-color - utf-8-validate From 07c5826cd8feff7655958f22a4d3f83b1984d2ce Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Tue, 17 Sep 2024 13:17:19 +0200 Subject: [PATCH 02/20] did this fix the web3 buffer error? --- apps/ledger-live-desktop/jest.config.js | 1 + libs/ledger-live-common/jest.config.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/ledger-live-desktop/jest.config.js b/apps/ledger-live-desktop/jest.config.js index 83978432b901..8d1ea9be2a51 100644 --- a/apps/ledger-live-desktop/jest.config.js +++ b/apps/ledger-live-desktop/jest.config.js @@ -37,6 +37,7 @@ const commonConfig = { __SENTRY_URL__: null, __PRERELEASE__: "null", __CHANNEL__: "null", + Buffer: Uint8Array, }, moduleNameMapper, testPathIgnorePatterns, diff --git a/libs/ledger-live-common/jest.config.ts b/libs/ledger-live-common/jest.config.ts index ea813fca34f3..7ba3e110310b 100644 --- a/libs/ledger-live-common/jest.config.ts +++ b/libs/ledger-live-common/jest.config.ts @@ -38,6 +38,7 @@ const defaultConfig = { "ts-jest": { isolatedModules: true, }, + Buffer: Uint8Array, }, testEnvironment: "node", reporters, From 5f67f6949a465df7c873e8f4c9e3edfc636e8f50 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Tue, 8 Oct 2024 12:09:36 +0200 Subject: [PATCH 03/20] feat: upgrade `celo/signOperation` to use hw-app-eth --- .../src/families/celo/hw-app-celo.ts | 100 ------------------ .../src/families/celo/signOperation.ts | 7 +- 2 files changed, 4 insertions(+), 103 deletions(-) delete mode 100644 libs/ledger-live-common/src/families/celo/hw-app-celo.ts diff --git a/libs/ledger-live-common/src/families/celo/hw-app-celo.ts b/libs/ledger-live-common/src/families/celo/hw-app-celo.ts deleted file mode 100644 index 6654e016f38d..000000000000 --- a/libs/ledger-live-common/src/families/celo/hw-app-celo.ts +++ /dev/null @@ -1,100 +0,0 @@ -import type Transport from "@ledgerhq/hw-transport"; -import { decode, encode } from "rlp"; - -/** - * Heavily inspiried by celo-web-wallet - * https://github.com/celo-tools/celo-web-wallet/blob/master/src/features/ledger/CeloLedgerApp.ts - */ -export class CeloApp { - transport: Transport; - - constructor(transport: any) { - this.transport = transport; - } - - async signTransaction( - path: string, - rawTxHex: string, - ): Promise<{ - s: string; - v: string; - r: string; - }> { - const paths = splitPath(path); - const rawTx = Buffer.from(rawTxHex, "hex"); - let offset = 0; - let response; - - const rlpTx = decode(rawTx); - let rlpOffset = 0; - if (rlpTx.length > 6) { - const rlpVrs = encode(rlpTx.slice(-3)); - rlpOffset = rawTx.length - (rlpVrs.length - 1); - } - - while (offset !== rawTx.length) { - const first = offset === 0; - const maxChunkSize = first ? 150 - 1 - paths.length * 4 : 150; - let chunkSize = offset + maxChunkSize > rawTx.length ? rawTx.length - offset : maxChunkSize; - if (rlpOffset != 0 && offset + chunkSize == rlpOffset) { - // Make sure that the chunk doesn't end right on the EIP 155 marker if set - chunkSize--; - } - const buffer = Buffer.alloc(first ? 1 + paths.length * 4 + chunkSize : chunkSize); - if (first) { - buffer[0] = paths.length; - paths.forEach((element, index) => { - buffer.writeUInt32BE(element, 1 + 4 * index); - }); - rawTx.copy(buffer, 1 + 4 * paths.length, offset, offset + chunkSize); - } else { - rawTx.copy(buffer, 0, offset, offset + chunkSize); - } - - response = await this.transport - .send(0xe0, 0x04, first ? 0x00 : 0x80, 0x00, buffer) - .catch(e => { - throw e; - }); - - offset += chunkSize; - } - - const v = response.slice(0, 1).toString("hex"); - const r = response.slice(1, 1 + 32).toString("hex"); - const s = response.slice(1 + 32, 1 + 32 + 32).toString("hex"); - return { v, r, s }; - } - - provideERC20TokenInformation({ data }: { data: Buffer }): Promise { - return provideERC20TokenInformation(this.transport, data); - } -} - -function splitPath(path: string): number[] { - const result: number[] = []; - const components = path.split("/"); - components.forEach(element => { - let number = parseInt(element, 10); - if (isNaN(number)) { - return; // FIXME shouldn't it throws instead? - } - if (element.length > 1 && element[element.length - 1] === "'") { - number += 0x80000000; - } - result.push(number); - }); - return result; -} - -function provideERC20TokenInformation(transport: Transport, data: Buffer): Promise { - return transport.send(0xe0, 0x0a, 0x00, 0x00, data).then( - () => true, - e => { - if (e && e.statusCode === 0x6d00) { - return false; - } - throw e; - }, - ); -} diff --git a/libs/ledger-live-common/src/families/celo/signOperation.ts b/libs/ledger-live-common/src/families/celo/signOperation.ts index 0c6426a389f7..6370020a7b8c 100644 --- a/libs/ledger-live-common/src/families/celo/signOperation.ts +++ b/libs/ledger-live-common/src/families/celo/signOperation.ts @@ -8,7 +8,7 @@ import { buildOptimisticOperation } from "./buildOptimisticOperation"; import type { Transaction, CeloAccount } from "./types"; import { withDevice } from "../../hw/deviceAccess"; import buildTransaction from "./buildTransaction"; -import { CeloApp } from "./hw-app-celo"; +import Eth from "@ledgerhq/hw-app-eth"; /** * Sign Transaction with Ledger hardware @@ -28,14 +28,14 @@ export const signOperation: AccountBridge["signOperati throw new FeeNotLoaded(); } - const celo = new CeloApp(transport); + const celo = new Eth(transport); const unsignedTransaction = await buildTransaction(account, transaction); const { chainId, to } = unsignedTransaction; const rlpEncodedTransaction = rlpEncodedTx(unsignedTransaction); const tokenInfo = tokenInfoByAddressAndChainId(to!, chainId!); if (tokenInfo) { - await celo.provideERC20TokenInformation(tokenInfo); + await celo.provideERC20TokenInformation(`0x${tokenInfo.data.toString("hex")}`); } o.next({ type: "device-signature-requested" }); @@ -47,6 +47,7 @@ export const signOperation: AccountBridge["signOperati if (cancelled) return; + // TODO: this doesn't seem necessary anymore const signature = parseSigningResponse(response, chainId!); o.next({ type: "device-signature-granted" }); From 43090414a58400df526388a70cf8ff852bed2e69 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Tue, 8 Oct 2024 16:00:19 +0200 Subject: [PATCH 04/20] ensure web3 --- .pnpmfile.cjs | 4 ++++ pnpm-lock.yaml | 36 ++++++++---------------------------- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs index e13dbdc7cad4..1ea7ee24830b 100644 --- a/.pnpmfile.cjs +++ b/.pnpmfile.cjs @@ -62,6 +62,10 @@ function readPackage(pkg, context) { addPeerDependencies("@storybook/addon-react-native-web", { webpack: "*", }), + /* @celo/* packages */ + addDependencies("@celo/connect", { + "web3": pkg.peerDependencies?.web3 ?? "1.10", + }), addDependencies("@cosmjs/proto-signing", { "@cosmjs/crypto": pkg.version, "@cosmjs/encoding": pkg.version, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 712b61bfb3ce..d890a1833dfc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ overrides: packageExtensionsChecksum: bcc0ac67c2d7bcc88fe46412ebcf46be -pnpmfileChecksum: 5u75dtojn5ihmrmct6hd2yqpdq +pnpmfileChecksum: 3it4ens57vqjvjphhe4k7ak3za patchedDependencies: '@changesets/get-github-info@0.6.0': @@ -8697,8 +8697,6 @@ packages: '@celo/connect@6.0.1': resolution: {integrity: sha512-nMWivxDeXSILRqsnFZNDz4Rv3eX3xj7++16LT03m5fa6GvlfLvxx1jQ1yv6Hf2Z8yvHEeL36zzBIfqyHOyF99Q==} engines: {node: '>=8.14.2'} - peerDependencies: - web3: 1.10.4 '@celo/contractkit@8.1.1': resolution: {integrity: sha512-EUZaoo8BQIkXKWF4h0UI9yNmVAsDSsDOjTB5C4RrdDkylzn7PGICPmUMq/9WU2QH1zFV9kf1JpGzxlA8Uci6MQ==} @@ -33100,23 +33098,6 @@ snapshots: '@celo/base@6.1.0': {} '@celo/connect@6.0.1': - dependencies: - '@celo/base': 6.1.0 - '@celo/utils': 7.0.0 - '@ethereumjs/util': 8.0.5 - '@types/debug': 4.1.12 - '@types/utf8': 2.1.6 - bignumber.js: 9.1.2 - debug: 4.3.4 - utf8: 3.0.0 - web3-core: 1.10.4 - web3-eth: 1.10.4 - web3-eth-contract: 1.10.4 - transitivePeerDependencies: - - encoding - - supports-color - - '@celo/connect@6.0.1(web3@1.10.4)': dependencies: '@celo/base': 6.1.0 '@celo/utils': 7.0.0 @@ -33131,17 +33112,19 @@ snapshots: web3-eth: 1.10.4 web3-eth-contract: 1.10.4 transitivePeerDependencies: + - bufferutil - encoding - supports-color + - utf-8-validate '@celo/contractkit@8.1.1': dependencies: '@celo/abis': 11.0.0 '@celo/abis-12': '@celo/abis@12.0.0-canary.16' '@celo/base': 6.1.0 - '@celo/connect': 6.0.1(web3@1.10.4) + '@celo/connect': 6.0.1 '@celo/utils': 7.0.0 - '@celo/wallet-local': 6.0.1(web3@1.10.4) + '@celo/wallet-local': 6.0.1 '@types/bn.js': 5.1.5 '@types/debug': 4.1.12 bignumber.js: 9.1.2 @@ -33185,7 +33168,7 @@ snapshots: '@celo/wallet-base@6.0.1': dependencies: '@celo/base': 6.1.0 - '@celo/connect': 6.0.1(web3@1.10.4) + '@celo/connect': 6.0.1 '@celo/utils': 7.0.0 '@ethereumjs/rlp': 5.0.2 '@ethereumjs/util': 8.0.5 @@ -33221,12 +33204,11 @@ snapshots: - encoding - supports-color - utf-8-validate - - web3 - '@celo/wallet-local@6.0.1(web3@1.10.4)': + '@celo/wallet-local@6.0.1': dependencies: '@celo/base': 6.1.0 - '@celo/connect': 6.0.1(web3@1.10.4) + '@celo/connect': 6.0.1 '@celo/utils': 7.0.0 '@celo/wallet-base': 6.0.1 '@ethereumjs/util': 8.0.5 @@ -33235,7 +33217,6 @@ snapshots: - encoding - supports-color - utf-8-validate - - web3 '@celo/wallet-remote@6.0.1': dependencies: @@ -33249,7 +33230,6 @@ snapshots: - encoding - supports-color - utf-8-validate - - web3 '@chainsafe/as-sha256@0.3.1': {} From cf39a8ee46a4bbe79ee5d883a35c1ace5fd88124 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Mon, 14 Oct 2024 16:31:22 +0200 Subject: [PATCH 05/20] upgrade versions --- libs/ledger-live-common/package.json | 8 +- .../src/families/celo/signOperation.ts | 9 ++- pnpm-lock.yaml | 74 +++++++++---------- 3 files changed, 47 insertions(+), 44 deletions(-) diff --git a/libs/ledger-live-common/package.json b/libs/ledger-live-common/package.json index cd705940c897..550624574b47 100644 --- a/libs/ledger-live-common/package.json +++ b/libs/ledger-live-common/package.json @@ -121,11 +121,11 @@ "dependencies": { "@blooo/hw-app-acre": "^1.0.1", "@cardano-foundation/ledgerjs-hw-app-cardano": "^7.1.2", - "@celo/connect": "^6.0.1", - "@celo/contractkit": "^8.1.1", + "@celo/connect": "^6.0.2", + "@celo/contractkit": "^8.3.0", "@celo/utils": "^7.0.0", - "@celo/wallet-base": "^6.0.1", - "@celo/wallet-ledger": "^6.0.1", + "@celo/wallet-base": "^6.0.2", + "@celo/wallet-ledger": "^6.0.2", "@crypto-org-chain/chain-jslib": "1.1.2", "@dfinity/agent": "^0.21.0", "@dfinity/candid": "^0.21.0", diff --git a/libs/ledger-live-common/src/families/celo/signOperation.ts b/libs/ledger-live-common/src/families/celo/signOperation.ts index 6370020a7b8c..af87fb117115 100644 --- a/libs/ledger-live-common/src/families/celo/signOperation.ts +++ b/libs/ledger-live-common/src/families/celo/signOperation.ts @@ -28,19 +28,22 @@ export const signOperation: AccountBridge["signOperati throw new FeeNotLoaded(); } - const celo = new Eth(transport); + // TODO need to check legacy token info too, based on what we found in celo dev + // tooling tepo dont legacy prefix token data when providing to the app + + const eth = new Eth(transport); const unsignedTransaction = await buildTransaction(account, transaction); const { chainId, to } = unsignedTransaction; const rlpEncodedTransaction = rlpEncodedTx(unsignedTransaction); const tokenInfo = tokenInfoByAddressAndChainId(to!, chainId!); if (tokenInfo) { - await celo.provideERC20TokenInformation(`0x${tokenInfo.data.toString("hex")}`); + await eth.provideERC20TokenInformation(`0x${tokenInfo.data.toString("hex")}`); } o.next({ type: "device-signature-requested" }); - const response = await celo.signTransaction( + const response = await eth.signTransaction( account.freshAddressPath, trimLeading0x(rlpEncodedTransaction.rlpEncode), ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d890a1833dfc..f160d0fb8a05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3488,20 +3488,20 @@ importers: specifier: ^7.1.2 version: 7.1.2 '@celo/connect': - specifier: ^6.0.1 - version: 6.0.1 + specifier: ^6.0.2 + version: 6.0.2 '@celo/contractkit': - specifier: ^8.1.1 - version: 8.1.1 + specifier: ^8.3.0 + version: 8.3.0 '@celo/utils': specifier: ^7.0.0 version: 7.0.0 '@celo/wallet-base': - specifier: ^6.0.1 - version: 6.0.1 + specifier: ^6.0.2 + version: 6.0.2 '@celo/wallet-ledger': - specifier: ^6.0.1 - version: 6.0.1 + specifier: ^6.0.2 + version: 6.0.2 '@crypto-org-chain/chain-jslib': specifier: 1.1.2 version: 1.1.2 @@ -8688,18 +8688,18 @@ packages: '@celo/abis@11.0.0': resolution: {integrity: sha512-rPjHQxHbWaKQU3MX6hE3A3xRkBFBphjFvfCs4t+19dqPPys6Q+cneHmRWGBX4NLiBh5BLZcNZjQoMf2jxRLMpg==} - '@celo/abis@12.0.0-canary.16': - resolution: {integrity: sha512-nbynuyhXUZKQTEUlkvQaWI7y4lPXa5xuVLJDLqzNfWbF27E6V1xGoMNUK4XxzmTC161VOPp18Guah2C49kXQ0w==} + '@celo/abis@12.0.0-canary.35': + resolution: {integrity: sha512-6MdEX96TGTaiiqATWDHwdsv3XoUMc0GRr1KVDPH0JKFqxs3/ATnoekAUL+bBn6rzuI+KFnKhRHjcPm4Qjq9EHg==} '@celo/base@6.1.0': resolution: {integrity: sha512-R6ko2QCfEU32akBsaSNsDYduktgwIKHcJ61SbR7EsXA1VE31/44Qh8kMzfgeahyk375DUCe3pJIKwx5zg1tFHg==} - '@celo/connect@6.0.1': - resolution: {integrity: sha512-nMWivxDeXSILRqsnFZNDz4Rv3eX3xj7++16LT03m5fa6GvlfLvxx1jQ1yv6Hf2Z8yvHEeL36zzBIfqyHOyF99Q==} + '@celo/connect@6.0.2': + resolution: {integrity: sha512-l+7UpQlVBtdSonmMmRqJikdv7ygI/LfQEjaGoco5yNY0Bs7nD52TcBSiRqu8VV8lmI2UOZisWCjA/GzeQbRM1Q==} engines: {node: '>=8.14.2'} - '@celo/contractkit@8.1.1': - resolution: {integrity: sha512-EUZaoo8BQIkXKWF4h0UI9yNmVAsDSsDOjTB5C4RrdDkylzn7PGICPmUMq/9WU2QH1zFV9kf1JpGzxlA8Uci6MQ==} + '@celo/contractkit@8.3.0': + resolution: {integrity: sha512-Y2A6Pr+tkb+SYgt09qeF1Z09JZN/AcXXKjHkbc83LEeb6qtCxnWNhxXUY8Mu1Bnk5+Oyf+jrWJPenmuuFIufuQ==} engines: {node: '>=8.14.2'} '@celo/ledger-token-signer@0.4.0': @@ -8708,20 +8708,20 @@ packages: '@celo/utils@7.0.0': resolution: {integrity: sha512-oxAMm19lMs3myhHt2BpuWm01mxZ9ZD73uydQFdgeVj5cNVRKumzMGSEfb0qCQ2hiCHL15R/lCtBqqiRy0wD1LA==} - '@celo/wallet-base@6.0.1': - resolution: {integrity: sha512-6vZxEkm6VcT/LmKDnyxmS6n8YWEUo20E5tccY8XrBxcLAPinaiLfcwEQsgvspIB6m4hG/AH3qtuKby5nC4T/6g==} + '@celo/wallet-base@6.0.2': + resolution: {integrity: sha512-7rmC4dh2OTE7pnrMQdbmc+qopTgX7MpDoe4rCcu8M0eiBbgGaT7e0Xlj24mERqDNJJITxal8F81HsF6KjVhung==} engines: {node: '>=8.14.2'} - '@celo/wallet-ledger@6.0.1': - resolution: {integrity: sha512-gPUJX2zhtNT9xwVKyVjrMZR0cTgQceF+AUbgOYjigMEwctnjBtfxkmUAL12gmTNIF0j4nyPx7Gil8Le0aFNdfg==} + '@celo/wallet-ledger@6.0.2': + resolution: {integrity: sha512-B4VJPPje4sNdhOd/l1KOGoWITCU/G5HtNQrqScX74Wh5bwCo3lJEEv1A++7A3t2a6s/NTJ+Jd1S5MMe7Rsh9oA==} engines: {node: '>=8.14.2'} '@celo/wallet-local@6.0.1': resolution: {integrity: sha512-bSf7qxAs4ONEDrpdJZRqiayWWyKsO7fu2ai8PDQsICnLw8ZsyVP7+oNgr7zberHk6ghdmG1Qp957a0Myw7w6lA==} engines: {node: '>=8.14.2'} - '@celo/wallet-remote@6.0.1': - resolution: {integrity: sha512-eQVyg11s8ncL+CC5R4aqisli8sPREyVJk6doh2DhUGoNbG0Opx8ZiEZ+z1QPDs1bX1U9zY61Jctpd8e7B9UrrQ==} + '@celo/wallet-remote@6.0.2': + resolution: {integrity: sha512-1TPhJMwdJ+thno9ViVKoujUFFxPTVCLglU5/CotK5t8HkstTcbVQ6aswkBJxS/bR+wmLrAnI2Im0jFxMujDTcA==} engines: {node: '>=8.14.2'} '@chainsafe/as-sha256@0.3.1': @@ -33093,11 +33093,11 @@ snapshots: '@celo/abis@11.0.0': {} - '@celo/abis@12.0.0-canary.16': {} + '@celo/abis@12.0.0-canary.35': {} '@celo/base@6.1.0': {} - '@celo/connect@6.0.1': + '@celo/connect@6.0.2': dependencies: '@celo/base': 6.1.0 '@celo/utils': 7.0.0 @@ -33117,12 +33117,12 @@ snapshots: - supports-color - utf-8-validate - '@celo/contractkit@8.1.1': + '@celo/contractkit@8.3.0': dependencies: '@celo/abis': 11.0.0 - '@celo/abis-12': '@celo/abis@12.0.0-canary.16' + '@celo/abis-12': '@celo/abis@12.0.0-canary.35' '@celo/base': 6.1.0 - '@celo/connect': 6.0.1 + '@celo/connect': 6.0.2 '@celo/utils': 7.0.0 '@celo/wallet-local': 6.0.1 '@types/bn.js': 5.1.5 @@ -33165,10 +33165,10 @@ snapshots: web3-eth-abi: 1.10.4 web3-utils: 1.10.4 - '@celo/wallet-base@6.0.1': + '@celo/wallet-base@6.0.2': dependencies: '@celo/base': 6.1.0 - '@celo/connect': 6.0.1 + '@celo/connect': 6.0.2 '@celo/utils': 7.0.0 '@ethereumjs/rlp': 5.0.2 '@ethereumjs/util': 8.0.5 @@ -33185,18 +33185,18 @@ snapshots: - supports-color - utf-8-validate - '@celo/wallet-ledger@6.0.1': + '@celo/wallet-ledger@6.0.2': dependencies: '@celo/base': 6.1.0 - '@celo/connect': 6.0.1 + '@celo/connect': 6.0.2 '@celo/ledger-token-signer': 0.4.0 '@celo/utils': 7.0.0 - '@celo/wallet-base': 6.0.1 - '@celo/wallet-remote': 6.0.1 + '@celo/wallet-base': 6.0.2 + '@celo/wallet-remote': 6.0.2 '@ethereumjs/util': 8.0.5 '@ledgerhq/errors': 6.19.1 '@ledgerhq/hw-app-eth': https://codeload.github.com/celo-org/ledgerjs-hw-app-eth/tar.gz/49bdd4f163f5ff73daa9f54f8e46aa2882b85f44 - '@ledgerhq/hw-transport': 6.30.6 + '@ledgerhq/hw-transport': 6.31.4 debug: 4.3.4 semver: 7.6.3 transitivePeerDependencies: @@ -33208,9 +33208,9 @@ snapshots: '@celo/wallet-local@6.0.1': dependencies: '@celo/base': 6.1.0 - '@celo/connect': 6.0.1 + '@celo/connect': 6.0.2 '@celo/utils': 7.0.0 - '@celo/wallet-base': 6.0.1 + '@celo/wallet-base': 6.0.2 '@ethereumjs/util': 8.0.5 transitivePeerDependencies: - bufferutil @@ -33218,11 +33218,11 @@ snapshots: - supports-color - utf-8-validate - '@celo/wallet-remote@6.0.1': + '@celo/wallet-remote@6.0.2': dependencies: - '@celo/connect': 6.0.1 + '@celo/connect': 6.0.2 '@celo/utils': 7.0.0 - '@celo/wallet-base': 6.0.1 + '@celo/wallet-base': 6.0.2 '@ethereumjs/util': 8.0.5 '@types/debug': 4.1.12 transitivePeerDependencies: From a99936f5e114df6739e3bea2fdb0ff187fb93337 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Tue, 15 Oct 2024 09:51:08 +0200 Subject: [PATCH 06/20] allow both ledgers to work --- .../src/families/celo/celo.ts | 35 +++++++++++++++++++ .../src/families/celo/signOperation.ts | 16 ++++----- 2 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 libs/ledger-live-common/src/families/celo/celo.ts diff --git a/libs/ledger-live-common/src/families/celo/celo.ts b/libs/ledger-live-common/src/families/celo/celo.ts new file mode 100644 index 000000000000..e1fcacdbac9e --- /dev/null +++ b/libs/ledger-live-common/src/families/celo/celo.ts @@ -0,0 +1,35 @@ +import Eth from "@ledgerhq/hw-app-eth"; +import { + tokenInfoByAddressAndChainId, + legacyTokenInfoByAddressAndChainId, +} from "@celo/wallet-ledger/lib/tokens"; + +import SemVer from "semver"; + +export default class Celo extends Eth { + // celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info. + // this legacy version of the app also only supported celo type 0 transactions. + // if you are reading this after celo moved to op based L2 those celo type 0 transactions will no longer work + // so you can safely remove all the legacy paths. + async verifyTokenInfo(to: string, chainId: number): Promise { + const isModern = await this.isAppModern(); + const tokenInfo = isModern + ? tokenInfoByAddressAndChainId(to!, chainId!) + : legacyTokenInfoByAddressAndChainId(to!, chainId!); + + if (tokenInfo) { + // celo-spender-app below version 1.2.3 expected unprefixed hex strings only + const dataString = isModern + ? `0x${tokenInfo.data.toString("hex")}` + : tokenInfo.data.toString("hex"); + + await this.provideERC20TokenInformation(dataString); + } + } + + private async isAppModern(): Promise { + const { version } = await this.getAppConfiguration(); + + return SemVer.statisfy(version, ">= 1.2.3"); + } +} diff --git a/libs/ledger-live-common/src/families/celo/signOperation.ts b/libs/ledger-live-common/src/families/celo/signOperation.ts index af87fb117115..6e506d746778 100644 --- a/libs/ledger-live-common/src/families/celo/signOperation.ts +++ b/libs/ledger-live-common/src/families/celo/signOperation.ts @@ -3,12 +3,12 @@ import { Observable } from "rxjs"; import { FeeNotLoaded } from "@ledgerhq/errors"; import type { AccountBridge } from "@ledgerhq/types-live"; import { rlpEncodedTx, encodeTransaction } from "@celo/wallet-base"; -import { tokenInfoByAddressAndChainId } from "@celo/wallet-ledger/lib/tokens"; + import { buildOptimisticOperation } from "./buildOptimisticOperation"; import type { Transaction, CeloAccount } from "./types"; import { withDevice } from "../../hw/deviceAccess"; import buildTransaction from "./buildTransaction"; -import Eth from "@ledgerhq/hw-app-eth"; +import Celo from "./celo"; /** * Sign Transaction with Ledger hardware @@ -29,21 +29,17 @@ export const signOperation: AccountBridge["signOperati } // TODO need to check legacy token info too, based on what we found in celo dev - // tooling tepo dont legacy prefix token data when providing to the app + // tooling repo dont legacy prefix token data when providing to the app - const eth = new Eth(transport); + const celo = new Celo(transport); const unsignedTransaction = await buildTransaction(account, transaction); const { chainId, to } = unsignedTransaction; + await celo.verifyTokenInfo(to!, chainId!); const rlpEncodedTransaction = rlpEncodedTx(unsignedTransaction); - const tokenInfo = tokenInfoByAddressAndChainId(to!, chainId!); - if (tokenInfo) { - await eth.provideERC20TokenInformation(`0x${tokenInfo.data.toString("hex")}`); - } - o.next({ type: "device-signature-requested" }); - const response = await eth.signTransaction( + const response = await celo.signTransaction( account.freshAddressPath, trimLeading0x(rlpEncodedTransaction.rlpEncode), ); From a3e38438f89503a993bff6f03d3ac8bbb6a47874 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Tue, 15 Oct 2024 11:17:57 +0200 Subject: [PATCH 07/20] feat: handle both legacy and newer versions of celo-spender-app --- .../src/families/celo/buildTransaction.ts | 1 - .../src/families/celo/celo.ts | 39 ++++++++++++++++++- .../src/families/celo/signOperation.ts | 12 +++--- package.json | 2 +- 4 files changed, 45 insertions(+), 9 deletions(-) diff --git a/libs/ledger-live-common/src/families/celo/buildTransaction.ts b/libs/ledger-live-common/src/families/celo/buildTransaction.ts index 41fa78126ed5..138674d41106 100644 --- a/libs/ledger-live-common/src/families/celo/buildTransaction.ts +++ b/libs/ledger-live-common/src/families/celo/buildTransaction.ts @@ -125,7 +125,6 @@ const buildTransaction = async (account: CeloAccount, transaction: Transaction) ...celoTransaction, chainId: await kit.connection.chainId(), nonce: await kit.connection.nonce(account.freshAddress), - gasPrice: await kit.connection.gasPrice(), }; return tx; diff --git a/libs/ledger-live-common/src/families/celo/celo.ts b/libs/ledger-live-common/src/families/celo/celo.ts index e1fcacdbac9e..78c1c772f9d7 100644 --- a/libs/ledger-live-common/src/families/celo/celo.ts +++ b/libs/ledger-live-common/src/families/celo/celo.ts @@ -3,10 +3,19 @@ import { tokenInfoByAddressAndChainId, legacyTokenInfoByAddressAndChainId, } from "@celo/wallet-ledger/lib/tokens"; +import { + encode_deprecated_celo_legacy_type_only_for_temporary_ledger_compat, + rlpEncodedTx, + LegacyEncodedTx, +} from "@celo/wallet-base"; +import type { CeloTx, RLPEncodedTx } from "@celo/connect"; +import { celoKit } from "./api/sdk"; import SemVer from "semver"; export default class Celo extends Eth { + private config?: { version: string }; + // celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info. // this legacy version of the app also only supported celo type 0 transactions. // if you are reading this after celo moved to op based L2 those celo type 0 transactions will no longer work @@ -27,9 +36,35 @@ export default class Celo extends Eth { } } + async determinePrice(txParams: CeloTx): Promise { + const isModern = await this.isAppModern(); + const { + connection: { setFeeMarketGas, gasPrice }, + } = celoKit(); + + if (isModern) { + await setFeeMarketGas(txParams); + } else { + txParams.gasPrice = await gasPrice(); + } + } + + async rlpEncodedTxForLedger(txParams: CeloTx): Promise { + const isModern = await this.isAppModern(); + + // if the app is of minimum version it doesnt matter if chain is cel2 or not + if (isModern) { + return rlpEncodedTx(txParams); + } else { + return encode_deprecated_celo_legacy_type_only_for_temporary_ledger_compat(txParams); + } + } + private async isAppModern(): Promise { - const { version } = await this.getAppConfiguration(); + if (!this.config) { + this.config = await this.getAppConfiguration(); + } - return SemVer.statisfy(version, ">= 1.2.3"); + return SemVer.satisfies(this.config.version, ">= 1.2.3"); } } diff --git a/libs/ledger-live-common/src/families/celo/signOperation.ts b/libs/ledger-live-common/src/families/celo/signOperation.ts index 6e506d746778..0de255c21037 100644 --- a/libs/ledger-live-common/src/families/celo/signOperation.ts +++ b/libs/ledger-live-common/src/families/celo/signOperation.ts @@ -28,14 +28,16 @@ export const signOperation: AccountBridge["signOperati throw new FeeNotLoaded(); } - // TODO need to check legacy token info too, based on what we found in celo dev - // tooling repo dont legacy prefix token data when providing to the app - const celo = new Celo(transport); const unsignedTransaction = await buildTransaction(account, transaction); const { chainId, to } = unsignedTransaction; - await celo.verifyTokenInfo(to!, chainId!); - const rlpEncodedTransaction = rlpEncodedTx(unsignedTransaction); + + await Promise.all([ + celo.verifyTokenInfo(to!, chainId!), + celo.determinePrice(unsignedTransaction), + ]); + + const rlpEncodedTransaction = await celo.rlpEncodedTxForLedger(unsignedTransaction); o.next({ type: "device-signature-requested" }); diff --git a/package.json b/package.json index 51f212be3c46..35f691eaa9eb 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "build:dummy-live-app": "pnpm turbo build --filter=\"@ledgerhq/dummy-live-app\"", "build:actions": "pnpm turbo build --filter=@actions/*", "build:cli": "pnpm turbo build --no-daemon --filter=@ledgerhq/live-cli", - "build:coin": "pnpm turbo build --no-daemon --filter=\"./libs/coin-**\"", + "build:coin": "pnpm turbo build --no-daemon --filter=\"./libs/coin-*\"", "build:domain": "pnpm turbo build --no-daemon --filter=@ledgerhq/domain-service", "build:network": "pnpm turbo build --no-daemon --filter=@ledgerhq/live-network", "build:config": "pnpm turbo build --no-daemon --filter=@ledgerhq/live-config", From f05b0e5c30221bde4b2f7c95cf081ae1abe124b0 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Tue, 15 Oct 2024 11:54:28 +0200 Subject: [PATCH 08/20] fix: getAppConfig lock --- libs/ledger-live-common/src/families/celo/celo.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ledger-live-common/src/families/celo/celo.ts b/libs/ledger-live-common/src/families/celo/celo.ts index 78c1c772f9d7..1db7d3acb4a6 100644 --- a/libs/ledger-live-common/src/families/celo/celo.ts +++ b/libs/ledger-live-common/src/families/celo/celo.ts @@ -14,7 +14,7 @@ import { celoKit } from "./api/sdk"; import SemVer from "semver"; export default class Celo extends Eth { - private config?: { version: string }; + private config?: Promise<{ version: string }>; // celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info. // this legacy version of the app also only supported celo type 0 transactions. @@ -62,9 +62,9 @@ export default class Celo extends Eth { private async isAppModern(): Promise { if (!this.config) { - this.config = await this.getAppConfiguration(); + this.config = this.getAppConfiguration(); } - return SemVer.satisfies(this.config.version, ">= 1.2.3"); + return SemVer.satisfies((await this.config).version, ">= 1.2.3"); } } From bb664ced9f417712391c156771469de2a76f3fc3 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Thu, 17 Oct 2024 11:15:13 +0200 Subject: [PATCH 09/20] WIP --- .../src/families/celo/broadcast.ts | 2 + .../src/families/celo/celo.ts | 6 ++- .../src/families/celo/signOperation.ts | 51 +++++++++++++++++-- 3 files changed, 53 insertions(+), 6 deletions(-) diff --git a/libs/ledger-live-common/src/families/celo/broadcast.ts b/libs/ledger-live-common/src/families/celo/broadcast.ts index 2ad9377da896..2eae4861126f 100644 --- a/libs/ledger-live-common/src/families/celo/broadcast.ts +++ b/libs/ledger-live-common/src/families/celo/broadcast.ts @@ -2,11 +2,13 @@ import { AccountBridge } from "@ledgerhq/types-live"; import { patchOperationWithHash } from "../../operation"; import { Transaction } from "./types"; import { celoKit } from "./api/sdk"; +import { recoverTransaction } from "@celo/wallet-base"; export const broadcast: AccountBridge["broadcast"] = async ({ signedOperation: { operation, signature }, }) => { const kit = celoKit(); + console.info("niconico tx rlp with sig", signature, "recovered", recoverTransaction(signature)); const { transactionHash } = await kit.web3.eth.sendSignedTransaction(signature); return patchOperationWithHash(operation, transactionHash); }; diff --git a/libs/ledger-live-common/src/families/celo/celo.ts b/libs/ledger-live-common/src/families/celo/celo.ts index 1db7d3acb4a6..13f75a8f4830 100644 --- a/libs/ledger-live-common/src/families/celo/celo.ts +++ b/libs/ledger-live-common/src/families/celo/celo.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-console */ import Eth from "@ledgerhq/hw-app-eth"; import { tokenInfoByAddressAndChainId, @@ -16,6 +17,7 @@ import SemVer from "semver"; export default class Celo extends Eth { private config?: Promise<{ version: string }>; + // celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info. // this legacy version of the app also only supported celo type 0 transactions. // if you are reading this after celo moved to op based L2 those celo type 0 transactions will no longer work @@ -31,9 +33,10 @@ export default class Celo extends Eth { const dataString = isModern ? `0x${tokenInfo.data.toString("hex")}` : tokenInfo.data.toString("hex"); - + console.info("niconico provider erc20", dataString); await this.provideERC20TokenInformation(dataString); } + console.info("niconico verify exit"); } async determinePrice(txParams: CeloTx): Promise { @@ -64,6 +67,7 @@ export default class Celo extends Eth { if (!this.config) { this.config = this.getAppConfiguration(); } + console.info("niconico config", this.config); return SemVer.satisfies((await this.config).version, ">= 1.2.3"); } diff --git a/libs/ledger-live-common/src/families/celo/signOperation.ts b/libs/ledger-live-common/src/families/celo/signOperation.ts index 0de255c21037..cdd4e08ed256 100644 --- a/libs/ledger-live-common/src/families/celo/signOperation.ts +++ b/libs/ledger-live-common/src/families/celo/signOperation.ts @@ -1,8 +1,9 @@ +/* eslint-disable no-console */ import { BigNumber } from "bignumber.js"; import { Observable } from "rxjs"; import { FeeNotLoaded } from "@ledgerhq/errors"; import type { AccountBridge } from "@ledgerhq/types-live"; -import { rlpEncodedTx, encodeTransaction } from "@celo/wallet-base"; +import { encodeTransaction, recoverTransaction } from "@celo/wallet-base"; import { buildOptimisticOperation } from "./buildOptimisticOperation"; import type { Transaction, CeloAccount } from "./types"; @@ -27,40 +28,57 @@ export const signOperation: AccountBridge["signOperati if (!transaction.fees) { throw new FeeNotLoaded(); } + console.info("niconico fresh address path aka derivaiton", account.freshAddressPath); const celo = new Celo(transport); const unsignedTransaction = await buildTransaction(account, transaction); + // eslint-disable-next-line no-console + console.info("niconico tx", unsignedTransaction); const { chainId, to } = unsignedTransaction; await Promise.all([ celo.verifyTokenInfo(to!, chainId!), celo.determinePrice(unsignedTransaction), ]); + console.info("niconico tx with price", unsignedTransaction); const rlpEncodedTransaction = await celo.rlpEncodedTxForLedger(unsignedTransaction); o.next({ type: "device-signature-requested" }); - + console.info("niconico sign", rlpEncodedTransaction); + // celo.signTransaction already does the eip155 v chain stuff + // TODO should we be using clearSignTransaction like evm fam does? const response = await celo.signTransaction( account.freshAddressPath, trimLeading0x(rlpEncodedTransaction.rlpEncode), ); + // freshAddressPath is actually a derivation path + const { address } = await celo.getAddress(account.freshAddressPath); + console.info("niconico address", address); + console.info("niconico response", response); if (cancelled) return; - // TODO: this doesn't seem necessary anymore + // TODO this is causing problems (or at least not fixing them) const signature = parseSigningResponse(response, chainId!); o.next({ type: "device-signature-granted" }); const encodedTransaction = await encodeTransaction(rlpEncodedTransaction, signature); + const [_, recoveredAddress] = recoverTransaction(encodedTransaction.raw); + console.info("recoveredAddress"); + if (recoveredAddress !== address) { + console.error("niconio Address does not match", address, recoveredAddress); + } + + console.info("niconico fees", transaction.fees.toFixed()); const operation = buildOptimisticOperation( account, transaction, transaction.fees ?? new BigNumber(0), ); - + console.info("niconico sign op", operation); o.next({ type: "signed", signedOperation: { @@ -83,6 +101,10 @@ export const signOperation: AccountBridge["signOperati const trimLeading0x = (input: string) => (input.startsWith("0x") ? input.slice(2) : input); +// this is where it all goes wrong +// we need to to the conversion from string to number / Buffer. the v seems clearly wrong. +// Buffers im less sure of. might need to do 0x prefix before converting +// v keeps on parsing as 8.123437e1341 or some bs. which seems wrong. it should be an INT. not a decimal. const parseSigningResponse = ( response: { s: string; @@ -96,7 +118,7 @@ const parseSigningResponse = ( r: Buffer; } => { // EIP155 - const sigV = parseInt(response.v, 16); + const sigV = applyEIP155(response.v, 16); let eip155V = chainId * 2 + 35; if (sigV !== eip155V && (sigV & eip155V) !== sigV) { eip155V += 1; @@ -110,3 +132,22 @@ const parseSigningResponse = ( }; export default signOperation; + +// copied from hw-eth +export const applyEIP155 = (vAsHex: string, chainId: number): number => { + const v = parseInt(vAsHex, 16); + + if (v === 0 || v === 1) { + // if v is 0 or 1, it's already representing parity + return chainId * 2 + 35 + v; + } else if (v === 27 || v === 28) { + const parity = v - 27; // transforming v into 0 or 1 to become the parity + return chainId * 2 + 35 + parity; + } + // When chainId is lower than 109, hw-app-eth *can* return a v with EIP155 already applied + // e.g. bsc's chainId is 56 -> v then equals to 147/148 + // optimism's chainId is 10 -> v equals to 55/56 + // ethereum's chainId is 1 -> v equals to 0/1 + // goerli's chainId is 5 -> v equals to 0/1 + return v; +}; \ No newline at end of file From c76c24ed0f570c4fa596147c44c95d63386b4b2f Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Thu, 17 Oct 2024 13:52:21 +0200 Subject: [PATCH 10/20] revert signTransaction using the one from parent class the v from sig gets messed up --- .../src/families/celo/celo.ts | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/libs/ledger-live-common/src/families/celo/celo.ts b/libs/ledger-live-common/src/families/celo/celo.ts index 13f75a8f4830..e83e7e6ba912 100644 --- a/libs/ledger-live-common/src/families/celo/celo.ts +++ b/libs/ledger-live-common/src/families/celo/celo.ts @@ -11,6 +11,7 @@ import { } from "@celo/wallet-base"; import type { CeloTx, RLPEncodedTx } from "@celo/connect"; import { celoKit } from "./api/sdk"; +import { decode, encode } from "rlp"; import SemVer from "semver"; @@ -18,6 +19,63 @@ export default class Celo extends Eth { private config?: Promise<{ version: string }>; + // this works for celo-legacy + async signTransaction( + path: string, + rawTxHex: string, + ): Promise<{ + s: string; + v: string; + r: string; + }> { + const paths = splitPath(path); + const rawTx = Buffer.from(rawTxHex, "hex"); + let offset = 0; + let response; + + const rlpTx = decode(rawTx); + let rlpOffset = 0; + // this seem specific to tx type + if (rlpTx.length > 6) { + const rlpVrs = encode(rlpTx.slice(-3)); + rlpOffset = rawTx.length - (rlpVrs.length - 1); + } + + while (offset !== rawTx.length) { + const first = offset === 0; + const maxChunkSize = first ? 150 - 1 - paths.length * 4 : 150; + let chunkSize = offset + maxChunkSize > rawTx.length ? rawTx.length - offset : maxChunkSize; + if (rlpOffset != 0 && offset + chunkSize == rlpOffset) { + // Make sure that the chunk doesn't end right on the EIP 155 marker if set + chunkSize--; + } + const buffer = Buffer.alloc(first ? 1 + paths.length * 4 + chunkSize : chunkSize); + if (first) { + buffer[0] = paths.length; + paths.forEach((element, index) => { + buffer.writeUInt32BE(element, 1 + 4 * index); + }); + rawTx.copy(buffer, 1 + 4 * paths.length, offset, offset + chunkSize); + } else { + rawTx.copy(buffer, 0, offset, offset + chunkSize); + } + console.info("buffer buffer buffer", buffer.toString()); + response = await this.transport + .send(0xe0, 0x04, first ? 0x00 : 0x80, 0x00, buffer) + .catch(e => { + throw e; + }); + + offset += chunkSize; + } + + const v = response.slice(0, 1).toString("hex"); + const r = response.slice(1, 1 + 32).toString("hex"); + const s = response.slice(1 + 32, 1 + 32 + 32).toString("hex"); + return { v, r, s }; + } + + // celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info. // this legacy version of the app also only supported celo type 0 transactions. // if you are reading this after celo moved to op based L2 those celo type 0 transactions will no longer work @@ -72,3 +130,20 @@ export default class Celo extends Eth { return SemVer.satisfies((await this.config).version, ">= 1.2.3"); } } + + +function splitPath(path: string): number[] { + const result: number[] = []; + const components = path.split("/"); + components.forEach(element => { + let number = parseInt(element, 10); + if (isNaN(number)) { + return; // FIXME shouldn't it throws instead? + } + if (element.length > 1 && element[element.length - 1] === "'") { + number += 0x80000000; + } + result.push(number); + }); + return result; +} \ No newline at end of file From e28e0e2690a96267af9ea975c8570bc61655ebd1 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Thu, 17 Oct 2024 14:29:04 +0200 Subject: [PATCH 11/20] minimize diff --- .../src/families/celo/{celo.ts => hw-app-celo.ts} | 0 libs/ledger-live-common/src/families/celo/signOperation.ts | 2 +- package.json | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename libs/ledger-live-common/src/families/celo/{celo.ts => hw-app-celo.ts} (100%) diff --git a/libs/ledger-live-common/src/families/celo/celo.ts b/libs/ledger-live-common/src/families/celo/hw-app-celo.ts similarity index 100% rename from libs/ledger-live-common/src/families/celo/celo.ts rename to libs/ledger-live-common/src/families/celo/hw-app-celo.ts diff --git a/libs/ledger-live-common/src/families/celo/signOperation.ts b/libs/ledger-live-common/src/families/celo/signOperation.ts index cdd4e08ed256..f9d221df7bf8 100644 --- a/libs/ledger-live-common/src/families/celo/signOperation.ts +++ b/libs/ledger-live-common/src/families/celo/signOperation.ts @@ -9,7 +9,7 @@ import { buildOptimisticOperation } from "./buildOptimisticOperation"; import type { Transaction, CeloAccount } from "./types"; import { withDevice } from "../../hw/deviceAccess"; import buildTransaction from "./buildTransaction"; -import Celo from "./celo"; +import Celo from "./hw-app-celo"; /** * Sign Transaction with Ledger hardware diff --git a/package.json b/package.json index 35f691eaa9eb..51f212be3c46 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "build:dummy-live-app": "pnpm turbo build --filter=\"@ledgerhq/dummy-live-app\"", "build:actions": "pnpm turbo build --filter=@actions/*", "build:cli": "pnpm turbo build --no-daemon --filter=@ledgerhq/live-cli", - "build:coin": "pnpm turbo build --no-daemon --filter=\"./libs/coin-*\"", + "build:coin": "pnpm turbo build --no-daemon --filter=\"./libs/coin-**\"", "build:domain": "pnpm turbo build --no-daemon --filter=@ledgerhq/domain-service", "build:network": "pnpm turbo build --no-daemon --filter=@ledgerhq/live-network", "build:config": "pnpm turbo build --no-daemon --filter=@ledgerhq/live-config", From f5c5423799116b3163146215dfdb092df60ee617 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Thu, 17 Oct 2024 14:48:19 +0200 Subject: [PATCH 12/20] dont modify v for modern txns --- .../src/families/celo/hw-app-celo.ts | 2 +- .../src/families/celo/signOperation.ts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libs/ledger-live-common/src/families/celo/hw-app-celo.ts b/libs/ledger-live-common/src/families/celo/hw-app-celo.ts index e83e7e6ba912..de1a464dce78 100644 --- a/libs/ledger-live-common/src/families/celo/hw-app-celo.ts +++ b/libs/ledger-live-common/src/families/celo/hw-app-celo.ts @@ -121,7 +121,7 @@ export default class Celo extends Eth { } } - private async isAppModern(): Promise { + async isAppModern(): Promise { if (!this.config) { this.config = this.getAppConfiguration(); } diff --git a/libs/ledger-live-common/src/families/celo/signOperation.ts b/libs/ledger-live-common/src/families/celo/signOperation.ts index f9d221df7bf8..cdde31ed27fd 100644 --- a/libs/ledger-live-common/src/families/celo/signOperation.ts +++ b/libs/ledger-live-common/src/families/celo/signOperation.ts @@ -60,7 +60,7 @@ export const signOperation: AccountBridge["signOperati if (cancelled) return; // TODO this is causing problems (or at least not fixing them) - const signature = parseSigningResponse(response, chainId!); + const signature = parseSigningResponse(response, chainId!, await celo.isAppModern()); o.next({ type: "device-signature-granted" }); @@ -112,15 +112,19 @@ const parseSigningResponse = ( r: string; }, chainId: number, + isModern: boolean ): { s: Buffer; v: number; r: Buffer; } => { // EIP155 - const sigV = applyEIP155(response.v, 16); + const sigV = parseInt(response.v, 16); let eip155V = chainId * 2 + 35; - if (sigV !== eip155V && (sigV & eip155V) !== sigV) { + + if (isModern) { + eip155V = sigV; + } else if (sigV !== eip155V && (sigV & eip155V) !== sigV) { eip155V += 1; } From 5411913afa7e116a226e251bb507a40ae02b157c Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Fri, 18 Oct 2024 17:01:02 +0200 Subject: [PATCH 13/20] fix: for modern --- .../src/families/celo/buildTransaction.ts | 1 + .../src/families/celo/hw-app-celo.ts | 119 ++++++++++-------- .../src/families/celo/signOperation.ts | 11 +- .../src/families/celo/synchronisation.ts | 1 + 4 files changed, 75 insertions(+), 57 deletions(-) diff --git a/libs/ledger-live-common/src/families/celo/buildTransaction.ts b/libs/ledger-live-common/src/families/celo/buildTransaction.ts index 138674d41106..2a71142db49a 100644 --- a/libs/ledger-live-common/src/families/celo/buildTransaction.ts +++ b/libs/ledger-live-common/src/families/celo/buildTransaction.ts @@ -99,6 +99,7 @@ const buildTransaction = async (account: CeloAccount, transaction: Transaction) }; } else if (transaction.mode === "register") { const accounts = await kit.contracts.getAccounts(); + console.log("niconico", account, kit.connection.web3.eth.getBalance(account.freshAddress)); celoTransaction = { from: account.freshAddress, to: accounts.address, diff --git a/libs/ledger-live-common/src/families/celo/hw-app-celo.ts b/libs/ledger-live-common/src/families/celo/hw-app-celo.ts index de1a464dce78..33e4c4afe4dc 100644 --- a/libs/ledger-live-common/src/families/celo/hw-app-celo.ts +++ b/libs/ledger-live-common/src/families/celo/hw-app-celo.ts @@ -14,68 +14,22 @@ import { celoKit } from "./api/sdk"; import { decode, encode } from "rlp"; import SemVer from "semver"; +import { LedgerEthTransactionResolution } from "@ledgerhq/hw-app-eth/lib/services/types"; export default class Celo extends Eth { private config?: Promise<{ version: string }>; - - // this works for celo-legacy async signTransaction( path: string, rawTxHex: string, - ): Promise<{ - s: string; - v: string; - r: string; - }> { - const paths = splitPath(path); - const rawTx = Buffer.from(rawTxHex, "hex"); - let offset = 0; - let response; - - const rlpTx = decode(rawTx); - let rlpOffset = 0; - // this seem specific to tx type - if (rlpTx.length > 6) { - const rlpVrs = encode(rlpTx.slice(-3)); - rlpOffset = rawTx.length - (rlpVrs.length - 1); + resolution?: LedgerEthTransactionResolution | null, + ): Promise<{ s: string; v: string; r: string }> { + if (await this.isAppModern()) { + return super.signTransaction(path, rawTxHex, resolution); } - - while (offset !== rawTx.length) { - const first = offset === 0; - const maxChunkSize = first ? 150 - 1 - paths.length * 4 : 150; - let chunkSize = offset + maxChunkSize > rawTx.length ? rawTx.length - offset : maxChunkSize; - if (rlpOffset != 0 && offset + chunkSize == rlpOffset) { - // Make sure that the chunk doesn't end right on the EIP 155 marker if set - chunkSize--; - } - const buffer = Buffer.alloc(first ? 1 + paths.length * 4 + chunkSize : chunkSize); - if (first) { - buffer[0] = paths.length; - paths.forEach((element, index) => { - buffer.writeUInt32BE(element, 1 + 4 * index); - }); - rawTx.copy(buffer, 1 + 4 * paths.length, offset, offset + chunkSize); - } else { - rawTx.copy(buffer, 0, offset, offset + chunkSize); - } - console.info("buffer buffer buffer", buffer.toString()); - response = await this.transport - .send(0xe0, 0x04, first ? 0x00 : 0x80, 0x00, buffer) - .catch(e => { - throw e; - }); - - offset += chunkSize; - } - - const v = response.slice(0, 1).toString("hex"); - const r = response.slice(1, 1 + 32).toString("hex"); - const s = response.slice(1 + 32, 1 + 32 + 32).toString("hex"); - return { v, r, s }; + return this.__dangerous__signTransactionLegacy(path, rawTxHex); } - // celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info. // this legacy version of the app also only supported celo type 0 transactions. // if you are reading this after celo moved to op based L2 those celo type 0 transactions will no longer work @@ -129,8 +83,65 @@ export default class Celo extends Eth { return SemVer.satisfies((await this.config).version, ">= 1.2.3"); } -} + // this works for celo-legacy + // this is code written a long time ago in a galaxy far far away + // do not touch (pretty please) + private async __dangerous__signTransactionLegacy( + path: string, + rawTxHex: string, + ): Promise<{ + s: string; + v: string; + r: string; + }> { + const paths = splitPath(path); + const rawTx = Buffer.from(rawTxHex, "hex"); + let offset = 0; + let response; + + const rlpTx = decode(rawTx); + let rlpOffset = 0; + // this seem specific to tx type + if (rlpTx.length > 6) { + const rlpVrs = encode(rlpTx.slice(-3)); + rlpOffset = rawTx.length - (rlpVrs.length - 1); + } + + while (offset !== rawTx.length) { + const first = offset === 0; + const maxChunkSize = first ? 150 - 1 - paths.length * 4 : 150; + let chunkSize = offset + maxChunkSize > rawTx.length ? rawTx.length - offset : maxChunkSize; + if (rlpOffset != 0 && offset + chunkSize == rlpOffset) { + // Make sure that the chunk doesn't end right on the EIP 155 marker if set + chunkSize--; + } + const buffer = Buffer.alloc(first ? 1 + paths.length * 4 + chunkSize : chunkSize); + if (first) { + buffer[0] = paths.length; + paths.forEach((element, index) => { + buffer.writeUInt32BE(element, 1 + 4 * index); + }); + rawTx.copy(buffer, 1 + 4 * paths.length, offset, offset + chunkSize); + } else { + rawTx.copy(buffer, 0, offset, offset + chunkSize); + } + console.info("buffer buffer buffer", buffer.toString()); + response = await this.transport + .send(0xe0, 0x04, first ? 0x00 : 0x80, 0x00, buffer) + .catch(e => { + throw e; + }); + + offset += chunkSize; + } + + const v = response.slice(0, 1).toString("hex"); + const r = response.slice(1, 1 + 32).toString("hex"); + const s = response.slice(1 + 32, 1 + 32 + 32).toString("hex"); + return { v, r, s }; + } +} function splitPath(path: string): number[] { const result: number[] = []; @@ -146,4 +157,4 @@ function splitPath(path: string): number[] { result.push(number); }); return result; -} \ No newline at end of file +} diff --git a/libs/ledger-live-common/src/families/celo/signOperation.ts b/libs/ledger-live-common/src/families/celo/signOperation.ts index cdde31ed27fd..a6d54fbe9a89 100644 --- a/libs/ledger-live-common/src/families/celo/signOperation.ts +++ b/libs/ledger-live-common/src/families/celo/signOperation.ts @@ -46,7 +46,7 @@ export const signOperation: AccountBridge["signOperati o.next({ type: "device-signature-requested" }); console.info("niconico sign", rlpEncodedTransaction); - // celo.signTransaction already does the eip155 v chain stuff + // celo.signTransaction already does the eip155 v chain stuff // TODO should we be using clearSignTransaction like evm fam does? const response = await celo.signTransaction( account.freshAddressPath, @@ -76,6 +76,9 @@ export const signOperation: AccountBridge["signOperati const operation = buildOptimisticOperation( account, transaction, + // TODO: display issue + // transaction.fees = gas * gasPrice for legacy + // gas * maxFeePerGas for modern transaction.fees ?? new BigNumber(0), ); console.info("niconico sign op", operation); @@ -112,7 +115,7 @@ const parseSigningResponse = ( r: string; }, chainId: number, - isModern: boolean + isModern: boolean, ): { s: Buffer; v: number; @@ -123,6 +126,8 @@ const parseSigningResponse = ( let eip155V = chainId * 2 + 35; if (isModern) { + // eip1559 and other enveloppes txs dont need to modify V + // just use what the ledger device returns eip155V = sigV; } else if (sigV !== eip155V && (sigV & eip155V) !== sigV) { eip155V += 1; @@ -154,4 +159,4 @@ export const applyEIP155 = (vAsHex: string, chainId: number): number => { // ethereum's chainId is 1 -> v equals to 0/1 // goerli's chainId is 5 -> v equals to 0/1 return v; -}; \ No newline at end of file +}; diff --git a/libs/ledger-live-common/src/families/celo/synchronisation.ts b/libs/ledger-live-common/src/families/celo/synchronisation.ts index fbd5297ce9bf..63c34254f339 100644 --- a/libs/ledger-live-common/src/families/celo/synchronisation.ts +++ b/libs/ledger-live-common/src/families/celo/synchronisation.ts @@ -32,6 +32,7 @@ const getAccountShape: GetAccountShape = async info => { } = await getAccountDetails(address, accountId); const accountRegistrationStatus = await getAccountRegistrationStatus(address); + console.log("Nico", accountRegistrationStatus); const pendingWithdrawals = accountRegistrationStatus ? await getPendingWithdrawals(address) : []; From 1241c2d50f69049ac1e25dcba30bda9b02bd25b2 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Mon, 21 Oct 2024 17:04:36 +0200 Subject: [PATCH 14/20] refactor: cleanup console logs --- .../src/families/celo/broadcast.ts | 2 -- .../src/families/celo/buildTransaction.ts | 1 - .../src/families/celo/hw-app-celo.ts | 3 --- .../src/families/celo/signOperation.ts | 19 ++++--------------- .../src/families/celo/synchronisation.ts | 1 - 5 files changed, 4 insertions(+), 22 deletions(-) diff --git a/libs/ledger-live-common/src/families/celo/broadcast.ts b/libs/ledger-live-common/src/families/celo/broadcast.ts index 2eae4861126f..2ad9377da896 100644 --- a/libs/ledger-live-common/src/families/celo/broadcast.ts +++ b/libs/ledger-live-common/src/families/celo/broadcast.ts @@ -2,13 +2,11 @@ import { AccountBridge } from "@ledgerhq/types-live"; import { patchOperationWithHash } from "../../operation"; import { Transaction } from "./types"; import { celoKit } from "./api/sdk"; -import { recoverTransaction } from "@celo/wallet-base"; export const broadcast: AccountBridge["broadcast"] = async ({ signedOperation: { operation, signature }, }) => { const kit = celoKit(); - console.info("niconico tx rlp with sig", signature, "recovered", recoverTransaction(signature)); const { transactionHash } = await kit.web3.eth.sendSignedTransaction(signature); return patchOperationWithHash(operation, transactionHash); }; diff --git a/libs/ledger-live-common/src/families/celo/buildTransaction.ts b/libs/ledger-live-common/src/families/celo/buildTransaction.ts index 2a71142db49a..138674d41106 100644 --- a/libs/ledger-live-common/src/families/celo/buildTransaction.ts +++ b/libs/ledger-live-common/src/families/celo/buildTransaction.ts @@ -99,7 +99,6 @@ const buildTransaction = async (account: CeloAccount, transaction: Transaction) }; } else if (transaction.mode === "register") { const accounts = await kit.contracts.getAccounts(); - console.log("niconico", account, kit.connection.web3.eth.getBalance(account.freshAddress)); celoTransaction = { from: account.freshAddress, to: accounts.address, diff --git a/libs/ledger-live-common/src/families/celo/hw-app-celo.ts b/libs/ledger-live-common/src/families/celo/hw-app-celo.ts index 33e4c4afe4dc..90fa6598d42e 100644 --- a/libs/ledger-live-common/src/families/celo/hw-app-celo.ts +++ b/libs/ledger-live-common/src/families/celo/hw-app-celo.ts @@ -45,10 +45,8 @@ export default class Celo extends Eth { const dataString = isModern ? `0x${tokenInfo.data.toString("hex")}` : tokenInfo.data.toString("hex"); - console.info("niconico provider erc20", dataString); await this.provideERC20TokenInformation(dataString); } - console.info("niconico verify exit"); } async determinePrice(txParams: CeloTx): Promise { @@ -79,7 +77,6 @@ export default class Celo extends Eth { if (!this.config) { this.config = this.getAppConfiguration(); } - console.info("niconico config", this.config); return SemVer.satisfies((await this.config).version, ">= 1.2.3"); } diff --git a/libs/ledger-live-common/src/families/celo/signOperation.ts b/libs/ledger-live-common/src/families/celo/signOperation.ts index a6d54fbe9a89..ac6a2be54f1d 100644 --- a/libs/ledger-live-common/src/families/celo/signOperation.ts +++ b/libs/ledger-live-common/src/families/celo/signOperation.ts @@ -28,24 +28,19 @@ export const signOperation: AccountBridge["signOperati if (!transaction.fees) { throw new FeeNotLoaded(); } - console.info("niconico fresh address path aka derivaiton", account.freshAddressPath); const celo = new Celo(transport); const unsignedTransaction = await buildTransaction(account, transaction); - // eslint-disable-next-line no-console - console.info("niconico tx", unsignedTransaction); const { chainId, to } = unsignedTransaction; await Promise.all([ celo.verifyTokenInfo(to!, chainId!), celo.determinePrice(unsignedTransaction), ]); - console.info("niconico tx with price", unsignedTransaction); const rlpEncodedTransaction = await celo.rlpEncodedTxForLedger(unsignedTransaction); o.next({ type: "device-signature-requested" }); - console.info("niconico sign", rlpEncodedTransaction); // celo.signTransaction already does the eip155 v chain stuff // TODO should we be using clearSignTransaction like evm fam does? const response = await celo.signTransaction( @@ -54,12 +49,9 @@ export const signOperation: AccountBridge["signOperati ); // freshAddressPath is actually a derivation path const { address } = await celo.getAddress(account.freshAddressPath); - console.info("niconico address", address); - console.info("niconico response", response); if (cancelled) return; - // TODO this is causing problems (or at least not fixing them) const signature = parseSigningResponse(response, chainId!, await celo.isAppModern()); o.next({ type: "device-signature-granted" }); @@ -67,21 +59,18 @@ export const signOperation: AccountBridge["signOperati const encodedTransaction = await encodeTransaction(rlpEncodedTransaction, signature); const [_, recoveredAddress] = recoverTransaction(encodedTransaction.raw); - console.info("recoveredAddress"); if (recoveredAddress !== address) { - console.error("niconio Address does not match", address, recoveredAddress); + throw new Error( + "celo: there was a signing error, the recovered address doesn't match the your ledger address, the operation was cancelled", + ); } - console.info("niconico fees", transaction.fees.toFixed()); const operation = buildOptimisticOperation( account, transaction, - // TODO: display issue - // transaction.fees = gas * gasPrice for legacy - // gas * maxFeePerGas for modern transaction.fees ?? new BigNumber(0), ); - console.info("niconico sign op", operation); + o.next({ type: "signed", signedOperation: { diff --git a/libs/ledger-live-common/src/families/celo/synchronisation.ts b/libs/ledger-live-common/src/families/celo/synchronisation.ts index 63c34254f339..fbd5297ce9bf 100644 --- a/libs/ledger-live-common/src/families/celo/synchronisation.ts +++ b/libs/ledger-live-common/src/families/celo/synchronisation.ts @@ -32,7 +32,6 @@ const getAccountShape: GetAccountShape = async info => { } = await getAccountDetails(address, accountId); const accountRegistrationStatus = await getAccountRegistrationStatus(address); - console.log("Nico", accountRegistrationStatus); const pendingWithdrawals = accountRegistrationStatus ? await getPendingWithdrawals(address) : []; From ecaf5215b50ce45067df7d9824d6f7a819ca1831 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Wed, 23 Oct 2024 16:05:54 +0200 Subject: [PATCH 15/20] fix: buffer polyfill --- apps/ledger-live-desktop/jest.config.js | 1 - apps/ledger-live-desktop/jest.polyfills.js | 6 ++++++ apps/ledger-live-desktop/package.json | 14 ++++++++++++++ .../ledger-live-desktop/src/internal/jsdom.test.ts | 3 +++ pnpm-lock.yaml | 3 +++ 5 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 apps/ledger-live-desktop/src/internal/jsdom.test.ts diff --git a/apps/ledger-live-desktop/jest.config.js b/apps/ledger-live-desktop/jest.config.js index 8d1ea9be2a51..83978432b901 100644 --- a/apps/ledger-live-desktop/jest.config.js +++ b/apps/ledger-live-desktop/jest.config.js @@ -37,7 +37,6 @@ const commonConfig = { __SENTRY_URL__: null, __PRERELEASE__: "null", __CHANNEL__: "null", - Buffer: Uint8Array, }, moduleNameMapper, testPathIgnorePatterns, diff --git a/apps/ledger-live-desktop/jest.polyfills.js b/apps/ledger-live-desktop/jest.polyfills.js index 2b1943680bdb..05548742c17a 100644 --- a/apps/ledger-live-desktop/jest.polyfills.js +++ b/apps/ledger-live-desktop/jest.polyfills.js @@ -10,6 +10,11 @@ Object.defineProperties(globalThis, { }); const { Blob, File } = require("node:buffer"); +// Note: this polyfill depends on the patch buffer@6.0.3 which adds the Uint8 +// subarray logic. It's the same as in ledger-live-mobile +// Furthermore, importing 'buffer' gets translated to 'node:buffer' so we're +// using a relative path here +const { Buffer } = require("./node_modules/buffer"); const { fetch, Headers, FormData, Request, Response } = require("undici"); Object.defineProperties(globalThis, { @@ -20,4 +25,5 @@ Object.defineProperties(globalThis, { FormData: { value: FormData }, Request: { value: Request }, Response: { value: Response }, + Buffer: { value: Buffer }, }); diff --git a/apps/ledger-live-desktop/package.json b/apps/ledger-live-desktop/package.json index fe5228c266d4..0655ebe7580d 100644 --- a/apps/ledger-live-desktop/package.json +++ b/apps/ledger-live-desktop/package.json @@ -84,6 +84,7 @@ "@ledgerhq/types-live": "workspace:^", "@sentry/electron": "5.2.0", "@sentry/node": "8.16.0", +<<<<<<< HEAD "@tanstack/react-query": "5.28.9", "@tanstack/react-query-devtools": "5.28.14", "@tippyjs/react": "4.2.6", @@ -94,6 +95,19 @@ "@xstate/react": "1.6.3", "allure-commandline": "2.28.0", "bignumber.js": "9.1.2", +======= + "@tanstack/react-query": "^5.28.9", + "@tanstack/react-query-devtools": "^5.28.9", + "@tippyjs/react": "^4.2.6", + "@trust/keyto": "^1.0.1", + "@types/qrcode": "^1.5.0", + "@types/react-key-handler": "^1.2.0", + "@types/semver": "^7.3.9", + "@xstate/react": "^1.6.3", + "allure-commandline": "^2.28.0", + "bignumber.js": "^9.1.2", + "buffer": "6.0.3", +>>>>>>> a2e1ce0d58 (fix: buffer polyfill) "chart.js": "2.9.4", "color": "4.2.3", "dotenv": "16.4.5", diff --git a/apps/ledger-live-desktop/src/internal/jsdom.test.ts b/apps/ledger-live-desktop/src/internal/jsdom.test.ts new file mode 100644 index 000000000000..ae6ee6983f83 --- /dev/null +++ b/apps/ledger-live-desktop/src/internal/jsdom.test.ts @@ -0,0 +1,3 @@ +test("has Buffer & Uint8array equivalency", () => { + expect(Buffer.from("").subarray() instanceof Uint8Array).toBeTruthy(); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f160d0fb8a05..762d1ebf3b5b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -415,6 +415,9 @@ importers: bignumber.js: specifier: 9.1.2 version: 9.1.2 + buffer: + specifier: 6.0.3 + version: 6.0.3(patch_hash=2xnca52oxhztvr7iaoovwclcze) chart.js: specifier: 2.9.4 version: 2.9.4 From ac3855572ffd05dd5ff1122082cacf35ce5cd16c Mon Sep 17 00:00:00 2001 From: Samy RABAH-MONTAROU Date: Thu, 24 Oct 2024 11:11:49 +0200 Subject: [PATCH 16/20] try out without buffer as uint8array --- libs/ledger-live-common/jest.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ledger-live-common/jest.config.ts b/libs/ledger-live-common/jest.config.ts index 7ba3e110310b..7f8a4e9181b9 100644 --- a/libs/ledger-live-common/jest.config.ts +++ b/libs/ledger-live-common/jest.config.ts @@ -38,7 +38,7 @@ const defaultConfig = { "ts-jest": { isolatedModules: true, }, - Buffer: Uint8Array, + // Buffer: Uint8Array, }, testEnvironment: "node", reporters, From de1b9d672ad6049ad176c42885068f8a8fb0f1cd Mon Sep 17 00:00:00 2001 From: Samy RABAH-MONTAROU Date: Thu, 24 Oct 2024 11:53:36 +0200 Subject: [PATCH 17/20] polyfill alloc --- libs/ledger-live-common/jest.config.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/ledger-live-common/jest.config.ts b/libs/ledger-live-common/jest.config.ts index 7f8a4e9181b9..6fa0ddacb14d 100644 --- a/libs/ledger-live-common/jest.config.ts +++ b/libs/ledger-live-common/jest.config.ts @@ -32,13 +32,23 @@ if (process.env.CI) { reporters.push("github-actions"); } +// interface Uint8ArrayAlloc extends Uint8Array { +// alloc(size: number): Uint8Array; +// } +class U8a extends Uint8Array { + alloc(size: number) { + return new Uint8Array(size); + } +} + + const defaultConfig = { preset: "ts-jest", globals: { "ts-jest": { isolatedModules: true, }, - // Buffer: Uint8Array, + Buffer: U8a, }, testEnvironment: "node", reporters, From 9b6e8130ccd1941f8bc5bef6272fb8aa5b5dad17 Mon Sep 17 00:00:00 2001 From: Samy RABAH-MONTAROU Date: Thu, 24 Oct 2024 12:20:22 +0200 Subject: [PATCH 18/20] buffer setprototype --- libs/ledger-live-common/jest.config.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/libs/ledger-live-common/jest.config.ts b/libs/ledger-live-common/jest.config.ts index 6fa0ddacb14d..51b7cca92ed5 100644 --- a/libs/ledger-live-common/jest.config.ts +++ b/libs/ledger-live-common/jest.config.ts @@ -35,12 +35,18 @@ if (process.env.CI) { // interface Uint8ArrayAlloc extends Uint8Array { // alloc(size: number): Uint8Array; // } -class U8a extends Uint8Array { - alloc(size: number) { - return new Uint8Array(size); - } -} - +// class U8a extends Uint8Array { +// alloc(size: number) { +// return new Uint8Array(size); +// } +// } +// Object.defineProperty(Uint8Array, "alloc", { +// writable: false, +// value: function (size: number) { +// return new Uint8Array(size); +// }, +// }); +Object.setPrototypeOf(Buffer, Uint8Array); const defaultConfig = { preset: "ts-jest", @@ -48,7 +54,7 @@ const defaultConfig = { "ts-jest": { isolatedModules: true, }, - Buffer: U8a, + // Buffer: U8a, }, testEnvironment: "node", reporters, From a52852d5b94370999aebc2ed17a494ec3e4b4d74 Mon Sep 17 00:00:00 2001 From: Samy RABAH-MONTAROU Date: Thu, 24 Oct 2024 14:29:37 +0200 Subject: [PATCH 19/20] rebase with develop --- apps/ledger-live-desktop/package.json | 13 ------------- pnpm-lock.yaml | 7 ------- 2 files changed, 20 deletions(-) diff --git a/apps/ledger-live-desktop/package.json b/apps/ledger-live-desktop/package.json index 0655ebe7580d..5f058870ae29 100644 --- a/apps/ledger-live-desktop/package.json +++ b/apps/ledger-live-desktop/package.json @@ -84,7 +84,6 @@ "@ledgerhq/types-live": "workspace:^", "@sentry/electron": "5.2.0", "@sentry/node": "8.16.0", -<<<<<<< HEAD "@tanstack/react-query": "5.28.9", "@tanstack/react-query-devtools": "5.28.14", "@tippyjs/react": "4.2.6", @@ -95,19 +94,7 @@ "@xstate/react": "1.6.3", "allure-commandline": "2.28.0", "bignumber.js": "9.1.2", -======= - "@tanstack/react-query": "^5.28.9", - "@tanstack/react-query-devtools": "^5.28.9", - "@tippyjs/react": "^4.2.6", - "@trust/keyto": "^1.0.1", - "@types/qrcode": "^1.5.0", - "@types/react-key-handler": "^1.2.0", - "@types/semver": "^7.3.9", - "@xstate/react": "^1.6.3", - "allure-commandline": "^2.28.0", - "bignumber.js": "^9.1.2", "buffer": "6.0.3", ->>>>>>> a2e1ce0d58 (fix: buffer polyfill) "chart.js": "2.9.4", "color": "4.2.3", "dotenv": "16.4.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 762d1ebf3b5b..f32b2f866db0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26304,7 +26304,6 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} deprecated: |- You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. - (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qrcode-terminal@0.11.0: @@ -33135,15 +33134,9 @@ snapshots: debug: 4.3.4 fp-ts: 2.1.1 io-ts: 2.0.1(fp-ts@2.1.1) -<<<<<<< HEAD - semver: 7.5.4 - web3: 1.3.6 - web3-utils: 1.3.6 -======= semver: 7.6.3 web3: 1.10.4 web3-core-helpers: 1.10.4 ->>>>>>> 182ccc1655 (chore: upgrade celo dependencies (closes https://github.com/LedgerHQ/ledger-live/issues/7551)) transitivePeerDependencies: - bufferutil - encoding From 3e52e042f6c9bc223fc04f863158d7c2704077ec Mon Sep 17 00:00:00 2001 From: Samy RABAH-MONTAROU Date: Tue, 29 Oct 2024 15:38:45 +0100 Subject: [PATCH 20/20] rebase 29-10 --- pnpm-lock.yaml | 158 +++++++++++++++++++++---------------------------- 1 file changed, 69 insertions(+), 89 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f32b2f866db0..c6bffcff232f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3495,7 +3495,7 @@ importers: version: 6.0.2 '@celo/contractkit': specifier: ^8.3.0 - version: 8.3.0 + version: 8.3.1 '@celo/utils': specifier: ^7.0.0 version: 7.0.0 @@ -8691,8 +8691,8 @@ packages: '@celo/abis@11.0.0': resolution: {integrity: sha512-rPjHQxHbWaKQU3MX6hE3A3xRkBFBphjFvfCs4t+19dqPPys6Q+cneHmRWGBX4NLiBh5BLZcNZjQoMf2jxRLMpg==} - '@celo/abis@12.0.0-canary.35': - resolution: {integrity: sha512-6MdEX96TGTaiiqATWDHwdsv3XoUMc0GRr1KVDPH0JKFqxs3/ATnoekAUL+bBn6rzuI+KFnKhRHjcPm4Qjq9EHg==} + '@celo/abis@12.0.0-canary.60': + resolution: {integrity: sha512-LLyFbVNOzer4nk19q1g9Svxdnptcz7KVZB2yed3kELrhzRA8HqWVGIAFQV8/PR2ObyxdIHhGWpZTjWsWWo0nJw==} '@celo/base@6.1.0': resolution: {integrity: sha512-R6ko2QCfEU32akBsaSNsDYduktgwIKHcJ61SbR7EsXA1VE31/44Qh8kMzfgeahyk375DUCe3pJIKwx5zg1tFHg==} @@ -8701,8 +8701,8 @@ packages: resolution: {integrity: sha512-l+7UpQlVBtdSonmMmRqJikdv7ygI/LfQEjaGoco5yNY0Bs7nD52TcBSiRqu8VV8lmI2UOZisWCjA/GzeQbRM1Q==} engines: {node: '>=8.14.2'} - '@celo/contractkit@8.3.0': - resolution: {integrity: sha512-Y2A6Pr+tkb+SYgt09qeF1Z09JZN/AcXXKjHkbc83LEeb6qtCxnWNhxXUY8Mu1Bnk5+Oyf+jrWJPenmuuFIufuQ==} + '@celo/contractkit@8.3.1': + resolution: {integrity: sha512-23rJHn2QVbX0LXYDDNR7jI1WgmP9EqroAhI+rFVTuPKQyjzV2wJT8cMAmcE84Xc6sAezkiBT6rt2viX2POUiVA==} engines: {node: '>=8.14.2'} '@celo/ledger-token-signer@0.4.0': @@ -8719,8 +8719,8 @@ packages: resolution: {integrity: sha512-B4VJPPje4sNdhOd/l1KOGoWITCU/G5HtNQrqScX74Wh5bwCo3lJEEv1A++7A3t2a6s/NTJ+Jd1S5MMe7Rsh9oA==} engines: {node: '>=8.14.2'} - '@celo/wallet-local@6.0.1': - resolution: {integrity: sha512-bSf7qxAs4ONEDrpdJZRqiayWWyKsO7fu2ai8PDQsICnLw8ZsyVP7+oNgr7zberHk6ghdmG1Qp957a0Myw7w6lA==} + '@celo/wallet-local@6.0.2': + resolution: {integrity: sha512-bB/IMAeBa5qmhaudzy5e0+M9pxxn4e0PqZWQj/TfStKK8VCWbmhC4wPE7JAVgTE46oYDr6jPZIF6cU5ScqxahA==} engines: {node: '>=8.14.2'} '@celo/wallet-remote@6.0.2': @@ -10669,11 +10669,14 @@ packages: '@types/react': optional: true - '@ledgerhq/cryptoassets@13.3.0': - resolution: {integrity: sha512-OeJ1fTd/vuSiwSBkgQTnTrp+VB1S3MsJRwQ2fxRD1eeqyRvmC0rzpklSlx0I3XVsGUU5MHxQ5anfceA6Mxkrrw==} + '@ledgerhq/cryptoassets-evm-signatures@13.5.1': + resolution: {integrity: sha512-ktyMb4nx6WGzHZPezfiITwZ5NJDa4twRoeGY81Xb/8JQqOtJprfpL89niJZk1teUT5rcwehGRoJJBl4B94Ea8Q==} - '@ledgerhq/domain-service@1.2.3': - resolution: {integrity: sha512-q46q4fxnZgS7Fn+4P+UKJD4ccSZftljq4Jj36J8dNhuj+fdi0JG1B2B1pk4HbfkaWPMcpbNLXx4NyriN7+ncEQ==} + '@ledgerhq/cryptoassets@13.6.2': + resolution: {integrity: sha512-W++N2aD8eFBb4l7yyl3GGKZ0Nc5okNksQ/jG1lOEJg4ULb8Tp6oy/BW3TAmHHegaz5tdek1j0uQ5C/fD3rop4g==} + + '@ledgerhq/domain-service@1.2.10': + resolution: {integrity: sha512-2VFcikYqzWGq6TJyJocC0UqwReD3qLx4ttk/LOr0z+eM1qHS9v32tGEkEzCNycV7wRs39fUi3xRrhs8RT780GA==} '@ledgerhq/errors@5.50.0': resolution: {integrity: sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==} @@ -10681,15 +10684,15 @@ packages: '@ledgerhq/errors@6.19.1': resolution: {integrity: sha512-75yK7Nnit/Gp7gdrJAz0ipp31CCgncRp+evWt6QawQEtQKYEDfGo10QywgrrBBixeRxwnMy1DP6g2oCWRf1bjw==} - '@ledgerhq/evm-tools@1.2.0': - resolution: {integrity: sha512-cuBcACAMyUqYcJGipFJJwTGtKn6mVHInLHgoXPhI+rtbCa89AgehDP+LTb4PiVn0kZQnK7JD1xn6Jyyr/r7gaw==} + '@ledgerhq/evm-tools@1.2.4': + resolution: {integrity: sha512-3panbP6OWBvU/K5nyYqMsjNiccEniHC8CcS/cpKY3n2I1wbH0gmJD1tw6+fo75kyrSAwaBEwwr5sZ1M0cU6fsA==} '@ledgerhq/hw-app-eth@https://codeload.github.com/celo-org/ledgerjs-hw-app-eth/tar.gz/49bdd4f163f5ff73daa9f54f8e46aa2882b85f44': resolution: {tarball: https://codeload.github.com/celo-org/ledgerjs-hw-app-eth/tar.gz/49bdd4f163f5ff73daa9f54f8e46aa2882b85f44} version: 6.37.1 - '@ledgerhq/hw-transport-mocker@6.29.2': - resolution: {integrity: sha512-s+YcMy0Bna6r1Sm6qiawrd8FBE6AJhUTIUqBxP9n7OuzaIGKdf/Y++16PWfNE1rBuzplbzBDRBLAa4XnQ8uCEA==} + '@ledgerhq/hw-transport-mocker@6.29.4': + resolution: {integrity: sha512-CLDIpQ/eqU8qrCYGY9MyHa+oMgqs6PuNkWtqbcaS4AzNx8L/9bv7y8CZwCjxX6oB/2ZEq42RlL6oZ6Ou3oHnoQ==} '@ledgerhq/hw-transport-u2f@5.36.0-deprecated': resolution: {integrity: sha512-T/+mGHIiUK/ZQATad6DMDmobCMZ1mVST952009jKzhaE1Et2Uy2secU+QhRkx3BfEAkvwa0zSRSYCL9d20Iqjg==} @@ -10728,8 +10731,8 @@ packages: '@ledgerhq/live-app-sdk@0.8.2': resolution: {integrity: sha512-yD+L02pAwTfjeSyixWkfqlh6Xg3yAGFnFitrcHk2WWUtKg1TVmNpWNHLS22LKYYWJ7Lflj/pLLQ0nKm1OsJB9g==} - '@ledgerhq/live-env@2.2.0': - resolution: {integrity: sha512-8cNEk8nvHcgovyIFujPI7Ynr+eJvNwiOE0regn685i4ISK7T5MTQGoIhONYbBxorWRhQaxXWyT8svB8ZwPgKmQ==} + '@ledgerhq/live-env@2.4.0': + resolution: {integrity: sha512-hXkaGPdMZUHbbjfezMKfqUa8LA5gnXfYsnGdQcXorRhdRBqc7w5xtYSlc53Vos88mbDij7iL7NrhDXF//IFd5Q==} '@ledgerhq/logs@5.50.0': resolution: {integrity: sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA==} @@ -10737,14 +10740,14 @@ packages: '@ledgerhq/logs@6.12.0': resolution: {integrity: sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA==} - '@ledgerhq/types-cryptoassets@7.15.0': - resolution: {integrity: sha512-W+CUX9QFIDdwCQt7HNLdSjufAMipTVLGQtPgrw54oeLqWoE75My9/+JjnuZkZB8fBa052EF4pSBcg3YSUelg0g==} + '@ledgerhq/types-cryptoassets@7.16.0': + resolution: {integrity: sha512-/ojtZh3uMjkoo2WLumLLmU4TTjwx/lvF8/pD6hcLjKULrM0jj1SvC91wKxSl6aAAUJYf5YH1YlDToByTX7mOSw==} '@ledgerhq/types-devices@6.25.3': resolution: {integrity: sha512-AUThbVlRugs9sVJGbwQuZGXr0ZKDClQySFERhqCyeHKQAdO9TJ9pKFth/9wKKAo5i7fYRC9sx0P5CvPqOwLqIw==} - '@ledgerhq/types-live@6.50.0': - resolution: {integrity: sha512-6+PQ8/vG1inO0z1wauYdtyWZYKClm+rTigdFBrAuUBYkdkvf9j4TRR0Ekn98qXuWYwjq38rTY9M5C/q2L64oZw==} + '@ledgerhq/types-live@6.52.4': + resolution: {integrity: sha512-cKo+PcGeTxILPeCLdFAu5XiRCPZYDQ6Iz68Y7+fLq13VW8jblpWPHJQybQ2I2gJnzGQle6EPSckfH58qSg6AYA==} '@ledgerhq/wallet-api-client-react@1.3.12': resolution: {integrity: sha512-hf7OlhGtj6yuo42OGyKt0dMPNoIpBHm7u1vTH40yWfsabFaDtPzJFGSkWhBb19/zRtDGpbFr3Plo/WnBLFDfXQ==} @@ -14043,7 +14046,7 @@ packages: metro-react-native-babel-preset: '*' react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - webpack: '5' + webpack: '*' peerDependenciesMeta: react: optional: true @@ -15122,15 +15125,9 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} -<<<<<<< HEAD '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - '@types/ethereumjs-util@5.2.0': - resolution: {integrity: sha512-qwQgQqXXTRv2h2AlJef+tMEszLFkCB9dWnrJYIdAwqjubERXEc/geB+S3apRw0yQyTVnsBf8r6BhlrE8vx+3WQ==} - -======= ->>>>>>> d098269cea (chore: upgrade celo dependencies (closes https://github.com/LedgerHQ/ledger-live/issues/7551)) '@types/events@3.0.3': resolution: {integrity: sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g==} @@ -15361,9 +15358,6 @@ packages: '@types/node@20.8.10': resolution: {integrity: sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==} - '@types/node@22.8.1': - resolution: {integrity: sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==} - '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -16391,7 +16385,7 @@ packages: resolution: {integrity: sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==} engines: {node: '>=6'} peerDependencies: - rxjs: ^5.5.10 + rxjs: '*' zenObservable: '*' peerDependenciesMeta: rxjs: @@ -19631,7 +19625,7 @@ packages: peerDependencies: '@typescript-eslint/eslint-plugin': ^4.0.0 || ^5.0.0 eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - jest: ^27.0.0 + jest: '*' peerDependenciesMeta: '@typescript-eslint/eslint-plugin': optional: true @@ -20397,8 +20391,8 @@ packages: hasBin: true peerDependencies: expo-modules-core: '*' - react: 18.2.0 - react-native: 0.72.10 + react: '*' + react-native: '*' peerDependenciesMeta: expo-modules-core: optional: true @@ -20413,8 +20407,8 @@ packages: peerDependencies: expo-modules-autolinking: '*' expo-modules-core: '*' - react: 18.2.0 - react-native: 0.74.5 + react: '*' + react-native: '*' peerDependenciesMeta: expo-modules-autolinking: optional: true @@ -26304,6 +26298,7 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} deprecated: |- You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. + (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qrcode-terminal@0.11.0: @@ -26547,7 +26542,7 @@ packages: resolution: {integrity: sha512-kBGxI+MIZGBf4wZhNCWwHkMcVP+kbpmrLWH/SkO0qCKc7D7eSPcxQbfpsmsCo8v2KCBYjuGSou+xTqK44D/jMg==} engines: {npm: ^3.0.0} peerDependencies: - prop-types: ^15.6.1 + prop-types: '*' react: '>=15.0.0' peerDependenciesMeta: prop-types: @@ -26574,8 +26569,8 @@ packages: react-native-animatable@1.3.3: resolution: {integrity: sha512-2ckIxZQAsvWn25Ho+DK3d1mXIgj7tITkrS4pYDvx96WyOttSvzzFeQnM2od0+FUMzILbdHDsDEqZvnz1DYNQ1w==} peerDependencies: - react: 16.9.0 - react-native: 0.61.2 + react: '*' + react-native: '*' peerDependenciesMeta: react: optional: true @@ -26585,8 +26580,8 @@ packages: react-native-animatable@1.4.0: resolution: {integrity: sha512-DZwaDVWm2NBvBxf7I0wXKXLKb/TxDnkV53sWhCvei1pRyTX3MVFpkvdYBknNBqPrxYuAIlPxEp7gJOidIauUkw==} peerDependencies: - react: 18.2.0 - react-native: 0.72.6 + react: '*' + react-native: '*' peerDependenciesMeta: react: optional: true @@ -29470,9 +29465,6 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - undici@5.28.3: resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} engines: {node: '>=14.0'} @@ -33095,7 +33087,7 @@ snapshots: '@celo/abis@11.0.0': {} - '@celo/abis@12.0.0-canary.35': {} + '@celo/abis@12.0.0-canary.60': {} '@celo/base@6.1.0': {} @@ -33119,14 +33111,14 @@ snapshots: - supports-color - utf-8-validate - '@celo/contractkit@8.3.0': + '@celo/contractkit@8.3.1': dependencies: '@celo/abis': 11.0.0 - '@celo/abis-12': '@celo/abis@12.0.0-canary.35' + '@celo/abis-12': '@celo/abis@12.0.0-canary.60' '@celo/base': 6.1.0 '@celo/connect': 6.0.2 '@celo/utils': 7.0.0 - '@celo/wallet-local': 6.0.1 + '@celo/wallet-local': 6.0.2 '@types/bn.js': 5.1.5 '@types/debug': 4.1.12 bignumber.js: 9.1.2 @@ -33134,7 +33126,7 @@ snapshots: debug: 4.3.4 fp-ts: 2.1.1 io-ts: 2.0.1(fp-ts@2.1.1) - semver: 7.6.3 + semver: 7.5.4 web3: 1.10.4 web3-core-helpers: 1.10.4 transitivePeerDependencies: @@ -33201,7 +33193,7 @@ snapshots: - supports-color - utf-8-validate - '@celo/wallet-local@6.0.1': + '@celo/wallet-local@6.0.2': dependencies: '@celo/base': 6.1.0 '@celo/connect': 6.0.2 @@ -37040,17 +37032,23 @@ snapshots: optionalDependencies: '@types/react': 18.2.73 - '@ledgerhq/cryptoassets@13.3.0': + '@ledgerhq/cryptoassets-evm-signatures@13.5.1': dependencies: + '@ledgerhq/live-env': 2.4.0 + axios: 1.7.7 + + '@ledgerhq/cryptoassets@13.6.2': + dependencies: + '@ledgerhq/live-env': 2.4.0 axios: 1.7.7 bs58check: 2.1.2 invariant: 2.2.4 - '@ledgerhq/domain-service@1.2.3': + '@ledgerhq/domain-service@1.2.10': dependencies: '@ledgerhq/errors': 6.19.1 '@ledgerhq/logs': 6.12.0 - '@ledgerhq/types-live': 6.50.0 + '@ledgerhq/types-live': 6.52.4 axios: 1.7.7 eip55: 2.1.1 react: 18.3.1 @@ -37060,10 +37058,10 @@ snapshots: '@ledgerhq/errors@6.19.1': {} - '@ledgerhq/evm-tools@1.2.0': + '@ledgerhq/evm-tools@1.2.4': dependencies: - '@ledgerhq/cryptoassets': 13.3.0 - '@ledgerhq/live-env': 2.2.0 + '@ledgerhq/cryptoassets-evm-signatures': 13.5.1 + '@ledgerhq/live-env': 2.4.0 axios: 1.7.7 crypto-js: 4.2.0 ethers: 5.7.2 @@ -37075,23 +37073,23 @@ snapshots: dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/rlp': 5.7.0 - '@ledgerhq/cryptoassets': 13.3.0 - '@ledgerhq/domain-service': 1.2.3 + '@ledgerhq/cryptoassets': 13.6.2 + '@ledgerhq/domain-service': 1.2.10 '@ledgerhq/errors': 6.19.1 - '@ledgerhq/evm-tools': 1.2.0 + '@ledgerhq/evm-tools': 1.2.4 '@ledgerhq/hw-transport': 6.31.4 - '@ledgerhq/hw-transport-mocker': 6.29.2 + '@ledgerhq/hw-transport-mocker': 6.29.4 '@ledgerhq/logs': 6.12.0 - '@ledgerhq/types-cryptoassets': 7.15.0 + '@ledgerhq/types-cryptoassets': 7.16.0 '@ledgerhq/types-devices': 6.25.3 - '@ledgerhq/types-live': 6.50.0 + '@ledgerhq/types-live': 6.52.4 axios: 1.7.7 bignumber.js: 9.1.2 transitivePeerDependencies: - bufferutil - utf-8-validate - '@ledgerhq/hw-transport-mocker@6.29.2': + '@ledgerhq/hw-transport-mocker@6.29.4': dependencies: '@ledgerhq/hw-transport': 6.31.4 '@ledgerhq/logs': 6.12.0 @@ -37156,7 +37154,7 @@ snapshots: bignumber.js: 9.1.2 json-rpc-2.0: 1.7.0 - '@ledgerhq/live-env@2.2.0': + '@ledgerhq/live-env@2.4.0': dependencies: rxjs: 7.8.1 utility-types: 3.11.0 @@ -37165,20 +37163,16 @@ snapshots: '@ledgerhq/logs@6.12.0': {} -<<<<<<< HEAD - '@ledgerhq/wallet-api-client-react@1.3.12(react@18.3.1)': -======= - '@ledgerhq/types-cryptoassets@7.15.0': {} + '@ledgerhq/types-cryptoassets@7.16.0': {} '@ledgerhq/types-devices@6.25.3': {} - '@ledgerhq/types-live@6.50.0': + '@ledgerhq/types-live@6.52.4': dependencies: bignumber.js: 9.1.2 rxjs: 7.8.1 - '@ledgerhq/wallet-api-client-react@1.3.12(react@18.2.0)': ->>>>>>> d098269cea (chore: upgrade celo dependencies (closes https://github.com/LedgerHQ/ledger-live/issues/7551)) + '@ledgerhq/wallet-api-client-react@1.3.12(react@18.3.1)': dependencies: '@ledgerhq/wallet-api-client': 1.6.0 react: 18.3.1 @@ -44518,16 +44512,8 @@ snapshots: '@types/estree@1.0.5': {} -<<<<<<< HEAD '@types/estree@1.0.6': {} - '@types/ethereumjs-util@5.2.0': - dependencies: - '@types/bn.js': 5.1.5 - '@types/node': 20.12.12 - -======= ->>>>>>> d098269cea (chore: upgrade celo dependencies (closes https://github.com/LedgerHQ/ledger-live/issues/7551)) '@types/events@3.0.3': {} '@types/express-serve-static-core@4.17.43': @@ -44777,10 +44763,6 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@22.8.1': - dependencies: - undici-types: 6.19.8 - '@types/normalize-package-data@2.4.4': {} '@types/numeral@2.0.5': {} @@ -55516,13 +55498,13 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.8.1 + '@types/node': 20.12.12 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@27.5.1(metro@0.80.12): dependencies: - '@types/node': 22.8.1 + '@types/node': 20.12.12 merge-stream: 2.0.0 supports-color: 8.1.1 optionalDependencies: @@ -55987,7 +55969,7 @@ snapshots: parse5: 6.0.1 saxes: 5.0.1 symbol-tree: 3.2.4 - tough-cookie: 4.1.4 + tough-cookie: 4.1.3 w3c-hr-time: 1.0.2 w3c-xmlserializer: 3.0.0 webidl-conversions: 7.0.0 @@ -65156,8 +65138,6 @@ snapshots: undici-types@5.26.5: {} - undici-types@6.19.8: {} - undici@5.28.3: dependencies: '@fastify/busboy': 2.1.1