From 2a7614d38ba80c318bbe390d7e5988a6245b6b28 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Fri, 17 Jan 2025 22:11:14 +0300 Subject: [PATCH 1/5] Update to latest CSL 13.2.1 --- .../ada/transactions/shelley/ledgerTx.test.js | 8 +- .../ada/transactions/shelley/transactions.js | 31 +- .../transactions/shelley/transactions.test.js | 2 +- .../ada/transactions/shelley/trezorTx.test.js | 8 +- packages/yoroi-extension/package-lock.json | 413 +++--------------- packages/yoroi-extension/package.json | 12 +- 6 files changed, 90 insertions(+), 384 deletions(-) diff --git a/packages/yoroi-extension/app/api/ada/transactions/shelley/ledgerTx.test.js b/packages/yoroi-extension/app/api/ada/transactions/shelley/ledgerTx.test.js index 4fa7f6e50f..e70c1d3765 100644 --- a/packages/yoroi-extension/app/api/ada/transactions/shelley/ledgerTx.test.js +++ b/packages/yoroi-extension/app/api/ada/transactions/shelley/ledgerTx.test.js @@ -278,7 +278,7 @@ test('Create Ledger transaction', async () => { txBuilder.add_output( RustModule.WalletV4.TransactionOutput.new( RustModule.WalletV4.Address.from_hex(byronAddrToHex('Ae2tdPwUPEZAVDjkPPpwDhXMSAjH53CDmd2xMwuR9tZMAZWxLhFphrHKHXe')), - RustModule.WalletV4.Value.new(RustModule.WalletV4.BigNum.from_str('5326134')) + RustModule.WalletV4.Value.new(RustModule.WalletV4.BigNum.from_str('6323634')) ) ); const certs = RustModule.WalletV4.Certificates.new(); @@ -296,7 +296,7 @@ test('Create Ledger transaction', async () => { RustModule.WalletV4.StakeRegistration.new(stakeCredential) )); txBuilder.set_certs(certs); - txBuilder.set_fee(RustModule.WalletV4.BigNum.from_str('1000')); + txBuilder.set_fee(RustModule.WalletV4.BigNum.from_str('2000')); txBuilder.set_ttl(500); const baseConfig = network.BaseConfig @@ -356,7 +356,7 @@ test('Create Ledger transaction', async () => { }, signingMode: TransactionSigningMode.ORDINARY_TRANSACTION, tx: { - fee: '1000', + fee: '2000', ttl: '500', scriptDataHashHex: null, network: { @@ -411,7 +411,7 @@ test('Create Ledger transaction', async () => { }, type: TxOutputDestinationType.THIRD_PARTY, }, - amount: `5326134`, + amount: `6323634`, datumHashHex: null, tokenBundle: null, }], diff --git a/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.js b/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.js index d1048aedef..b0d5ec6a6b 100644 --- a/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.js +++ b/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.js @@ -47,6 +47,7 @@ import { import { TxBuilder, SendRequest } from '@emurgo/yoroi-eutxo-txs/dist/tx-builder' import blake2b from 'blake2b'; import { derivePrivateByAddressing } from '../../lib/cardanoCrypto/deriveByAddressing'; +import type { TxMint } from '@emurgo/yoroi-eutxo-txs/dist/tx-builder'; /** * based off what the cardano-wallet team found worked empirically @@ -61,12 +62,6 @@ export type TxOutput = {| data?: string, |}; -type TxMint = {| - policyScript: string, // HEX of the WASM policy script, - assetName: string, // HEX - amount: string, -|}; - type TxAuxiliaryData = {| metadata: ?TxMetadata, nativeScripts: ?Array, @@ -679,6 +674,7 @@ export async function newAdaUnsignedTxFromUtxo( WalletType.Shelley, { path: changeAdaAddr.addressing.path, + // $FlowIgnore start: changeAdaAddr.addressing.startLevel, } ); @@ -701,11 +697,15 @@ export async function newAdaUnsignedTxFromUtxo( const signRequestChangeAddr = []; if (unsignedTx.change) { + const spendingKeyInfo = unsignedTx.change.address.spendingKeyInfo; + if (spendingKeyInfo == null) { + throw new Error('Missing spendingKeyInfo in change address'); + } signRequestChangeAddr.push({ address: unsignedTx.change.address.hex, addressing: { - path: unsignedTx.change.address.spendingKeyInfo.path, - startLevel: unsignedTx.change.address.spendingKeyInfo.start, + path: spendingKeyInfo.path, + startLevel: spendingKeyInfo.start, }, values: libValueToMultiToken( unsignedTx.change.value, @@ -716,7 +716,9 @@ export async function newAdaUnsignedTxFromUtxo( } const utxosMap = new Map(utxos.map(u => [u.utxo_id, u])); return { + // $FlowIgnore senderUtxos: unsignedTx.inputs.asArray().map(u => utxosMap.get(u.tx + u.index)), + // $FlowIgnore txBuilder: unsignedTx.builder.wasm, changeAddr: signRequestChangeAddr, }; @@ -866,6 +868,7 @@ async function newAdaUnsignedTxFromUtxoForConnector( setRuntime(RustModule.CrossCsl.init); const defaultNetworkConfig = { + networkId, linearFee: { coefficient: protocolParams.linearFeeCoefficient, constant: protocolParams.linearFeeConstant, @@ -892,6 +895,7 @@ async function newAdaUnsignedTxFromUtxoForConnector( const txBuilder = await TxBuilder.new(defaultNetworkConfig, utxoSet); await txBuilder.addRequiredInputs( + // $FlowIgnore await Promise.all( mustIncludeUtxos.map(async ([utxo, witness]) => { let taggedWitness; @@ -993,6 +997,7 @@ async function newAdaUnsignedTxFromUtxoForConnector( WalletType.Shelley, { path: changeAdaAddr.addressing.path, + // $FlowIgnore start: changeAdaAddr.addressing.startLevel, } ); @@ -1003,11 +1008,15 @@ async function newAdaUnsignedTxFromUtxoForConnector( const signRequestChangeAddr = []; if (unsignedTx.change) { + const spendingKeyInfo = unsignedTx.change.address.spendingKeyInfo; + if (spendingKeyInfo == null) { + throw new Error('Missing spendingKeyInfo in change address'); + } signRequestChangeAddr.push({ address: unsignedTx.change.address.hex, addressing: { - path: unsignedTx.change.address.spendingKeyInfo.path, - startLevel: unsignedTx.change.address.spendingKeyInfo.start, + path: spendingKeyInfo.path, + startLevel: spendingKeyInfo.start, }, values: libValueToMultiToken( unsignedTx.change.value, @@ -1024,7 +1033,9 @@ async function newAdaUnsignedTxFromUtxoForConnector( ].map(u => [u.utxo_id, u]) ); return { + // $FlowIgnore senderUtxos: unsignedTx.inputs.asArray().map(u => utxosMap.get(u.tx + u.index)), + // $FlowIgnore txBuilder: unsignedTx.builder.wasm, changeAddr: signRequestChangeAddr, }; diff --git a/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.test.js b/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.test.js index d256e52540..adba8312e1 100644 --- a/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.test.js +++ b/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.test.js @@ -750,7 +750,7 @@ describe('Create unsigned TX from addresses', () => { expect(unsignedTxResponse.txBuilder.get_explicit_input().coin().to_str()).toEqual('1000001'); expect(unsignedTxResponse.txBuilder.get_explicit_output().coin().to_str()).toEqual('5001'); - expect(unsignedTxResponse.txBuilder.min_fee().to_str()).toEqual('1006'); + expect(unsignedTxResponse.txBuilder.min_fee().to_str()).toEqual('995000'); // burns remaining amount expect( unsignedTxResponse.txBuilder.get_explicit_input().checked_sub( diff --git a/packages/yoroi-extension/app/api/ada/transactions/shelley/trezorTx.test.js b/packages/yoroi-extension/app/api/ada/transactions/shelley/trezorTx.test.js index e32df8f983..3ce0911960 100644 --- a/packages/yoroi-extension/app/api/ada/transactions/shelley/trezorTx.test.js +++ b/packages/yoroi-extension/app/api/ada/transactions/shelley/trezorTx.test.js @@ -190,7 +190,7 @@ test('Create Trezor transaction', async () => { txBuilder.add_output( RustModule.WalletV4.TransactionOutput.new( RustModule.WalletV4.Address.from_hex(byronAddrToHex('Ae2tdPwUPEZAVDjkPPpwDhXMSAjH53CDmd2xMwuR9tZMAZWxLhFphrHKHXe')), - RustModule.WalletV4.Value.new(RustModule.WalletV4.BigNum.from_str('5326134')) + RustModule.WalletV4.Value.new(RustModule.WalletV4.BigNum.from_str('6323634')) ) ); const certs = RustModule.WalletV4.Certificates.new(); @@ -207,7 +207,7 @@ test('Create Trezor transaction', async () => { RustModule.WalletV4.StakeRegistration.new(stakeCredential) )); txBuilder.set_certs(certs); - txBuilder.set_fee(RustModule.WalletV4.BigNum.from_str('1000')); + txBuilder.set_fee(RustModule.WalletV4.BigNum.from_str('2000')); txBuilder.set_ttl(500); const baseConfig = network.BaseConfig @@ -235,7 +235,7 @@ test('Create Trezor transaction', async () => { Number.parseInt(ChainNetworkId, 10), ); expect(response).toStrictEqual({ - fee: '1000', + fee: '2000', ttl: '500', networkId: 1, protocolMagic: 764824073, @@ -260,7 +260,7 @@ test('Create Trezor transaction', async () => { }], outputs: [{ address: 'Ae2tdPwUPEZAVDjkPPpwDhXMSAjH53CDmd2xMwuR9tZMAZWxLhFphrHKHXe', - amount: `5326134` + amount: `6323634` }], certificates: [{ path: [ diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index c17568a4a4..fe4f3625a0 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -15,12 +15,12 @@ "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", "@emurgo/cardano-message-signing-browser": "1.0.1", - "@emurgo/cardano-serialization-lib-browser": "13.1.0", + "@emurgo/cardano-serialization-lib-browser": "13.2.1", "@emurgo/cip14-js": "2.0.0", "@emurgo/cip4-js": "1.0.5", - "@emurgo/cross-csl-browser": "6.1.0", - "@emurgo/yoroi-eutxo-txs": "0.0.2-alpha.9", - "@emurgo/yoroi-lib": "1.2.3", + "@emurgo/cross-csl-browser": "6.2.1", + "@emurgo/yoroi-eutxo-txs": "0.0.5", + "@emurgo/yoroi-lib": "2.2.6", "@ledgerhq/hw-transport-u2f": "5.36.0-deprecated", "@ledgerhq/hw-transport-webauthn": "5.36.0-deprecated", "@ledgerhq/hw-transport-webhid": "5.51.1", @@ -112,8 +112,8 @@ "@babel/runtime": "7.12.18", "@babel/runtime-corejs3": "7.12.18", "@emurgo/cardano-message-signing-nodejs": "1.0.1", - "@emurgo/cardano-serialization-lib-nodejs": "13.1.0", - "@emurgo/cross-csl-nodejs": "6.1.0", + "@emurgo/cardano-serialization-lib-nodejs": "13.2.1", + "@emurgo/cross-csl-nodejs": "6.2.1", "@pmmmwh/react-refresh-webpack-plugin": "0.5.11", "@types/chrome": "^0.0.268", "@types/react-intl": "^3.0.0", @@ -2435,20 +2435,14 @@ "dev": true }, "node_modules/@emurgo/cardano-serialization-lib-browser": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-browser/-/cardano-serialization-lib-browser-13.1.0.tgz", - "integrity": "sha512-ysHnLqSZS8akOtKHbmBtfhDacQv/GfQ+dBs/HbHMiV+sxb/0sDB/5bgD3JddY5kpa34zkwFi3aR+nzpZjwKS6w==" + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-browser/-/cardano-serialization-lib-browser-13.2.1.tgz", + "integrity": "sha512-7RfX1gI16Vj2DgCp/ZoXqyLAakWo6+X95ku/rYGbVzuS/1etrlSiJmdbmdm+eYmszMlGQjrtOJQeVLXoj4L/Ag==" }, "node_modules/@emurgo/cardano-serialization-lib-nodejs": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-nodejs/-/cardano-serialization-lib-nodejs-13.1.0.tgz", - "integrity": "sha512-KBIBGEOjTWmilQ3VHTydtMgGSiJkVK14b5N+DwBp2kkO1IqwJyzFQOWDMkQGgEFuJ1Y4Yu05xyxph1JY9/m65w==", - "dev": true - }, - "node_modules/@emurgo/cardano-serialization-lib-nodejs-gc": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-nodejs-gc/-/cardano-serialization-lib-nodejs-gc-12.1.1.tgz", - "integrity": "sha512-PRay6ceSQhH8OsOOUG4QwPU6u1wXFDMoxcHv4KENnIjLk8pKb0ggLr6S1GZ603YJRi9KLh+pw97yL08a8ZG0PA==", + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-serialization-lib-nodejs/-/cardano-serialization-lib-nodejs-13.2.1.tgz", + "integrity": "sha512-0g2O3YHnoQbkHj5M8FB7ftnljXQ9M3zmKxZnwCbYGr1Pw4FkBA0BRh0+GHPlTxyemcpP2yyuW439I9Ds9drFhA==", "dev": true }, "node_modules/@emurgo/cip14-js": { @@ -2515,38 +2509,36 @@ "integrity": "sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ==" }, "node_modules/@emurgo/cross-csl-browser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-browser/-/cross-csl-browser-6.1.0.tgz", - "integrity": "sha512-ZSWivgrkFBa7rJxO0hdhN9AnclTBdavGB68FcqKVMaQhEowYLo7kULYcZatiwSGuWvkBIFdd7hAlIDu8VT4F0A==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-browser/-/cross-csl-browser-6.2.1.tgz", + "integrity": "sha512-PFNHKv3Kt/fJAUMUuwhjjumQhjVDROnX9WhfCbau6FY69oDNLALCGhrPmRaL7vhUUrrnOoqhptVAk3Zt8rOOcA==", "dependencies": { - "@emurgo/cardano-serialization-lib-browser": "13.1.0", - "@emurgo/cross-csl-core": "6.1.0" + "@emurgo/cardano-serialization-lib-browser": "13.2.1", + "@emurgo/cross-csl-core": "6.2.1" } }, "node_modules/@emurgo/cross-csl-core": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-core/-/cross-csl-core-6.1.0.tgz", - "integrity": "sha512-eM6jyhiYkLhie0AKyRpvM1bFpvm3hnbwrbJKy/AB47fZUqbqn/BAIQScQ3tXce0Z9qQ24QLQLBLdqU5u3mL80A==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-core/-/cross-csl-core-6.2.1.tgz", + "integrity": "sha512-oQBBuwWE36I94/9/DY/HUUm3r6725mLqulb8By9C70iAvdgoewDUIIUvBigQhxIuHav8/fbaioJTQIOaj0sVvw==" }, "node_modules/@emurgo/cross-csl-nodejs": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-nodejs/-/cross-csl-nodejs-6.1.0.tgz", - "integrity": "sha512-xcfAJNT+u4mUF9YEfLOl2m7tfOG/85AFQazuSh8nMVtfdqC8npkuGCSk/CtSB1wLfXG0Nd+e+S4vZfU4JCoVlQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-nodejs/-/cross-csl-nodejs-6.2.1.tgz", + "integrity": "sha512-mL+s/qlI2qYEjX/ihgrVqh1xWLZti0nuzgJ83Iii+RMjGcFgrvWEFSxVnEFQzomFDEP+4wOAphrO4CaI6rQmgA==", "dev": true, "dependencies": { - "@emurgo/cardano-serialization-lib-nodejs": "13.1.0", - "@emurgo/cardano-serialization-lib-nodejs-gc": "12.1.1", - "@emurgo/cross-csl-core": "6.1.0" + "@emurgo/cardano-serialization-lib-nodejs": "13.2.1", + "@emurgo/cross-csl-core": "6.2.1" } }, "node_modules/@emurgo/yoroi-eutxo-txs": { - "version": "0.0.2-alpha.9", - "resolved": "https://registry.npmjs.org/@emurgo/yoroi-eutxo-txs/-/yoroi-eutxo-txs-0.0.2-alpha.9.tgz", - "integrity": "sha512-if73sLQAO2xA02eEeRlQte6ixfhEsb8Ql0AbZ7Kj7YU3+9bU2P/Nguy0fyeQpdfGf33hszNSl3GEYZsiBzF4DQ==", + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@emurgo/yoroi-eutxo-txs/-/yoroi-eutxo-txs-0.0.5.tgz", + "integrity": "sha512-yhJOkRs3aiWIp0HrWv2HnNC3fnXecVt3zlHAY5KZmfTDY9JdR31WcDDrOB7U0zGHzshCCoUn2W8AkZCIEaO58Q==", "dependencies": { - "@cardano-foundation/ledgerjs-hw-app-cardano": "^5.0.0", - "@emurgo/cross-csl-core": "6.1.0", - "@ledgerhq/hw-transport-node-hid": "^6.27.2", + "@cardano-foundation/ledgerjs-hw-app-cardano": "7.1.3", + "@emurgo/cross-csl-core": "6.2.1", "axios": "^0.27.2", "bech32": "^2.0.0", "bignumber.js": "^9.1.0", @@ -2554,55 +2546,6 @@ "hash-wasm": "^4.9.0" } }, - "node_modules/@emurgo/yoroi-eutxo-txs/node_modules/@cardano-foundation/ledgerjs-hw-app-cardano": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@cardano-foundation/ledgerjs-hw-app-cardano/-/ledgerjs-hw-app-cardano-5.1.0.tgz", - "integrity": "sha512-ucuz/XbS/0ZD0Bal/GI/kiTm9jDIl8J+A7ypEqcAcBDGicFsyWmtPotOTwuDovTsiM8+eA/5OGTFX0oRqzxstQ==", - "dependencies": { - "@ledgerhq/hw-transport": "^5.12.0", - "@types/ledgerhq__hw-transport": "^4.21.3", - "base-x": "^3.0.5", - "bech32": "^1.1.4", - "blake2": "^4.0.2", - "int64-buffer": "^1.0.1" - } - }, - "node_modules/@emurgo/yoroi-eutxo-txs/node_modules/@cardano-foundation/ledgerjs-hw-app-cardano/node_modules/bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" - }, - "node_modules/@emurgo/yoroi-eutxo-txs/node_modules/@ledgerhq/devices": { - "version": "5.51.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-5.51.1.tgz", - "integrity": "sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA==", - "dependencies": { - "@ledgerhq/errors": "^5.50.0", - "@ledgerhq/logs": "^5.50.0", - "rxjs": "6", - "semver": "^7.3.5" - } - }, - "node_modules/@emurgo/yoroi-eutxo-txs/node_modules/@ledgerhq/errors": { - "version": "5.50.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-5.50.0.tgz", - "integrity": "sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==" - }, - "node_modules/@emurgo/yoroi-eutxo-txs/node_modules/@ledgerhq/hw-transport": { - "version": "5.51.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz", - "integrity": "sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw==", - "dependencies": { - "@ledgerhq/devices": "^5.51.1", - "@ledgerhq/errors": "^5.50.0", - "events": "^3.3.0" - } - }, - "node_modules/@emurgo/yoroi-eutxo-txs/node_modules/@ledgerhq/logs": { - "version": "5.50.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-5.50.0.tgz", - "integrity": "sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA==" - }, "node_modules/@emurgo/yoroi-eutxo-txs/node_modules/axios": { "version": "0.27.2", "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", @@ -2625,37 +2568,22 @@ "node": ">= 6" } }, - "node_modules/@emurgo/yoroi-eutxo-txs/node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" - } - }, "node_modules/@emurgo/yoroi-lib": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@emurgo/yoroi-lib/-/yoroi-lib-1.2.3.tgz", - "integrity": "sha512-dvrn11mUQDwK9olJ9+gs6h/IHLIvNum1g3CLGktUWTkhnEyY3Bl7YswGUlVvWw4KKrTouHjyBe4QucgluRpjZw==", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/@emurgo/yoroi-lib/-/yoroi-lib-2.2.6.tgz", + "integrity": "sha512-MUAyaoWu/C9feJn42QUIwWAZMRBl5YCWEsqeP6Zs4FVw02E4b6Rb7AR22rsMJCZBFm540V0U5ZcyllU9r1H41w==", "dependencies": { "@cardano-foundation/ledgerjs-hw-app-cardano": "^7.1.3", - "@emurgo/cross-csl-core": "5.1.2", + "@emurgo/cross-csl-core": "6.2.1", "@noble/hashes": "^1.3.2", "axios": "^1.7.5", "axios-cache-interceptor": "^1.5.3", "bech32": "^2.0.0", "bignumber.js": "^9.0.1", + "blake2b": "2.1.4", "easy-crc": "1.1.0" } }, - "node_modules/@emurgo/yoroi-lib/node_modules/@emurgo/cross-csl-core": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@emurgo/cross-csl-core/-/cross-csl-core-5.1.2.tgz", - "integrity": "sha512-+zR8DR/UEql/S5BBnA6sbEGKVRow7NHI896K8UDt5+W3J3cZVAZEsbm9faaH+DehpqvensVNHwxooxk30wEOpg==" - }, "node_modules/@emurgo/yoroi-lib/node_modules/axios": { "version": "1.7.5", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", @@ -3633,33 +3561,6 @@ "events": "^3.3.0" } }, - "node_modules/@ledgerhq/hw-transport-node-hid": { - "version": "6.28.6", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-6.28.6.tgz", - "integrity": "sha512-USSTOO0zv9XtguWismP7/StnNS/s7Rz0JOGGaBhKe3Bzl7d5XPncUlmOvoNFzzY/QdasEoFs2QId1+ibJG71Vw==", - "dependencies": { - "@ledgerhq/devices": "^8.3.0", - "@ledgerhq/errors": "^6.16.4", - "@ledgerhq/hw-transport": "^6.30.6", - "@ledgerhq/hw-transport-node-hid-noevents": "^6.29.6", - "@ledgerhq/logs": "^6.12.0", - "lodash": "^4.17.21", - "node-hid": "^2.1.2", - "usb": "2.9.0" - } - }, - "node_modules/@ledgerhq/hw-transport-node-hid-noevents": { - "version": "6.29.6", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-6.29.6.tgz", - "integrity": "sha512-H1cGC4TLwSCxve3rbV7qfPJBZfy7VD7k9Czc9HOMDwQ9zHFtaoeiIotIMGjzHjfPtAGauMpAYvrpmEdBBX5sHg==", - "dependencies": { - "@ledgerhq/devices": "^8.3.0", - "@ledgerhq/errors": "^6.16.4", - "@ledgerhq/hw-transport": "^6.30.6", - "@ledgerhq/logs": "^6.12.0", - "node-hid": "^2.1.2" - } - }, "node_modules/@ledgerhq/hw-transport-u2f": { "version": "5.36.0-deprecated", "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-u2f/-/hw-transport-u2f-5.36.0-deprecated.tgz", @@ -6929,14 +6830,6 @@ "@types/node": "*" } }, - "node_modules/@types/ledgerhq__hw-transport": { - "version": "4.21.8", - "resolved": "https://registry.npmjs.org/@types/ledgerhq__hw-transport/-/ledgerhq__hw-transport-4.21.8.tgz", - "integrity": "sha512-uO2AJYZUVCwgyqgyy2/KW+JsQaO0hcwDdubRaHgF2ehO0ngGAY41PbE8qnPnmUw1uerMXONvL68QFioA7Y6C5g==", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/lodash": { "version": "4.17.13", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.13.tgz", @@ -9329,6 +9222,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -9339,6 +9233,7 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, "funding": [ { "type": "github", @@ -9362,6 +9257,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -9375,6 +9271,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -9414,18 +9311,6 @@ "safe-buffer": "~5.2.0" } }, - "node_modules/blake2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/blake2/-/blake2-4.1.1.tgz", - "integrity": "sha512-HUmkY0MUDUVgejJVNrpNKAva8C4IWD/Rd862sdexoSibu86b6iu0gO0/RjovO2lM5+w6JqjIEmkuAgGhfHlnJw==", - "hasInstallScript": true, - "dependencies": { - "nan": "^2.15.0" - }, - "engines": { - "node": ">= 8.0.0" - } - }, "node_modules/blake2b": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.4.tgz", @@ -12156,14 +12041,6 @@ "node": ">=0.12" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -12391,14 +12268,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "engines": { - "node": ">=8" - } - }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -12822,6 +12691,7 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, "dependencies": { "once": "^1.4.0" } @@ -13885,14 +13755,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "engines": { - "node": ">=6" - } - }, "node_modules/expect": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", @@ -14919,7 +14781,8 @@ "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true }, "node_modules/fs-extra": { "version": "8.1.0", @@ -15206,11 +15069,6 @@ "node": ">=0.10.0" } }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" - }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -16310,11 +16168,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, "node_modules/inquirer": { "version": "8.2.6", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", @@ -20833,7 +20686,8 @@ "node_modules/minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true }, "node_modules/minimist-options": { "version": "4.1.0", @@ -20993,7 +20847,8 @@ "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true }, "node_modules/mobx": { "version": "5.15.7", @@ -21162,11 +21017,6 @@ "node": ">=0.10.0" } }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -21219,17 +21069,6 @@ "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dev": true }, - "node_modules/node-abi": { - "version": "3.63.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.63.0.tgz", - "integrity": "sha512-vAszCsOUrUxjGAmdnM/pq7gUgie0IRteCQMX6d4A534fQCR93EJU5qgzBvU6EkFfK27s0T3HEV3BOyJIr7OMYw==", - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/node-addon-api": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", @@ -21426,23 +21265,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/node-hid": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-hid/-/node-hid-2.2.0.tgz", - "integrity": "sha512-vj48zh9j555DZzUhMc8tk/qw6xPFrDyPBH1ST1Z/hWaA/juBJw7IuSxPeOgpzNFNU36mGYj+THioRMt1xOdm/g==", - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.5.0", - "node-addon-api": "^3.0.2", - "prebuild-install": "^7.1.1" - }, - "bin": { - "hid-showdevices": "src/show-devices.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -22978,31 +22800,6 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, - "node_modules/prebuild-install": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", - "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -23258,6 +23055,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -23453,28 +23251,6 @@ "webpack": "^4.0.0 || ^5.0.0" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/react": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", @@ -25540,74 +25316,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/simple-get/node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/simple-get/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -26656,6 +26364,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -26666,12 +26375,14 @@ "node_modules/tar-fs/node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true }, "node_modules/tar-stream": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -26687,6 +26398,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -26700,6 +26412,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -27306,6 +27019,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, "dependencies": { "safe-buffer": "^5.0.1" }, @@ -27964,25 +27678,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/usb": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/usb/-/usb-2.9.0.tgz", - "integrity": "sha512-G0I/fPgfHUzWH8xo2KkDxTTFruUWfppgSFJ+bQxz/kVY2x15EQ/XDB7dqD1G432G4gBG4jYQuF3U7j/orSs5nw==", - "hasInstallScript": true, - "dependencies": { - "@types/w3c-web-usb": "^1.0.6", - "node-addon-api": "^6.0.0", - "node-gyp-build": "^4.5.0" - }, - "engines": { - "node": ">=10.20.0 <11.x || >=12.17.0 <13.0 || >=14.0.0" - } - }, - "node_modules/usb/node_modules/node-addon-api": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", - "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" - }, "node_modules/use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", diff --git a/packages/yoroi-extension/package.json b/packages/yoroi-extension/package.json index 0eea7775c2..3f23563d79 100644 --- a/packages/yoroi-extension/package.json +++ b/packages/yoroi-extension/package.json @@ -74,8 +74,8 @@ "@babel/runtime": "7.12.18", "@babel/runtime-corejs3": "7.12.18", "@emurgo/cardano-message-signing-nodejs": "1.0.1", - "@emurgo/cardano-serialization-lib-nodejs": "13.1.0", - "@emurgo/cross-csl-nodejs": "6.1.0", + "@emurgo/cardano-serialization-lib-nodejs": "13.2.1", + "@emurgo/cross-csl-nodejs": "6.2.1", "@pmmmwh/react-refresh-webpack-plugin": "0.5.11", "@types/chrome": "^0.0.268", "@types/react-intl": "^3.0.0", @@ -149,12 +149,12 @@ "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", "@emurgo/cardano-message-signing-browser": "1.0.1", - "@emurgo/cardano-serialization-lib-browser": "13.1.0", + "@emurgo/cardano-serialization-lib-browser": "13.2.1", "@emurgo/cip14-js": "2.0.0", "@emurgo/cip4-js": "1.0.5", - "@emurgo/cross-csl-browser": "6.1.0", - "@emurgo/yoroi-eutxo-txs": "0.0.2-alpha.9", - "@emurgo/yoroi-lib": "1.2.3", + "@emurgo/cross-csl-browser": "6.2.1", + "@emurgo/yoroi-eutxo-txs": "0.0.5", + "@emurgo/yoroi-lib": "2.2.6", "@ledgerhq/hw-transport-u2f": "5.36.0-deprecated", "@ledgerhq/hw-transport-webauthn": "5.36.0-deprecated", "@ledgerhq/hw-transport-webhid": "5.51.1", From 45ad8b02d98613dc8954feed4ee1a25e69f4fb1a Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Tue, 21 Jan 2025 17:28:27 +0300 Subject: [PATCH 2/5] costmodels fix --- .../app/api/ada/transactions/shelley/transactions.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.js b/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.js index b0d5ec6a6b..6abc47c5ad 100644 --- a/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.js +++ b/packages/yoroi-extension/app/api/ada/transactions/shelley/transactions.js @@ -49,6 +49,10 @@ import blake2b from 'blake2b'; import { derivePrivateByAddressing } from '../../lib/cardanoCrypto/deriveByAddressing'; import type { TxMint } from '@emurgo/yoroi-eutxo-txs/dist/tx-builder'; + +// unmagic this +const COSMODELS = 'a30098a61a000189b41901a401011903e818ad00011903e819ea350401192baf18201a000312591920a404193e801864193e801864193e801864193e801864193e801864193e80186418641864193e8018641a000170a718201a00020782182019f016041a0001194a18b2000119568718201a0001643519030104021a00014f581a00037c71187a0001011903e819a7a90402195fe419733a1826011a000db464196a8f0119ca3f19022e011999101903e819ecb2011a00022a4718201a000144ce1820193bc318201a0001291101193371041956540a197147184a01197147184a0119a9151902280119aecd19021d0119843c18201a00010a9618201a00011aaa1820191c4b1820191cdf1820192d1a18201a00014f581a00037c71187a0001011a0001614219020700011a000122c118201a00014f581a00037c71187a0001011a00014f581a00037c71187a0001011a0004213c19583c041a00163cad19fc3604194ff30104001a00022aa818201a000189b41901a401011a00013eff182019e86a1820194eae182019600c1820195108182019654d182019602f18201a032e93af1937fd0a0198af1a000189b41901a401011903e818ad00011903e819ea350401192baf18201a000312591920a404193e801864193e801864193e801864193e801864193e801864193e80186418641864193e8018641a000170a718201a00020782182019f016041a0001194a18b2000119568718201a0001643519030104021a00014f581a00037c71187a0001011903e819a7a90402195fe419733a1826011a000db464196a8f0119ca3f19022e011999101903e819ecb2011a00022a4718201a000144ce1820193bc318201a0001291101193371041956540a197147184a01197147184a0119a9151902280119aecd19021d0119843c18201a00010a9618201a00011aaa1820191c4b1820191cdf1820192d1a18201a00014f581a00037c71187a0001011a0001614219020700011a000122c118201a00014f581a00037c71187a0001011a00014f581a00037c71187a0001011a000e94721a0003414000021a0004213c19583c041a00163cad19fc3604194ff30104001a00022aa818201a000189b41901a401011a00013eff182019e86a1820194eae182019600c1820195108182019654d182019602f18201a0290f1e70a1a032e93af1937fd0a1a0298e40b1966c40a029901291a000189b41901a401011903e818ad00011903e819ea350401192baf18201a000312591920a404193e801864193e801864193e801864193e801864193e801864193e80186418641864193e8018641a000170a718201a00020782182019f016041a0001194a18b2000119568718201a0001643519030104021a00014f581a0001e143191c893903831906b419022518391a00014f580001011903e819a7a90402195fe419733a1826011a000db464196a8f0119ca3f19022e011999101903e819ecb2011a00022a4718201a000144ce1820193bc318201a0001291101193371041956540a197147184a01197147184a0119a9151902280119aecd19021d0119843c18201a00010a9618201a00011aaa1820191c4b1820191cdf1820192d1a18201a00014f581a0001e143191c893903831906b419022518391a00014f5800011a0001614219020700011a000122c118201a00014f581a0001e143191c893903831906b419022518391a00014f580001011a00014f581a0001e143191c893903831906b419022518391a00014f5800011a000e94721a0003414000021a0004213c19583c041a00163cad19fc3604194ff30104001a00022aa818201a000189b41901a401011a00013eff182019e86a1820194eae182019600c1820195108182019654d182019602f18201a0290f1e70a1a032e93af1937fd0a1a0298e40b1966c40a193e801864193e8018641a000eaf1f121a002a6e06061a0006be98011a0321aac7190eac121a00041699121a048e466e1922a4121a0327ec9a121a001e743c18241a0031410f0c1a000dbf9e011a09f2f6d31910d318241a0004578218241a096e44021967b518241a0473cee818241a13e62472011a0f23d40118481a00212c5618481a0022814619fc3b041a00032b00192076041a0013be0419702c183f00011a000f59d919aa6718fb00011a000187551902d61902cf00011a000187551902d61902cf00011a000187551902d61902cf00011a0001a5661902a800011a00017468011a00044a391949a000011a0002bfe2189f01011a00026b371922ee00011a00026e9219226d00011a0001a3e2190ce2011a00019e4919028f011a001df8bb195fc803'; + /** * based off what the cardano-wallet team found worked empirically * note: slots are 1 second in Shelley mainnet, so this is 2hrs @@ -680,7 +684,7 @@ export async function newAdaUnsignedTxFromUtxo( ); if (extraWitnessDatumsPresent) { - await txBuilder.calcScriptDataHash('default'); + await txBuilder.calcScriptDataHash(COSMODELS); } await txBuilder.addChangeAndFee(changeAddress); From 66cfc344132bd4bfe3a21b3bd738a56194f16cfa Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Tue, 21 Jan 2025 20:14:47 +0300 Subject: [PATCH 3/5] swap cancel tx witness fix --- .../app/api/ada/lib/cardanoCrypto/utils.js | 13 ++++++++++++- .../background/handlers/yoroi/transaction.js | 11 ++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/yoroi-extension/app/api/ada/lib/cardanoCrypto/utils.js b/packages/yoroi-extension/app/api/ada/lib/cardanoCrypto/utils.js index 9bd1759367..b602dc350c 100644 --- a/packages/yoroi-extension/app/api/ada/lib/cardanoCrypto/utils.js +++ b/packages/yoroi-extension/app/api/ada/lib/cardanoCrypto/utils.js @@ -1,7 +1,7 @@ // @flow import { RustModule } from './rustLoader'; -import { bytesToHex, fail, forceNonNull, hexToBytes, maybe } from '../../../../coreUtils'; +import { bytesToHex, fail, forceNonNull, hexToBytes, iterateLenGet, maybe } from '../../../../coreUtils'; import { base32ToHex, hexToBase32 } from '../storage/bridge/utils'; export function v4PublicToV2( @@ -52,6 +52,17 @@ export function transactionHexReplaceWitnessSet(txHex: string, witnessSetHex: st }); } +export function transactionHexAddVkeyWitnessesFromWitnessSetHex(txHex: string, witnessSetHex: string): string { + return RustModule.WasmScope(Module => { + const fixedTransaction = Module.WalletV4.FixedTransaction.from_hex(txHex); + const witnessSet = Module.WalletV4.TransactionWitnessSet.from_hex(witnessSetHex); + for (const vkeyWitness of iterateLenGet(witnessSet.vkeys())) { + fixedTransaction.add_vkey_witness(vkeyWitness); + } + return fixedTransaction.to_hex(); + }); +} + export function dRepToMaybeCredentialHex(s: string): ?string { const isPotentiallyValidHex = /^(22|23)[0-9a-fA-F]{56}$/.test(s); return RustModule.WasmScope(Module => { diff --git a/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/transaction.js b/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/transaction.js index 0c4b223477..c8a75cc749 100644 --- a/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/transaction.js +++ b/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/transaction.js @@ -5,11 +5,9 @@ import { connectorSignCardanoTx, connectorRecordSubmittedCardanoTransaction, } from '../../../connector/api'; -import { mergeWitnessSets } from '../../../../../app/api/ada/transactions/utils'; import { transactionHexToHash, - transactionHexReplaceWitnessSet, - transactionHexToWitnessSet, + transactionHexToWitnessSet, transactionHexAddVkeyWitnessesFromWitnessSetHex, } from '../../../../../app/api/ada/lib/cardanoCrypto/utils'; import { asGetSigningKey, @@ -49,12 +47,7 @@ export const SignTransaction: HandlerType< partialSign: false }, ); - - const mergedWitnessSetHex = mergeWitnessSets( - transactionHexToWitnessSet(transactionHex), - signedWitnessSetHex, - ); - return transactionHexReplaceWitnessSet(transactionHex, mergedWitnessSetHex); + return transactionHexAddVkeyWitnessesFromWitnessSetHex(transactionHex, signedWitnessSetHex); } catch (error) { return { error: error.message }; } From 3fc1d0d43b41e417138eb81f16261dbadcf24c51 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Tue, 21 Jan 2025 22:10:39 +0300 Subject: [PATCH 4/5] flow fix --- .../chrome/extension/background/handlers/yoroi/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/transaction.js b/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/transaction.js index c8a75cc749..4527ef73f0 100644 --- a/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/transaction.js +++ b/packages/yoroi-extension/chrome/extension/background/handlers/yoroi/transaction.js @@ -7,7 +7,7 @@ import { } from '../../../connector/api'; import { transactionHexToHash, - transactionHexToWitnessSet, transactionHexAddVkeyWitnessesFromWitnessSetHex, + transactionHexAddVkeyWitnessesFromWitnessSetHex, } from '../../../../../app/api/ada/lib/cardanoCrypto/utils'; import { asGetSigningKey, From 91d13574fdd0eb07421db40a886b29f11dd6b56b Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Tue, 21 Jan 2025 22:42:08 +0300 Subject: [PATCH 5/5] Version bump: 5.4.600 --- packages/yoroi-extension/package-lock.json | 4 ++-- packages/yoroi-extension/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index fe4f3625a0..322d242bc3 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "yoroi", - "version": "5.4.530", + "version": "5.4.600", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yoroi", - "version": "5.4.530", + "version": "5.4.600", "license": "MIT", "dependencies": { "@amplitude/analytics-browser": "^2.1.3", diff --git a/packages/yoroi-extension/package.json b/packages/yoroi-extension/package.json index 3f23563d79..fb472380e2 100644 --- a/packages/yoroi-extension/package.json +++ b/packages/yoroi-extension/package.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "5.4.530", + "version": "5.4.600", "description": "Cardano ADA wallet", "scripts": { "dev-mv2": "rimraf dev/ && NODE_OPTIONS=--openssl-legacy-provider babel-node scripts-mv2/build --type=debug --env 'mainnet'",