diff --git a/libs/exchange-module/package.json b/libs/exchange-module/package.json index 1d01d38663e4..262e694822b4 100644 --- a/libs/exchange-module/package.json +++ b/libs/exchange-module/package.json @@ -34,7 +34,7 @@ }, "dependencies": { "@ledgerhq/wallet-api-client": "^1.5.10", - "@ledgerhq/wallet-api-core": "^1.11.0" + "@ledgerhq/wallet-api-core": "^1.12.0" }, "devDependencies": { "@types/node": "^20.2.5" diff --git a/libs/ledger-live-common/package.json b/libs/ledger-live-common/package.json index 882cf1510926..a8eceed1b3ea 100644 --- a/libs/ledger-live-common/package.json +++ b/libs/ledger-live-common/package.json @@ -181,7 +181,7 @@ "@ledgerhq/logs": "workspace:^", "@ledgerhq/speculos-transport": "workspace:^", "@ledgerhq/wallet-api-client": "^1.5.10", - "@ledgerhq/wallet-api-core": "^1.11.0", + "@ledgerhq/wallet-api-core": "^1.12.0", "@ledgerhq/wallet-api-exchange-module": "workspace:^", "@ledgerhq/wallet-api-server": "^1.5.11", "@stacks/network": "6.10.0", diff --git a/libs/ledger-live-common/src/exchange/providers/index.ts b/libs/ledger-live-common/src/exchange/providers/index.ts index da7bbef7e93e..cb0dc4b61ff1 100644 --- a/libs/ledger-live-common/src/exchange/providers/index.ts +++ b/libs/ledger-live-common/src/exchange/providers/index.ts @@ -48,7 +48,7 @@ export const getProviderConfig = ( } }; -let testProvider: ExchangeProviderNameAndSignature | undefined; +export let testProvider: ExchangeProviderNameAndSignature | undefined; type TestProvider = { name: string; @@ -56,11 +56,14 @@ type TestProvider = { curve: "secp256k1" | "secp256r1"; data: string; }; + service: { + appVersion: number; + name: "swap" | "sell" | "fund"; + }; signature: string; - version: number; }; export function setTestProviderInfo(provider: string) { - const { name, publicKey, signature, version } = JSON.parse(provider) as TestProvider; + const { name, publicKey, signature, service } = JSON.parse(provider) as TestProvider; testProvider = { name, publicKey: { @@ -68,6 +71,6 @@ export function setTestProviderInfo(provider: string) { data: Buffer.from(publicKey.data, "hex"), }, signature: Buffer.from(signature, "hex"), - version, + version: service.appVersion, }; } diff --git a/libs/ledger-live-common/src/exchange/providers/swap.ts b/libs/ledger-live-common/src/exchange/providers/swap.ts index 9338a69f9c1d..0c67c27cbd8c 100644 --- a/libs/ledger-live-common/src/exchange/providers/swap.ts +++ b/libs/ledger-live-common/src/exchange/providers/swap.ts @@ -1,4 +1,5 @@ -import { ExchangeProviderNameAndSignature } from "."; +import { getEnv } from "@ledgerhq/live-env"; +import { ExchangeProviderNameAndSignature, testProvider } from "."; import { isIntegrationTestEnv } from "../swap/utils/isIntegrationTestEnv"; import network from "@ledgerhq/live-network"; @@ -206,6 +207,18 @@ let providerDataCache: Record export const getSwapProvider = async ( providerName: string, ): Promise => { + if (getEnv("MOCK_EXCHANGE_TEST_CONFIG") && testProvider) { + return { + needsKYC: false, + needsBearerToken: false, + type: "CEX", + termsOfUseUrl: "https://example.com", + supportUrl: "https://example.com", + mainUrl: "https://example.com", + ...testProvider, + }; + } + const res = await fetchAndMergeProviderData(); if (!res[providerName.toLowerCase()]) { diff --git a/libs/ledger-live-common/src/exchange/testCurrencyConfig/data/coins.ts b/libs/ledger-live-common/src/exchange/testCurrencyConfig/data/coins.ts index f74d6054f86f..6ac43079903a 100644 --- a/libs/ledger-live-common/src/exchange/testCurrencyConfig/data/coins.ts +++ b/libs/ledger-live-common/src/exchange/testCurrencyConfig/data/coins.ts @@ -29,6 +29,11 @@ const coins = [ 0x82, 0x90, 0x4, 0xfe, 0x6f, 0x1d, 0x0, 0x3a, 0x58, ]).toString("hex"), ], + [ + "ton", + "03544f4e03546f6e00", + "3045022100c47d2be0b63ebab67804250b8659143c344ae43c9daa55ba23e037d0bfa9fe47022046c67aa8a57030fbac3c0f2738b18cace4a231943a8aa83b9dbccf4f353a521b", + ], ]; export default coins; diff --git a/libs/ledger-live-common/src/families/ton/exchange.ts b/libs/ledger-live-common/src/families/ton/exchange.ts new file mode 100644 index 000000000000..4d4d827f3b6a --- /dev/null +++ b/libs/ledger-live-common/src/families/ton/exchange.ts @@ -0,0 +1,16 @@ +import { bip32asBuffer } from "../../crypto"; + +const getSerializedAddressParameters = ( + path: string, +): { + addressParameters: Buffer; +} => { + const addressParameters = bip32asBuffer(path); + return { + addressParameters, + }; +}; + +export default { + getSerializedAddressParameters, +}; diff --git a/libs/ledger-live-common/src/generated/exchange.ts b/libs/ledger-live-common/src/generated/exchange.ts index 5e29ac018ca6..4069d0b18fe4 100644 --- a/libs/ledger-live-common/src/generated/exchange.ts +++ b/libs/ledger-live-common/src/generated/exchange.ts @@ -4,6 +4,7 @@ import polkadot from "../families/polkadot/exchange"; import solana from "../families/solana/exchange"; import stellar from "../families/stellar/exchange"; import tezos from "../families/tezos/exchange"; +import ton from "../families/ton/exchange"; import tron from "../families/tron/exchange"; import xrp from "../families/xrp/exchange"; @@ -14,6 +15,7 @@ export default { solana, stellar, tezos, + ton, tron, xrp, }; diff --git a/libs/ledgerjs/packages/hw-app-exchange/package.json b/libs/ledgerjs/packages/hw-app-exchange/package.json index e6cb0845c087..92031169cb33 100644 --- a/libs/ledgerjs/packages/hw-app-exchange/package.json +++ b/libs/ledgerjs/packages/hw-app-exchange/package.json @@ -37,6 +37,7 @@ "@ledgerhq/hw-transport-node-speculos-http": "workspace:^", "@types/jest": "^29.5.10", "@types/node": "^20.8.10", + "bip32-path": "^0.4.2", "documentation": "14.0.2", "jest": "^29.7.0", "secp256k1": "5.0.0", diff --git a/libs/ledgerjs/packages/hw-app-exchange/src/Exchange.integ.test.ts b/libs/ledgerjs/packages/hw-app-exchange/src/Exchange.integ.test.ts index 283d4400f50a..060941e6acb8 100644 --- a/libs/ledgerjs/packages/hw-app-exchange/src/Exchange.integ.test.ts +++ b/libs/ledgerjs/packages/hw-app-exchange/src/Exchange.integ.test.ts @@ -1,3 +1,4 @@ +import bippath from "bip32-path"; import SpeculosTransportHttp from "@ledgerhq/hw-transport-node-speculos-http"; import Exchange, { ExchangeTypes, PartnerKeyInfo } from "./Exchange"; import Transport from "@ledgerhq/hw-transport"; @@ -127,8 +128,13 @@ describe("Check SWAP until payload signature", () => { const estimatedFees = new BigNumber(0); await exchange.processTransaction(encodedPayload, estimatedFees, "jws"); + console.log("DEBUG - SWAP partner encoded payload:", encodedPayload.toString("hex")); const payloadSignature = await signMessage(encodedPayload, partnerPrivKey, "rs"); + console.log( + "DEBUG - SWAP partner payload signature:", + Buffer.from(payloadSignature).toString("hex"), + ); await exchange.checkTransactionSignature(payloadSignature); }); @@ -143,9 +149,12 @@ describe("Check SWAP until payload signature", () => { expect(transactionId).toEqual(expect.any(String)); expect(transactionId).toHaveLength(64); - const { partnerInfo, partnerSigned } = await appExchangeDataset(ngSignFormat); + const { partnerInfo, partnerSigned, apdu } = await appExchangeDataset(ngSignFormat); await exchange.setPartnerKey(partnerInfo); + console.log("DEBUG - Swap partner APDU:", apdu.toString("hex")); + console.log("DEBUG - Swap partner signed:", Buffer.from(partnerSigned).toString("hex")); + await exchange.checkPartner(partnerSigned); const encodedPayload = Buffer.from( @@ -154,15 +163,97 @@ describe("Check SWAP until payload signature", () => { const estimatedFees = new BigNumber(0); await exchange.processTransaction(encodedPayload, estimatedFees, "jws"); + console.log("DEBUG - SWAP partner encoded payload:", encodedPayload.toString("hex")); // const payloadSignature = await signMessage(encodedPayload, partnerPrivKey, "rs"); const payloadSignature = Buffer.from( "zGcNUYKM8sLxvT7zPU1C8vrMmanVlUroELnAeil4weo1LCk0zUBRse5-3Acv7I7II90xVTIxm26BnxRbZvVmTQ==", "base64url", ); + console.log( + "DEBUG - SWAP partner payload signature:", + Buffer.from(payloadSignature).toString("hex"), + ); await exchange.checkTransactionSignature(payloadSignature); }); + it.only("NG SWAP with TON", async () => { + // Given + const exchange = new Exchange(transport, ExchangeTypes.SwapNg); + + // When + const transactionId = await exchange.startNewTransaction(); + + // Then + expect(transactionId).toEqual(expect.any(String)); + expect(transactionId).toHaveLength(64); + + const { partnerInfo, partnerSigned, apdu, partnerPrivKey } = + await appExchangeDatasetTest(ngSignFormat); + await exchange.setPartnerKey(partnerInfo); + + console.log("DEBUG - Swap partner APDU:", apdu.toString("hex")); + console.log("DEBUG - Swap partner signed:", Buffer.from(partnerSigned).toString("hex")); + + await exchange.checkPartner(partnerSigned); + + const amount = new BigNumber(100); + const amountToWallet = new BigNumber(1_000); + // Extra properties have a limited size of 20 (i.e. app-exchange/src/proto/protocol.options) + let encodedPayload = await generateSwapPayloadProtobuf({ + payinAddress: "UQAbvs2tCnsTWxCZX7JW-dqlk0vM8x_m8aJqF4wwRWGtTEZD", + refundAddress: "UQAbvs2tCnsTWxCZX7JW-dqlk0vM8x_m8aJqF4wwRWGtTEZD", + payoutAddress: "0x66c4371aE8FFeD2ec1c2EBbbcCfb7E494181E1E3", + // payinAddress: "UQCa_2bcwBt5eH9gOMgHC497nyfjgSl8hGpZ90O7B17WHA==", + // refundAddress: "UQCa_2bcwBt5eH9gOMgHC497nyfjgSl8hGpZ90O7B17WHA==", + // payoutAddress: "0xDad77910DbDFdE764fC21FCD4E74D71bBACA6D8D", + currencyFrom: "TON", + currencyTo: "ETH", + amountToProvider: Buffer.from(amount.toString(16), "hex"), + amountToWallet: Buffer.from(amountToWallet.toString(16), "hex"), + deviceTransactionIdNg: Buffer.from(transactionId.padStart(32, "0"), "hex"), + }); + encodedPayload = convertToJWSPayload(encodedPayload); + + const estimatedFees = new BigNumber(0); + await exchange.processTransaction(encodedPayload, estimatedFees, "jws"); + console.log("DEBUG - SWAP partner encoded payload:", encodedPayload.toString("hex")); + + const payloadSignature = await signMessage(encodedPayload, partnerPrivKey, "rs"); + console.log( + "DEBUG - SWAP partner payload signature:", + Buffer.from(payloadSignature).toString("hex"), + ); + await exchange.checkTransactionSignature(payloadSignature); + + const configEth = { + config: Buffer.from("0345544808457468657265756d050345544812", "hex"), + signature: Buffer.from( + "3044022065d7931ab3144362d57e3fdcc5de921fb65024737d917f0ab1f8b173d1ed3c2e022027493568d112dc53c7177f8e5fc915d91a903780a067badf109085a73d360323", + "hex", + ), + }; + let addressParameters = bip32asBuffer("44'/60'/0'/0/0"); + exchange.checkPayoutAddress(configEth.config, configEth.signature, addressParameters); + + const delay = (milliseconds: number) => { + return new Promise(resolve => { + setTimeout(resolve, milliseconds); + }); + }; + await delay(500); + + const configTon = { + config: Buffer.from("03544f4e03544f4e00", "hex"), + signature: Buffer.from( + "3045022100b35be5d1ad0d71572b5f3d72b40766521d5492fad6ed54289a64488bec3344a902205b522b7b8c7c800826bcd0bda092e84db5d1c23f6061c8b57c8efb3641d243a7", + "hex", + ), + }; + addressParameters = bip32asBuffer("44'/607'/0'/0'/0'/0'"); + exchange.checkRefundAddress(configTon.config, configTon.signature, addressParameters); + }); + it("NG Sell", async () => { // Given const exchange = new Exchange(transport, ExchangeTypes.SellNg); @@ -174,11 +265,11 @@ describe("Check SWAP until payload signature", () => { expect(transactionId).toEqual(expect.any(String)); expect(transactionId).toHaveLength(64); - const { partnerInfo, partnerSigned, partnerPrivKey } = + const { partnerInfo, partnerSigned, partnerPrivKey, apdu } = await appExchangeSellDataset(ngSignFormat); await exchange.setPartnerKey(partnerInfo); - console.log("DEBUG - Sell partner info:", partnerInfo); - console.log("DEBUG - Sell partner info:", partnerInfo.publicKey.toString("hex")); + console.log("DEBUG - Sell partner pubkey:", partnerInfo.publicKey.toString("hex")); + console.log("DEBUG - Sell partner APDU:", apdu.toString("hex")); console.log("DEBUG - Sell partner signed:", Buffer.from(partnerSigned).toString("hex")); await exchange.checkPartner(partnerSigned); @@ -200,12 +291,160 @@ describe("Check SWAP until payload signature", () => { const estimatedFees = new BigNumber(0); await exchange.processTransaction(encodedPayload, estimatedFees, "jws"); + console.log("DEBUG - SELL partner encoded payload:", encodedPayload.toString("hex")); const payloadSignature = await signMessage(encodedPayload, partnerPrivKey, "rs"); + console.log( + "DEBUG - SELL partner payload signature:", + Buffer.from(payloadSignature).toString("hex"), + ); await exchange.checkTransactionSignature(payloadSignature); }); }); +describe("Test internal sign and verification functionality", () => { + describe("With Ledger keys", () => { + const privKey = Buffer.from( + "b1ed47ef58f782e2bc4d5abe70ef66d9009c2957967017054470e0f3e10f5833", + "hex", + ); + const pubKey = Buffer.from( + "0420da62003c0ce097e33644a10fe4c30454069a4454f0fa9d4e84f45091429b5220af9e35c0b2d9289380137307de4dd1d418428cf21a93b33561bb09d88fe579", + "hex", + ); + + test("simple signature", async () => { + // Given + const msg = "Something important to cipher"; + + // When + const sig = await signMessage(Buffer.from(msg), privKey, "rs"); + console.log("DEBUG - Test internal: message signature", Buffer.from(sig).toString("hex")); + + // Then + const hashBuffer = await subtle.digest("SHA-256", Buffer.from(msg)); + const hash = new Uint8Array(hashBuffer); + expect(secp256k1.ecdsaVerify(sig, hash, pubKey)).toBeTruthy(); + }); + test("APDU signature generated by this test suite", async () => { + // Given + const msg = + "0953454c4c5f54455354000478d5facdae2305f48795d3ce7d9244f5060d2f800901da5746d1f4177ae8d7bbe63f3870efc0d36af8f91962811e1d8d9df91ce3b3ea2cd9f550c7d465f8b7b3"; + + // When + const sig = Buffer.from( + "30440220471b035b40dafa095d615998c82202b2bd00fb45670b828f1dda3b68e5b24cc3022022a1c64d02b8c14e1e4cc2d05b00234642c11db3d4461ff5366f5af337cf0ced", + "hex", + ); + console.log("DEBUG - Test internal: message signature", Buffer.from(sig).toString("hex")); + + // Then + const hashBuffer = await subtle.digest("SHA-256", Buffer.from(msg, "hex")); + const hash = new Uint8Array(hashBuffer); + expect(secp256k1.ecdsaVerify(convertSignatureFromDER(sig), hash, pubKey)).toBeTruthy(); + }); + test("APDU signature generated by external tool", async () => { + // Given + // {"name":"TEST_PROVIDER","payloadSignatureComputedFormat":"jws","publicKey":{"curve":"secp256r1","data":"047c13debdb9e1afac5a82bbe78da6dca98a2e59af8a9a3f827acb8ed325c79a6c5749eff65d4e3470bd2995def771f45426c58eada7227d536feeffb58fa71c24"},"service":{"appVersion":2,"name":"swap"},"signature":"3045022072e6773318af531e478c40f53815d2fa0a1c06c49519bb693ff234662fb6558802210083ab26162da41d3c429dd10051f565440576193031eb0590a9ea200af987f062"} + const msg = + "0d544553545f50524f564944455201047c13debdb9e1afac5a82bbe78da6dca98a2e59af8a9a3f827acb8ed325c79a6c5749eff65d4e3470bd2995def771f45426c58eada7227d536feeffb58fa71c24"; + const apdu = ngSignFormat({ + name: "TEST_PROVIDER", + curve: "secp256r1", + publicKey: Buffer.from( + "047c13debdb9e1afac5a82bbe78da6dca98a2e59af8a9a3f827acb8ed325c79a6c5749eff65d4e3470bd2995def771f45426c58eada7227d536feeffb58fa71c24", + "hex", + ), + // signatureComputedFormat?: PayloadSignatureComputedFormat; + }); + console.log("DEBUG - Test internal: expected APDU to sign\t", apdu.toString("hex")); + console.log("DEBUG - Test internal: APDU to sign\t", msg); + + // When + // const sig = Buffer.from( + // "3045022068e5971fdad78583e7bb28adac09212108966fd2ed4f8ad206499bca59f0ad12022100aed715d306f772524b805dd4f91afc79b4bda1a14f91d90ea78739e05461d6c7", + // "hex", + // ); + const sig = await signMessage(Buffer.from(msg, "hex"), LEDGER_FAKE_PRIVATE_KEY, "der"); + console.log("DEBUG - Test internal: message signature", Buffer.from(sig).toString("hex")); + + // Then + const hashBuffer = await subtle.digest("SHA-256", Buffer.from(msg, "hex")); + const hash = new Uint8Array(hashBuffer); + expect(secp256k1.ecdsaVerify(convertSignatureFromDER(sig), hash, pubKey)).toBeTruthy(); + }); + test("APDU signature already validated", async () => { + // Given + const msg = legacySignFormat({ + name: "Coinify", + curve: "secp256r1", + publicKey: Buffer.from( + "044f22668f5f321d3784266c932a2a3141c3ec196ddd51f42cf975267eda23d3a8b02170e4c5c70536e7d03ba4e66ee3e1f9d65e772d3217871a830a7cf60da366", + "hex", + ), + // signatureComputedFormat?: PayloadSignatureComputedFormat; + }); + console.log("DEBUG - Test internal: APDU to sign", msg.toString("hex")); + + // When + const sig = Buffer.from( + "30450221008e8b2172ddd48e196dbff81ebe8aebc4ec0988f72de1b02da202f3a8d8f33f9c02205273c1d426aeb460fd36a27696aafda68bdff4139886f29e558895ea85527749", + "hex", + ); + // const sig = await signMessage(Buffer.from(msg, "hex"), LEDGER_FAKE_PRIVATE_KEY, "der"); + console.log("DEBUG - Test internal: message signature", Buffer.from(sig).toString("hex")); + + // Then + const hashBuffer = await subtle.digest("SHA-256", msg); + const hash = new Uint8Array(hashBuffer); + expect(secp256k1.ecdsaVerify(convertSignatureFromDER(sig), hash, pubKey)).toBeTruthy(); + }); + }); + + describe("With SELL keys", () => { + const privKey = Buffer.from( + "308f6a5369aea611d89abf937d0ffaf0b43b457d42cbf0cf754786b3088f17ae", + "hex", + ); + const pubKey = Buffer.from( + "0478d5facdae2305f48795d3ce7d9244f5060d2f800901da5746d1f4177ae8d7bbe63f3870efc0d36af8f91962811e1d8d9df91ce3b3ea2cd9f550c7d465f8b7b3", + "hex", + ); + + test("SELL private and public K1 key pair", async () => { + // Given + const msg = "Something important to cipher"; + + // When + const sig = await signMessage(Buffer.from(msg), privKey, "rs"); + console.log("DEBUG - Test internal: message signature", Buffer.from(sig).toString("hex")); + + // Then + const hashBuffer = await subtle.digest("SHA-256", Buffer.from(msg)); + const hash = new Uint8Array(hashBuffer); + expect(secp256k1.ecdsaVerify(sig, hash, pubKey)).toBeTruthy(); + }); + + test("SELL verify payload signature", async () => { + // Given + const msg = + "2e436735305a584e305147786c5a47646c6369356d636849445256524947674959616949714d48686b4e6a6b79513249784d7a51324d6a5979526a55344e4551784e304930516a51334d446b314e4455774d5759324e7a4531595467794b674e465656497942416f41454145364944554b366779583930667830506467675559557048556a674273613633304c79377169705052722d42684c"; + + // When + const sig = Buffer.from( + "348e938ce75c06da9a27652c2af6146b4581f948c600b4f7093743e8af256d172324131dcc852f068d0bd20afd0c8444bc635e9520d3a29cab7ff7c27dc8b782", + "hex", + ); + console.log("DEBUG - Test internal: message signature", Buffer.from(sig).toString("hex")); + + // Then + const hashBuffer = await subtle.digest("SHA-256", Buffer.from(msg, "hex")); + const hash = new Uint8Array(hashBuffer); + expect(secp256k1.ecdsaVerify(sig, hash, pubKey)).toBeTruthy(); + }); + }); +}); + // Those information comes from dataset test of app-exchange (i.e. check signing_authority.py file). // The public key is bundle with DEBUG version of app-exchange. const LEDGER_FAKE_PRIVATE_KEY = Buffer.from( @@ -221,11 +460,15 @@ const legacySignFormat: PartnerSignFormat = (info: PartnerKeyInfo) => { info.publicKey, ]); }; +const curves = { + secp256k1: 0x00, + secp256r1: 0x01, +}; const ngSignFormat: PartnerSignFormat = (info: PartnerKeyInfo) => { return Buffer.concat([ Buffer.from([info.name.length]), Buffer.from(info.name, "ascii"), - Buffer.from([0x00]), + Buffer.from([curves[info.curve]]), info.publicKey, ]); }; @@ -250,6 +493,7 @@ async function appExchangeDatasetTest(signFormat: PartnerSignFormat) { return { partnerInfo, + apdu: msg, partnerSigned: sig, partnerPrivKey: privKey, }; @@ -272,6 +516,7 @@ async function appExchangeDataset(signFormat: PartnerSignFormat) { return { partnerInfo, + apdu: msg, partnerSigned: sig, }; } @@ -297,6 +542,7 @@ async function appExchangeSellDataset(signFormat: PartnerSignFormat) { return { partnerInfo, + apdu: msg, partnerSigned: sig, partnerPrivKey: privKey, }; @@ -384,3 +630,18 @@ function convertSignatureToDER(sig: Uint8Array): Buffer { function convertToJWSPayload(raw: Buffer): Buffer { return Buffer.from("." + raw.toString("base64url")); } + +function convertSignatureFromDER(sig: Uint8Array): Buffer { + return secp256k1.signatureImport(sig); +} + +function bip32asBuffer(path: string): Buffer { + const pathElements = !path ? [] : bippath.fromString(path).toPathArray(); + + const buffer = Buffer.alloc(1 + pathElements.length * 4); + buffer[0] = pathElements.length; + pathElements.forEach((element, index) => { + buffer.writeUInt32BE(element, 1 + 4 * index); + }); + return buffer; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 67d49363189c..3d5fa86ebaa6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2710,17 +2710,17 @@ importers: specifier: workspace:^ version: link:../../ledgerjs/packages/types-live '@taquito/ledger-signer': - specifier: ^20.0.0 - version: 20.0.0 + specifier: ^20.0.1 + version: 20.0.1 '@taquito/rpc': - specifier: ^20.0.0 - version: 20.0.0 + specifier: ^20.0.1 + version: 20.0.1 '@taquito/taquito': - specifier: ^20.0.0 - version: 20.0.0 + specifier: ^20.0.1 + version: 20.0.1 '@taquito/utils': - specifier: ^20.0.0 - version: 20.0.0 + specifier: ^20.0.1 + version: 20.0.1 bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -2763,7 +2763,10 @@ importers: version: 29.7.0 ts-jest: specifier: ^29.1.4 - version: 29.1.4(jest@29.7.0)(typescript@5.4.3) + version: 29.1.4(jest@29.7.0)(typescript@5.6.2) + typescript: + specifier: ^5.6.2 + version: 5.6.2 libs/coin-modules/coin-ton: dependencies: @@ -3270,8 +3273,8 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@ledgerhq/wallet-api-core': - specifier: ^1.11.0 - version: 1.11.0 + specifier: ^1.12.0 + version: 1.12.0 devDependencies: '@types/node': specifier: ^20.2.5 @@ -3506,8 +3509,8 @@ importers: specifier: ^1.5.10 version: 1.5.10 '@ledgerhq/wallet-api-core': - specifier: ^1.11.0 - version: 1.11.0 + specifier: ^1.12.0 + version: 1.12.0 '@ledgerhq/wallet-api-exchange-module': specifier: workspace:^ version: link:../exchange-module @@ -3525,7 +3528,7 @@ importers: version: 2.0.0 '@taquito/ledger-signer': specifier: ^20.0.0 - version: 20.0.0 + version: 20.0.1 '@ton-community/ton-ledger': specifier: ^7.0.1 version: 7.0.1(@ton/core@0.56.3(@ton/crypto@3.3.0)) @@ -4283,6 +4286,9 @@ importers: '@types/node': specifier: ^20.8.10 version: 20.12.12 + bip32-path: + specifier: ^0.4.2 + version: 0.4.2 documentation: specifier: 14.0.2 version: 14.0.2 @@ -10395,6 +10401,9 @@ packages: '@ledgerhq/wallet-api-core@1.11.0': resolution: {integrity: sha512-QB4Inky3HadsB246CMH4t+KWvJ6qLu/M2nDuUZZ5e27XMAVDe/XI2CzndYmRq8rjW8pCfytGdQrdH9aVcBK6Kg==} + '@ledgerhq/wallet-api-core@1.12.0': + resolution: {integrity: sha512-UatH08CLG2iH0kC7Lpq4sDtmjX1m64CJMLga+/04iP77aMBzYlpz9N10XkYyD+4CmvZ9SFncm//mAap9gr5jkQ==} + '@ledgerhq/wallet-api-server@1.5.11': resolution: {integrity: sha512-BDiUxi+Za19v1aCJtEycLQePiMP7t3KY0yRIbL0QoIUIvKxhoLQuHVc6umIgzU3si4qvqs9foFvIakCm+OqMvA==} peerDependencies: @@ -14125,40 +14134,40 @@ packages: '@tanstack/virtual-core@3.2.0': resolution: {integrity: sha512-P5XgYoAw/vfW65byBbJQCw+cagdXDT/qH6wmABiLt4v4YBT2q2vqCOhihe+D1Nt325F/S/0Tkv6C5z0Lv+VBQQ==} - '@taquito/core@20.0.0': - resolution: {integrity: sha512-JSDWLaVeaSqI98Xwd2TQwNy/fznSLEhikUxM7da6WbGJGtH8lG9SI9q6N9LLPfOFNGlP5RVQLO9HK/Pcmn4H8Q==} + '@taquito/core@20.0.1': + resolution: {integrity: sha512-/NvTkS8Enz5zxm481h7Ld5+MTa3/q84PMqtQ+HN3Mniv4EshnX5uIGfbdXdCQoaAeVdJOCeNIZDgeP6ZnkomRA==} engines: {node: '>=18'} - '@taquito/http-utils@20.0.0': - resolution: {integrity: sha512-R4Qen9oA/wQ7S5jC8K3viJkY/o9uQFEPQfuyPJCm90Tlg5HMd8UFRbJKqMvsW/nNVo39kukzEMS8o5wFST6dBA==} + '@taquito/http-utils@20.0.1': + resolution: {integrity: sha512-belYNmWoT49IF8o51gEB5je5Wz54+C7Q5hmvh7modl7fG0qE8VD1ulSH+WjuZsFTPJdNEAfCe0O50Vb5tNzw2w==} engines: {node: '>=18'} - '@taquito/ledger-signer@20.0.0': - resolution: {integrity: sha512-wfl1plx/uAIbmHsYxwsO2pXKDa9aMOmuuw25rjwsniBP36hM0Ly9GSrQ0z1CozteQF9ThP+OwrNMCwlfqXx43Q==} + '@taquito/ledger-signer@20.0.1': + resolution: {integrity: sha512-w8PM2tmBGK7FaQnifDJr43Gt+xt5AApiMr8rh7PV5v+uyHfmaqudNBK0SdlbTKpS7GkERs4X8CBojpeGAage8Q==} engines: {node: '>=18'} - '@taquito/local-forging@20.0.0': - resolution: {integrity: sha512-oxeyoqXjuTyl7gWqJGXoOqfWwH1bTiO76P/eOA5ULXgGwx9Muvt/yW5EPoIn6lK3Ajl41IE2sT+4JbKjQsAkuw==} + '@taquito/local-forging@20.0.1': + resolution: {integrity: sha512-+XYHnoAYXpOYA4WbUvUO86F6uoUh1anaNQGD544ySaonJW1ZgwhylrGvvTVjQfFSqqP3TRWn69EqINco+hX7gA==} engines: {node: '>=18'} - '@taquito/michel-codec@20.0.0': - resolution: {integrity: sha512-Xe6zHI8d5o/v9xNFJSvtspMK9Zf/iPDgUU7mIbucF/ppAYm1pofm5zL4SY5+tK0/Xz7irXjVx0a5l2sgGCBZmQ==} + '@taquito/michel-codec@20.0.1': + resolution: {integrity: sha512-TB6fJS4ArW4p1mqR28cjKbYs4cbLz/wnf8bHI/4ubxpiPcARZkja7r4U89D+Lb6Kn1Er+USPIMdbRTkP011e0w==} engines: {node: '>=18'} - '@taquito/michelson-encoder@20.0.0': - resolution: {integrity: sha512-b28UTIX733vLmE1R/wW3J5cMz4EIf8ioZen2u6Ms8enT7MMQw4svM9Eq/D+Wr6di3VDeGh1Aqvgl+XRbEw8AQA==} + '@taquito/michelson-encoder@20.0.1': + resolution: {integrity: sha512-YfMLpxDL/Qd9AlIfjlCsXYiE07ReZRAqvj+mI/Q8sPsKpqrkjvhyieNUQDLVqMDRcWLBWUSIqccr7UVRlQ/+BQ==} engines: {node: '>=18'} - '@taquito/rpc@20.0.0': - resolution: {integrity: sha512-4ijTIKGAl3NnB9ibvZzBpruf00w4TDi9CSLeoNOiP0T/laTZsUfmtR7p5AwirGNGBqAXr7mWSqSCrn2IEwSjAw==} + '@taquito/rpc@20.0.1': + resolution: {integrity: sha512-Ec6fXoehjLpfILpVAHZ1NJz6cAaguEFs9McK2Ct4RRKmVhModgrVPAGXn17rb7fLXwOLP3MCzqSgFPToY7ZIFA==} engines: {node: '>=18'} - '@taquito/taquito@20.0.0': - resolution: {integrity: sha512-iA53YlMdElAb919vhS7UswjHFumiDGOB6IE1vAh5dOLdPvK8L6uDlSXU6Aaz/nQyTJGe6I6RusjXEoMVnZUe2g==} + '@taquito/taquito@20.0.1': + resolution: {integrity: sha512-BcRNWcUGOWfthFPgPf12U1ZIf1xSyy1ZS4xU5TciuxI395LnKTz6I3WfmMggsZzWxqEgi/Lj8GXjji7DCtaZRg==} engines: {node: '>=18'} - '@taquito/utils@20.0.0': - resolution: {integrity: sha512-45GT2caKPpi8sC6BdlTNZRgsqjXy6D2hVfisymzU68EWXZ6Rss5aNNj6OZgDMVmwAnSJok41D2DCdUegiJJBbw==} + '@taquito/utils@20.0.1': + resolution: {integrity: sha512-aJaKukIW9thzU/WZ7p9ARRIDoXLQZ8TsB0brtbf48GqBFoGXDNAsDo72lkeTpehEcgYItSjdBuWEKH/lyTMr+w==} engines: {node: '>=18'} '@testing-library/dom@9.3.4': @@ -28575,6 +28584,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} + engines: {node: '>=14.17'} + hasBin: true + typical@4.0.0: resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} engines: {node: '>=8'} @@ -32433,14 +32447,14 @@ snapshots: '@commitlint/types': 17.8.1 '@types/node': 20.5.1 chalk: 4.1.2 - cosmiconfig: 8.3.6(typescript@5.4.5) - cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.4.5))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.4.5))(typescript@5.4.5) + cosmiconfig: 8.3.6(typescript@5.6.2) + cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.6.2))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.6.2))(typescript@5.6.2) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 resolve-from: 5.0.0 - ts-node: 10.9.2(@types/node@20.5.1)(typescript@5.4.5) - typescript: 5.4.5 + ts-node: 10.9.2(@types/node@20.5.1)(typescript@5.6.2) + typescript: 5.6.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -36234,6 +36248,13 @@ snapshots: uuid: 9.0.1 zod: 3.23.8 + '@ledgerhq/wallet-api-core@1.12.0': + dependencies: + '@ledgerhq/errors': 6.16.4 + bignumber.js: 9.1.2 + uuid: 9.0.1 + zod: 3.23.8 + '@ledgerhq/wallet-api-server@1.5.11(react@18.2.0)(rxjs@7.8.1)': dependencies: '@ledgerhq/wallet-api-core': 1.11.0 @@ -42689,76 +42710,76 @@ snapshots: '@tanstack/virtual-core@3.2.0': {} - '@taquito/core@20.0.0': + '@taquito/core@20.0.1': dependencies: json-stringify-safe: 5.0.1 - '@taquito/http-utils@20.0.0': + '@taquito/http-utils@20.0.1': dependencies: - '@taquito/core': 20.0.0 + '@taquito/core': 20.0.1 node-fetch: 2.7.0 transitivePeerDependencies: - encoding - '@taquito/ledger-signer@20.0.0': + '@taquito/ledger-signer@20.0.1': dependencies: '@ledgerhq/hw-transport': 6.30.6 '@stablelib/blake2b': 1.0.1 - '@taquito/core': 20.0.0 - '@taquito/taquito': 20.0.0 - '@taquito/utils': 20.0.0 + '@taquito/core': 20.0.1 + '@taquito/taquito': 20.0.1 + '@taquito/utils': 20.0.1 buffer: 6.0.3(patch_hash=2xnca52oxhztvr7iaoovwclcze) transitivePeerDependencies: - encoding - '@taquito/local-forging@20.0.0': + '@taquito/local-forging@20.0.1': dependencies: - '@taquito/core': 20.0.0 - '@taquito/utils': 20.0.0 + '@taquito/core': 20.0.1 + '@taquito/utils': 20.0.1 bignumber.js: 9.1.2 - '@taquito/michel-codec@20.0.0': + '@taquito/michel-codec@20.0.1': dependencies: - '@taquito/core': 20.0.0 + '@taquito/core': 20.0.1 - '@taquito/michelson-encoder@20.0.0': + '@taquito/michelson-encoder@20.0.1': dependencies: - '@taquito/core': 20.0.0 - '@taquito/rpc': 20.0.0 - '@taquito/utils': 20.0.0 + '@taquito/core': 20.0.1 + '@taquito/rpc': 20.0.1 + '@taquito/utils': 20.0.1 bignumber.js: 9.1.2 fast-json-stable-stringify: 2.1.0 transitivePeerDependencies: - encoding - '@taquito/rpc@20.0.0': + '@taquito/rpc@20.0.1': dependencies: - '@taquito/core': 20.0.0 - '@taquito/http-utils': 20.0.0 - '@taquito/utils': 20.0.0 + '@taquito/core': 20.0.1 + '@taquito/http-utils': 20.0.1 + '@taquito/utils': 20.0.1 bignumber.js: 9.1.2 transitivePeerDependencies: - encoding - '@taquito/taquito@20.0.0': + '@taquito/taquito@20.0.1': dependencies: - '@taquito/core': 20.0.0 - '@taquito/http-utils': 20.0.0 - '@taquito/local-forging': 20.0.0 - '@taquito/michel-codec': 20.0.0 - '@taquito/michelson-encoder': 20.0.0 - '@taquito/rpc': 20.0.0 - '@taquito/utils': 20.0.0 + '@taquito/core': 20.0.1 + '@taquito/http-utils': 20.0.1 + '@taquito/local-forging': 20.0.1 + '@taquito/michel-codec': 20.0.1 + '@taquito/michelson-encoder': 20.0.1 + '@taquito/rpc': 20.0.1 + '@taquito/utils': 20.0.1 bignumber.js: 9.1.2 rxjs: 7.8.1 transitivePeerDependencies: - encoding - '@taquito/utils@20.0.0': + '@taquito/utils@20.0.1': dependencies: '@stablelib/blake2b': 1.0.1 '@stablelib/ed25519': 1.0.3 - '@taquito/core': 20.0.0 + '@taquito/core': 20.0.1 '@types/bs58check': 2.1.2 bignumber.js: 9.1.2 blakejs: 1.2.1 @@ -46883,7 +46904,7 @@ snapshots: config-file-ts@0.2.6: dependencies: glob: 10.3.12 - typescript: 5.4.5 + typescript: 5.6.2 confusing-browser-globals@1.0.11: {} @@ -47011,12 +47032,12 @@ snapshots: dependencies: layout-base: 1.0.2 - cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.4.5))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.4.5))(typescript@5.4.5): + cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.6.2))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.6.2))(typescript@5.6.2): dependencies: '@types/node': 20.5.1 - cosmiconfig: 8.3.6(typescript@5.4.5) - ts-node: 10.9.2(@types/node@20.5.1)(typescript@5.4.5) - typescript: 5.4.5 + cosmiconfig: 8.3.6(typescript@5.6.2) + ts-node: 10.9.2(@types/node@20.5.1)(typescript@5.6.2) + typescript: 5.6.2 cosmiconfig@5.2.1: dependencies: @@ -47050,14 +47071,14 @@ snapshots: optionalDependencies: typescript: 4.9.5 - cosmiconfig@8.3.6(typescript@5.4.5): + cosmiconfig@8.3.6(typescript@5.6.2): dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: - typescript: 5.4.5 + typescript: 5.6.2 cosmjs-types@0.2.1: dependencies: @@ -63098,6 +63119,19 @@ snapshots: typescript: 5.4.3 yargs-parser: 21.1.1 + ts-jest@29.1.4(jest@29.7.0)(typescript@5.6.2): + dependencies: + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + jest: 29.7.0 + jest-util: 29.7.0 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.6.3 + typescript: 5.6.2 + yargs-parser: 21.1.1 + ts-jest@29.1.5(jest@29.7.0(@types/node@20.12.12))(typescript@5.4.3): dependencies: bs-logger: 0.2.6 @@ -63255,7 +63289,7 @@ snapshots: transitivePeerDependencies: - source-map-support - ts-node@10.9.2(@types/node@20.5.1)(typescript@5.4.5): + ts-node@10.9.2(@types/node@20.5.1)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -63269,7 +63303,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.4.5 + typescript: 5.6.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 transitivePeerDependencies: @@ -63495,6 +63529,8 @@ snapshots: typescript@5.4.5: {} + typescript@5.6.2: {} + typical@4.0.0: {} typical@5.2.0: {}