From b8cd0428afa30c52f14f2e5512f1edf8a65d067d Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:02:10 +0300 Subject: [PATCH 1/5] feat: keystore --- packages/hdwallet-native-vault/src/index.ts | 5 + .../hdwallet-native-vault/src/keystore.ts | 123 ++++++++++++++++++ packages/hdwallet-native-vault/src/vault.ts | 10 ++ 3 files changed, 138 insertions(+) create mode 100644 packages/hdwallet-native-vault/src/keystore.ts diff --git a/packages/hdwallet-native-vault/src/index.ts b/packages/hdwallet-native-vault/src/index.ts index 317ff0ba6..e01bbe46a 100644 --- a/packages/hdwallet-native-vault/src/index.ts +++ b/packages/hdwallet-native-vault/src/index.ts @@ -1,9 +1,11 @@ +import { registerKeystoreTransformers } from "./keystore"; import { createMnemonic, crypto, entropyToMnemonic, GENERATE_MNEMONIC } from "./util"; import { Vault } from "./vault"; export type { ISealableVaultFactory, IVault, IVaultFactory } from "./types"; export { GENERATE_MNEMONIC } from "./util"; export { Vault } from "./vault"; +export { type XChainKeystore, decryptFromKeystore } from "./keystore"; Vault.registerValueTransformer("#mnemonic", async (x: unknown) => { if (x !== GENERATE_MNEMONIC) return x; @@ -16,4 +18,7 @@ Vault.registerValueWrapper("#mnemonic", async (x: unknown, addRevoker: (revoke: addRevoker(() => out.revoke?.()); return out; }); + +// Register keystore handlers +registerKeystoreTransformers(Vault); Vault.extensionRegistrationComplete(); diff --git a/packages/hdwallet-native-vault/src/keystore.ts b/packages/hdwallet-native-vault/src/keystore.ts new file mode 100644 index 000000000..de16e451b --- /dev/null +++ b/packages/hdwallet-native-vault/src/keystore.ts @@ -0,0 +1,123 @@ +// src/keystore.ts +import { blake2bFinal, blake2bInit, blake2bUpdate } from "blakejs"; + +import { crypto, encoder } from "./util"; + +export interface XChainKeystore { + crypto: { + cipher: string; + ciphertext: string; + cipherparams: { + iv: string; + }; + kdf: string; + kdfparams: { + prf: string; + dklen: number; + salt: string; + c: number; + }; + mac: string; + }; + version: number; + meta: string; +} + +function blake256(data: Uint8Array): string { + const context = blake2bInit(32); + blake2bUpdate(context, data); + return Buffer.from(blake2bFinal(context)).toString("hex"); +} + +/** + * Decrypts a ThorSwap/XChain compatible keystore + */ +export async function decryptFromKeystore(keystore: XChainKeystore, password: string): Promise { + // eslint-disable-next-line no-debugger + debugger; + if (keystore.version !== 1 || keystore.meta !== "xchain-keystore") { + throw new Error("Invalid keystore format"); + } + + const { kdfparams } = keystore.crypto; + + // Derive key using PBKDF2 + const passwordKey = await ( + await crypto + ).subtle.importKey("raw", encoder.encode(password), "PBKDF2", false, ["deriveBits"]); + + const derivedKey = new Uint8Array( + await ( + await crypto + ).subtle.deriveBits( + { + name: "PBKDF2", + salt: Buffer.from(kdfparams.salt, "hex"), + iterations: kdfparams.c, + hash: "SHA-256", + }, + passwordKey, + kdfparams.dklen * 8 + ) + ); + + // Verify MAC + const ciphertext = Buffer.from(keystore.crypto.ciphertext, "hex"); + const mac = blake256(Buffer.concat([Buffer.from(derivedKey.subarray(16, 32)), ciphertext])); + + if (mac !== keystore.crypto.mac) { + throw new Error("Invalid password"); + } + + // Import key for AES + const aesKey = await ( + await crypto + ).subtle.importKey( + "raw", + derivedKey.subarray(0, 16), + { + name: "AES-CTR", + length: 128, + }, + false, + ["decrypt"] + ); + + // Decrypt using AES-CTR + const iv = Buffer.from(keystore.crypto.cipherparams.iv, "hex"); + const counter = new Uint8Array(16); + counter.set(iv); + + const decrypted = await ( + await crypto + ).subtle.decrypt( + { + name: "AES-CTR", + counter, + length: 128, + }, + aesKey, + ciphertext + ); + + return new TextDecoder().decode(decrypted); +} + +// Register keystore value transformer +export const registerKeystoreTransformers = (Vault: any) => { + // eslint-disable-next-line no-debugger + debugger; + Vault.registerValueTransformer("#keystore", async (value: unknown) => { + if (!value || typeof value !== "string") return value; + + try { + const keystore = JSON.parse(value) as XChainKeystore; + if (keystore.version !== 1 || keystore.meta !== "xchain-keystore") { + throw new Error("Invalid keystore format"); + } + return keystore; + } catch { + return value; + } + }); +}; diff --git a/packages/hdwallet-native-vault/src/vault.ts b/packages/hdwallet-native-vault/src/vault.ts index 443f4b169..e41af0fa8 100644 --- a/packages/hdwallet-native-vault/src/vault.ts +++ b/packages/hdwallet-native-vault/src/vault.ts @@ -2,6 +2,7 @@ import * as core from "@shapeshiftoss/hdwallet-core"; import * as jose from "jose"; import * as ta from "type-assertions"; +import { decryptFromKeystore } from "./keystore"; import { MapVault } from "./mapVault"; import { RawVault } from "./rawVault"; import { ISealableVaultFactory, IVault, VaultPrepareParams } from "./types"; @@ -179,6 +180,15 @@ export class Vault extends MapVault implements IVault { return this; } + async loadFromKeystore(keystoreStr: string, password: string): Promise { + const keystore = JSON.parse(keystoreStr); + const mnemonic = await decryptFromKeystore(keystore, password); + // eslint-disable-next-line no-debugger + debugger; + this.set("#mnemonic", mnemonic); + return this; + } + async save() { const unwrappedRevoker = new (Revocable(class {}))(); const unwrapped = this.#unwrap((x) => unwrappedRevoker.addRevoker(x)); From 7e96d1308ccf528085ba59bec4472227574907e4 Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:21:05 +0300 Subject: [PATCH 2/5] feat: cleanup --- packages/hdwallet-native-vault/src/index.ts | 3 +-- .../hdwallet-native-vault/src/keystore.ts | 20 ++++++------------- packages/hdwallet-native-vault/src/vault.ts | 6 ++---- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/packages/hdwallet-native-vault/src/index.ts b/packages/hdwallet-native-vault/src/index.ts index e01bbe46a..364b7ec35 100644 --- a/packages/hdwallet-native-vault/src/index.ts +++ b/packages/hdwallet-native-vault/src/index.ts @@ -19,6 +19,5 @@ Vault.registerValueWrapper("#mnemonic", async (x: unknown, addRevoker: (revoke: return out; }); -// Register keystore handlers -registerKeystoreTransformers(Vault); +registerKeystoreTransformers(); Vault.extensionRegistrationComplete(); diff --git a/packages/hdwallet-native-vault/src/keystore.ts b/packages/hdwallet-native-vault/src/keystore.ts index de16e451b..857200851 100644 --- a/packages/hdwallet-native-vault/src/keystore.ts +++ b/packages/hdwallet-native-vault/src/keystore.ts @@ -1,8 +1,9 @@ -// src/keystore.ts import { blake2bFinal, blake2bInit, blake2bUpdate } from "blakejs"; import { crypto, encoder } from "./util"; +import { Vault } from "./vault"; +// https://github.com/thorswap/SwapKit/blob/349a9212d8357cc35a8bab771728bbc8d6900ebc/packages/wallets/keystore/src/helpers.ts#L6 export interface XChainKeystore { crypto: { cipher: string; @@ -23,25 +24,22 @@ export interface XChainKeystore { meta: string; } +// https://github.com/thorswap/SwapKit/blob/349a9212d8357cc35a8bab771728bbc8d6900ebc/packages/wallets/keystore/src/helpers.ts#L29-L42 function blake256(data: Uint8Array): string { const context = blake2bInit(32); blake2bUpdate(context, data); return Buffer.from(blake2bFinal(context)).toString("hex"); } -/** - * Decrypts a ThorSwap/XChain compatible keystore - */ +// https://github.com/thorswap/SwapKit/blob/349a9212d8357cc35a8bab771728bbc8d6900ebc/packages/wallets/keystore/src/helpers.ts#L102 export async function decryptFromKeystore(keystore: XChainKeystore, password: string): Promise { - // eslint-disable-next-line no-debugger - debugger; if (keystore.version !== 1 || keystore.meta !== "xchain-keystore") { throw new Error("Invalid keystore format"); } const { kdfparams } = keystore.crypto; - // Derive key using PBKDF2 + // Derive key using PBKDF2 similar to SwapKit's `pbkdf2Async` call const passwordKey = await ( await crypto ).subtle.importKey("raw", encoder.encode(password), "PBKDF2", false, ["deriveBits"]); @@ -61,7 +59,6 @@ export async function decryptFromKeystore(keystore: XChainKeystore, password: st ) ); - // Verify MAC const ciphertext = Buffer.from(keystore.crypto.ciphertext, "hex"); const mac = blake256(Buffer.concat([Buffer.from(derivedKey.subarray(16, 32)), ciphertext])); @@ -69,7 +66,6 @@ export async function decryptFromKeystore(keystore: XChainKeystore, password: st throw new Error("Invalid password"); } - // Import key for AES const aesKey = await ( await crypto ).subtle.importKey( @@ -83,7 +79,6 @@ export async function decryptFromKeystore(keystore: XChainKeystore, password: st ["decrypt"] ); - // Decrypt using AES-CTR const iv = Buffer.from(keystore.crypto.cipherparams.iv, "hex"); const counter = new Uint8Array(16); counter.set(iv); @@ -103,10 +98,7 @@ export async function decryptFromKeystore(keystore: XChainKeystore, password: st return new TextDecoder().decode(decrypted); } -// Register keystore value transformer -export const registerKeystoreTransformers = (Vault: any) => { - // eslint-disable-next-line no-debugger - debugger; +export const registerKeystoreTransformers = () => { Vault.registerValueTransformer("#keystore", async (value: unknown) => { if (!value || typeof value !== "string") return value; diff --git a/packages/hdwallet-native-vault/src/vault.ts b/packages/hdwallet-native-vault/src/vault.ts index e41af0fa8..fdad4a12d 100644 --- a/packages/hdwallet-native-vault/src/vault.ts +++ b/packages/hdwallet-native-vault/src/vault.ts @@ -180,11 +180,9 @@ export class Vault extends MapVault implements IVault { return this; } - async loadFromKeystore(keystoreStr: string, password: string): Promise { - const keystore = JSON.parse(keystoreStr); + async loadFromKeystore(stringifiedKeystore: string, password: string) { + const keystore = JSON.parse(stringifiedKeystore); const mnemonic = await decryptFromKeystore(keystore, password); - // eslint-disable-next-line no-debugger - debugger; this.set("#mnemonic", mnemonic); return this; } From d60d58d104447a4f114ee346e8c41ca7d20e108a Mon Sep 17 00:00:00 2001 From: kaladinlight <35275952+kaladinlight@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:04:13 -0700 Subject: [PATCH 3/5] suggestions --- packages/hdwallet-native-vault/src/index.ts | 5 +- .../hdwallet-native-vault/src/keystore.ts | 95 ++++++++----------- 2 files changed, 40 insertions(+), 60 deletions(-) diff --git a/packages/hdwallet-native-vault/src/index.ts b/packages/hdwallet-native-vault/src/index.ts index 364b7ec35..343721ac0 100644 --- a/packages/hdwallet-native-vault/src/index.ts +++ b/packages/hdwallet-native-vault/src/index.ts @@ -1,11 +1,11 @@ -import { registerKeystoreTransformers } from "./keystore"; import { createMnemonic, crypto, entropyToMnemonic, GENERATE_MNEMONIC } from "./util"; import { Vault } from "./vault"; export type { ISealableVaultFactory, IVault, IVaultFactory } from "./types"; export { GENERATE_MNEMONIC } from "./util"; export { Vault } from "./vault"; -export { type XChainKeystore, decryptFromKeystore } from "./keystore"; +export type { Keystore } from "./keystore"; +export { decryptFromKeystore } from "./keystore"; Vault.registerValueTransformer("#mnemonic", async (x: unknown) => { if (x !== GENERATE_MNEMONIC) return x; @@ -19,5 +19,4 @@ Vault.registerValueWrapper("#mnemonic", async (x: unknown, addRevoker: (revoke: return out; }); -registerKeystoreTransformers(); Vault.extensionRegistrationComplete(); diff --git a/packages/hdwallet-native-vault/src/keystore.ts b/packages/hdwallet-native-vault/src/keystore.ts index 857200851..4fb6c63f4 100644 --- a/packages/hdwallet-native-vault/src/keystore.ts +++ b/packages/hdwallet-native-vault/src/keystore.ts @@ -1,10 +1,14 @@ -import { blake2bFinal, blake2bInit, blake2bUpdate } from "blakejs"; +import { blake2bHex } from "blakejs"; -import { crypto, encoder } from "./util"; -import { Vault } from "./vault"; +import { crypto as asyncCrypto, decoder, encoder } from "./util"; -// https://github.com/thorswap/SwapKit/blob/349a9212d8357cc35a8bab771728bbc8d6900ebc/packages/wallets/keystore/src/helpers.ts#L6 -export interface XChainKeystore { +function toWordArray(x: Uint8Array): CryptoJS.lib.WordArray { + return CryptoJS.enc.Hex.parse(Buffer.from(x).toString("hex")); +} + +// https://github.com/ethereum/go-ethereum/blob/033de2a05bdbea87b4efc5156511afe42c38fd55/accounts/keystore/key.go#L80 +// https://github.com/thorswap/SwapKit/blob/e5ff01b683f270e187d8c08d4e8a1c4e0af56f98/packages/wallets/keystore/src/helpers.ts#L6 +export interface Keystore { crypto: { cipher: string; ciphertext: string; @@ -21,53 +25,50 @@ export interface XChainKeystore { mac: string; }; version: number; - meta: string; } -// https://github.com/thorswap/SwapKit/blob/349a9212d8357cc35a8bab771728bbc8d6900ebc/packages/wallets/keystore/src/helpers.ts#L29-L42 -function blake256(data: Uint8Array): string { - const context = blake2bInit(32); - blake2bUpdate(context, data); - return Buffer.from(blake2bFinal(context)).toString("hex"); -} +// https://github.com/ethereum/go-ethereum/blob/033de2a05bdbea87b4efc5156511afe42c38fd55/accounts/keystore/passphrase.go#L200 +// https://github.com/thorswap/SwapKit/blob/e5ff01b683f270e187d8c08d4e8a1c4e0af56f98/packages/wallets/keystore/src/helpers.ts#L103 +export async function decryptFromKeystore(keystore: Keystore, password: string): Promise { + const { cipher, cipherparams, ciphertext, kdf, kdfparams, mac } = keystore.crypto; + const { c, dklen, prf, salt } = kdfparams; + const { iv } = cipherparams; -// https://github.com/thorswap/SwapKit/blob/349a9212d8357cc35a8bab771728bbc8d6900ebc/packages/wallets/keystore/src/helpers.ts#L102 -export async function decryptFromKeystore(keystore: XChainKeystore, password: string): Promise { - if (keystore.version !== 1 || keystore.meta !== "xchain-keystore") { - throw new Error("Invalid keystore format"); - } + if (kdf !== "pbkdf2") throw new Error(`Unsupported KDF: ${kdf}`); + if (prf !== "hmac-sha256") throw new Error(`Unsupported PBKDF2 PRF: ${prf}`); + if (cipher !== "aes-128-ctr") throw new Error(`Unsupported Cipher: ${cipher}`); - const { kdfparams } = keystore.crypto; - - // Derive key using PBKDF2 similar to SwapKit's `pbkdf2Async` call - const passwordKey = await ( - await crypto + const baseKey = await ( + await asyncCrypto ).subtle.importKey("raw", encoder.encode(password), "PBKDF2", false, ["deriveBits"]); const derivedKey = new Uint8Array( await ( - await crypto + await asyncCrypto ).subtle.deriveBits( { name: "PBKDF2", - salt: Buffer.from(kdfparams.salt, "hex"), - iterations: kdfparams.c, + salt: Buffer.from(salt, "hex"), + iterations: c, hash: "SHA-256", }, - passwordKey, - kdfparams.dklen * 8 + baseKey, + dklen * 8 // convert dklen from bytes to bits ) ); - const ciphertext = Buffer.from(keystore.crypto.ciphertext, "hex"); - const mac = blake256(Buffer.concat([Buffer.from(derivedKey.subarray(16, 32)), ciphertext])); + const data = Buffer.concat([derivedKey.subarray(16, 32), Buffer.from(ciphertext, "hex")]); + + // thorswap uses blake256 + const macBlake256 = blake2bHex(data, undefined, 32); - if (mac !== keystore.crypto.mac) { - throw new Error("Invalid password"); - } + // evm wallets use keccak256 + const macKeccak256 = CryptoJS.enc.Hex.stringify(CryptoJS.SHA3(toWordArray(data), { outputLength: 256 })); + + if (macBlake256 !== mac || macKeccak256 !== mac) throw new Error("Invalid password"); const aesKey = await ( - await crypto + await asyncCrypto ).subtle.importKey( "raw", derivedKey.subarray(0, 16), @@ -79,37 +80,17 @@ export async function decryptFromKeystore(keystore: XChainKeystore, password: st ["decrypt"] ); - const iv = Buffer.from(keystore.crypto.cipherparams.iv, "hex"); - const counter = new Uint8Array(16); - counter.set(iv); - const decrypted = await ( - await crypto + await asyncCrypto ).subtle.decrypt( { name: "AES-CTR", - counter, + counter: new Uint8Array(Buffer.from(iv, "hex")), length: 128, }, aesKey, - ciphertext + Buffer.from(ciphertext, "hex") ); - return new TextDecoder().decode(decrypted); + return decoder.decode(decrypted); } - -export const registerKeystoreTransformers = () => { - Vault.registerValueTransformer("#keystore", async (value: unknown) => { - if (!value || typeof value !== "string") return value; - - try { - const keystore = JSON.parse(value) as XChainKeystore; - if (keystore.version !== 1 || keystore.meta !== "xchain-keystore") { - throw new Error("Invalid keystore format"); - } - return keystore; - } catch { - return value; - } - }); -}; From 7c684a29153987ca838abaa57fa999546ccce3ab Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Thu, 9 Jan 2025 00:01:11 +0400 Subject: [PATCH 4/5] fix: oh well --- packages/hdwallet-native-vault/src/keystore.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/hdwallet-native-vault/src/keystore.ts b/packages/hdwallet-native-vault/src/keystore.ts index 4fb6c63f4..3582f8960 100644 --- a/packages/hdwallet-native-vault/src/keystore.ts +++ b/packages/hdwallet-native-vault/src/keystore.ts @@ -2,10 +2,6 @@ import { blake2bHex } from "blakejs"; import { crypto as asyncCrypto, decoder, encoder } from "./util"; -function toWordArray(x: Uint8Array): CryptoJS.lib.WordArray { - return CryptoJS.enc.Hex.parse(Buffer.from(x).toString("hex")); -} - // https://github.com/ethereum/go-ethereum/blob/033de2a05bdbea87b4efc5156511afe42c38fd55/accounts/keystore/key.go#L80 // https://github.com/thorswap/SwapKit/blob/e5ff01b683f270e187d8c08d4e8a1c4e0af56f98/packages/wallets/keystore/src/helpers.ts#L6 export interface Keystore { @@ -63,9 +59,11 @@ export async function decryptFromKeystore(keystore: Keystore, password: string): const macBlake256 = blake2bHex(data, undefined, 32); // evm wallets use keccak256 - const macKeccak256 = CryptoJS.enc.Hex.stringify(CryptoJS.SHA3(toWordArray(data), { outputLength: 256 })); + // TODO: evm wallets use keccak256 would be nice-to-have, though currently throwing at + // "sha3-256 is not supported (we accept pull requests)" + // const macKeccak256 = crypto.createHash("sha3-256").update(data).digest("hex"); - if (macBlake256 !== mac || macKeccak256 !== mac) throw new Error("Invalid password"); + if (macBlake256 !== mac) throw new Error("Invalid password"); const aesKey = await ( await asyncCrypto From 552de753e14e1c8317cff36ed98dd8c897332691 Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Thu, 9 Jan 2025 00:23:59 +0400 Subject: [PATCH 5/5] chore(release): publish 1.58.0 --- examples/sandbox/package.json | 36 +++++++++---------- integration/package.json | 20 +++++------ lerna.json | 2 +- packages/hdwallet-coinbase/package.json | 4 +-- packages/hdwallet-core/package.json | 2 +- .../hdwallet-keepkey-chromeusb/package.json | 6 ++-- .../hdwallet-keepkey-electron/package.json | 4 +-- .../hdwallet-keepkey-nodehid/package.json | 4 +-- .../hdwallet-keepkey-nodewebusb/package.json | 6 ++-- packages/hdwallet-keepkey-tcp/package.json | 6 ++-- packages/hdwallet-keepkey-webusb/package.json | 6 ++-- packages/hdwallet-keepkey/package.json | 4 +-- packages/hdwallet-keplr/package.json | 4 +-- packages/hdwallet-ledger-webhid/package.json | 6 ++-- packages/hdwallet-ledger-webusb/package.json | 6 ++-- packages/hdwallet-ledger/package.json | 4 +-- .../hdwallet-metamask-multichain/package.json | 4 +-- packages/hdwallet-native-vault/package.json | 4 +-- packages/hdwallet-native/package.json | 4 +-- packages/hdwallet-phantom/package.json | 4 +-- packages/hdwallet-portis/package.json | 4 +-- packages/hdwallet-trezor-connect/package.json | 6 ++-- packages/hdwallet-trezor/package.json | 4 +-- packages/hdwallet-walletconnect/package.json | 4 +-- .../hdwallet-walletconnectV2/package.json | 4 +-- 25 files changed, 79 insertions(+), 79 deletions(-) diff --git a/examples/sandbox/package.json b/examples/sandbox/package.json index 0f389d526..55ee70a03 100644 --- a/examples/sandbox/package.json +++ b/examples/sandbox/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-sandbox", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "private": true, "browserslist": "> 0.5%, last 2 versions, not dead", @@ -12,23 +12,23 @@ "dependencies": { "@esm2cjs/p-queue": "^7.3.0", "@metamask/eth-sig-util": "^7.0.0", - "@shapeshiftoss/hdwallet-coinbase": "1.57.1", - "@shapeshiftoss/hdwallet-core": "1.57.1", - "@shapeshiftoss/hdwallet-keepkey": "1.57.1", - "@shapeshiftoss/hdwallet-keepkey-tcp": "1.57.1", - "@shapeshiftoss/hdwallet-keepkey-webusb": "1.57.1", - "@shapeshiftoss/hdwallet-keplr": "1.57.1", - "@shapeshiftoss/hdwallet-ledger": "1.57.1", - "@shapeshiftoss/hdwallet-ledger-webhid": "1.57.1", - "@shapeshiftoss/hdwallet-ledger-webusb": "1.57.1", - "@shapeshiftoss/hdwallet-metamask-multichain": "1.57.1", - "@shapeshiftoss/hdwallet-native": "1.57.1", - "@shapeshiftoss/hdwallet-phantom": "1.57.1", - "@shapeshiftoss/hdwallet-portis": "1.57.1", - "@shapeshiftoss/hdwallet-trezor": "1.57.1", - "@shapeshiftoss/hdwallet-trezor-connect": "1.57.1", - "@shapeshiftoss/hdwallet-walletconnect": "1.57.1", - "@shapeshiftoss/hdwallet-walletconnectv2": "1.57.1", + "@shapeshiftoss/hdwallet-coinbase": "1.58.0", + "@shapeshiftoss/hdwallet-core": "1.58.0", + "@shapeshiftoss/hdwallet-keepkey": "1.58.0", + "@shapeshiftoss/hdwallet-keepkey-tcp": "1.58.0", + "@shapeshiftoss/hdwallet-keepkey-webusb": "1.58.0", + "@shapeshiftoss/hdwallet-keplr": "1.58.0", + "@shapeshiftoss/hdwallet-ledger": "1.58.0", + "@shapeshiftoss/hdwallet-ledger-webhid": "1.58.0", + "@shapeshiftoss/hdwallet-ledger-webusb": "1.58.0", + "@shapeshiftoss/hdwallet-metamask-multichain": "1.58.0", + "@shapeshiftoss/hdwallet-native": "1.58.0", + "@shapeshiftoss/hdwallet-phantom": "1.58.0", + "@shapeshiftoss/hdwallet-portis": "1.58.0", + "@shapeshiftoss/hdwallet-trezor": "1.58.0", + "@shapeshiftoss/hdwallet-trezor-connect": "1.58.0", + "@shapeshiftoss/hdwallet-walletconnect": "1.58.0", + "@shapeshiftoss/hdwallet-walletconnectv2": "1.58.0", "bip32": "^2.0.4", "eip-712": "^1.0.0", "jquery": "^3.7.1", diff --git a/integration/package.json b/integration/package.json index 05b43f7f4..1a602da4c 100644 --- a/integration/package.json +++ b/integration/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/integration", - "version": "1.57.1", + "version": "1.58.0", "main": "index.js", "license": "MIT", "private": true, @@ -11,15 +11,15 @@ }, "dependencies": { "@bitcoinerlab/secp256k1": "^1.1.1", - "@shapeshiftoss/hdwallet-core": "1.57.1", - "@shapeshiftoss/hdwallet-keepkey": "1.57.1", - "@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.57.1", - "@shapeshiftoss/hdwallet-keepkey-tcp": "1.57.1", - "@shapeshiftoss/hdwallet-ledger": "1.57.1", - "@shapeshiftoss/hdwallet-metamask-multichain": "1.57.1", - "@shapeshiftoss/hdwallet-native": "1.57.1", - "@shapeshiftoss/hdwallet-portis": "1.57.1", - "@shapeshiftoss/hdwallet-trezor": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", + "@shapeshiftoss/hdwallet-keepkey": "1.58.0", + "@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.58.0", + "@shapeshiftoss/hdwallet-keepkey-tcp": "1.58.0", + "@shapeshiftoss/hdwallet-ledger": "1.58.0", + "@shapeshiftoss/hdwallet-metamask-multichain": "1.58.0", + "@shapeshiftoss/hdwallet-native": "1.58.0", + "@shapeshiftoss/hdwallet-portis": "1.58.0", + "@shapeshiftoss/hdwallet-trezor": "1.58.0", "fast-json-stable-stringify": "^2.1.0", "msw": "^0.27.1", "whatwg-fetch": "^3.6.2" diff --git a/lerna.json b/lerna.json index 6f1713601..b62585318 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "5.2.0", - "version": "1.57.1", + "version": "1.58.0", "npmClient": "yarn", "useWorkspaces": true, "command": { diff --git a/packages/hdwallet-coinbase/package.json b/packages/hdwallet-coinbase/package.json index fc4237f91..9c65cd370 100644 --- a/packages/hdwallet-coinbase/package.json +++ b/packages/hdwallet-coinbase/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-coinbase", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -15,7 +15,7 @@ }, "dependencies": { "@coinbase/wallet-sdk": "^3.6.6", - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "eth-rpc-errors": "^4.0.3", "lodash": "^4.17.21" }, diff --git a/packages/hdwallet-core/package.json b/packages/hdwallet-core/package.json index f84b8f1cd..861069ffc 100644 --- a/packages/hdwallet-core/package.json +++ b/packages/hdwallet-core/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-core", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" diff --git a/packages/hdwallet-keepkey-chromeusb/package.json b/packages/hdwallet-keepkey-chromeusb/package.json index 65b86f114..88898cac3 100644 --- a/packages/hdwallet-keepkey-chromeusb/package.json +++ b/packages/hdwallet-keepkey-chromeusb/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-keepkey-chromeusb", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -14,7 +14,7 @@ "prepublishOnly": "yarn clean && yarn build" }, "dependencies": { - "@shapeshiftoss/hdwallet-core": "1.57.1", - "@shapeshiftoss/hdwallet-keepkey": "1.57.1" + "@shapeshiftoss/hdwallet-core": "1.58.0", + "@shapeshiftoss/hdwallet-keepkey": "1.58.0" } } diff --git a/packages/hdwallet-keepkey-electron/package.json b/packages/hdwallet-keepkey-electron/package.json index d4c9c1ee2..e434c64a4 100644 --- a/packages/hdwallet-keepkey-electron/package.json +++ b/packages/hdwallet-keepkey-electron/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-keepkey-electron", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -14,7 +14,7 @@ "prepublishOnly": "yarn clean && yarn build" }, "dependencies": { - "@shapeshiftoss/hdwallet-keepkey": "1.57.1", + "@shapeshiftoss/hdwallet-keepkey": "1.58.0", "uuid": "^8.3.2" }, "peerDependencies": { diff --git a/packages/hdwallet-keepkey-nodehid/package.json b/packages/hdwallet-keepkey-nodehid/package.json index ebc21df5d..d64135d87 100644 --- a/packages/hdwallet-keepkey-nodehid/package.json +++ b/packages/hdwallet-keepkey-nodehid/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-keepkey-nodehid", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -14,7 +14,7 @@ "prepublishOnly": "yarn clean && yarn build" }, "dependencies": { - "@shapeshiftoss/hdwallet-keepkey": "1.57.1" + "@shapeshiftoss/hdwallet-keepkey": "1.58.0" }, "peerDependencies": { "node-hid": "^2.1.1" diff --git a/packages/hdwallet-keepkey-nodewebusb/package.json b/packages/hdwallet-keepkey-nodewebusb/package.json index 33e955d4a..aa2b436fb 100644 --- a/packages/hdwallet-keepkey-nodewebusb/package.json +++ b/packages/hdwallet-keepkey-nodewebusb/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-keepkey-nodewebusb", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -14,8 +14,8 @@ "prepublishOnly": "yarn clean && yarn build" }, "dependencies": { - "@shapeshiftoss/hdwallet-core": "1.57.1", - "@shapeshiftoss/hdwallet-keepkey": "1.57.1" + "@shapeshiftoss/hdwallet-core": "1.58.0", + "@shapeshiftoss/hdwallet-keepkey": "1.58.0" }, "peerDependencies": { "usb": "^2.3.1" diff --git a/packages/hdwallet-keepkey-tcp/package.json b/packages/hdwallet-keepkey-tcp/package.json index d11810576..f398c3c07 100644 --- a/packages/hdwallet-keepkey-tcp/package.json +++ b/packages/hdwallet-keepkey-tcp/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-keepkey-tcp", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -14,8 +14,8 @@ "prepublishOnly": "yarn clean && yarn build" }, "dependencies": { - "@shapeshiftoss/hdwallet-core": "1.57.1", - "@shapeshiftoss/hdwallet-keepkey": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", + "@shapeshiftoss/hdwallet-keepkey": "1.58.0", "axios": "^0.21.1" } } diff --git a/packages/hdwallet-keepkey-webusb/package.json b/packages/hdwallet-keepkey-webusb/package.json index 41cdc8b65..5cbb8dbc4 100644 --- a/packages/hdwallet-keepkey-webusb/package.json +++ b/packages/hdwallet-keepkey-webusb/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-keepkey-webusb", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -14,8 +14,8 @@ "prepublishOnly": "yarn clean && yarn build" }, "dependencies": { - "@shapeshiftoss/hdwallet-core": "1.57.1", - "@shapeshiftoss/hdwallet-keepkey": "1.57.1" + "@shapeshiftoss/hdwallet-core": "1.58.0", + "@shapeshiftoss/hdwallet-keepkey": "1.58.0" }, "devDependencies": { "@types/w3c-web-usb": "^1.0.4" diff --git a/packages/hdwallet-keepkey/package.json b/packages/hdwallet-keepkey/package.json index 4da6b80b8..abc911aa3 100644 --- a/packages/hdwallet-keepkey/package.json +++ b/packages/hdwallet-keepkey/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-keepkey", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -21,7 +21,7 @@ "@keepkey/device-protocol": "^7.12.2", "@metamask/eth-sig-util": "^7.0.0", "@shapeshiftoss/bitcoinjs-lib": "7.0.0-shapeshift.0", - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "@shapeshiftoss/proto-tx-builder": "^0.8.0", "bignumber.js": "^9.0.1", "bnb-javascript-sdk-nobroadcast": "^2.16.14", diff --git a/packages/hdwallet-keplr/package.json b/packages/hdwallet-keplr/package.json index 8e7254509..fe93442e8 100644 --- a/packages/hdwallet-keplr/package.json +++ b/packages/hdwallet-keplr/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-keplr", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -15,7 +15,7 @@ }, "dependencies": { "@shapeshiftoss/caip": "8.15.0", - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "@shapeshiftoss/proto-tx-builder": "^0.8.0", "@shapeshiftoss/types": "3.1.3", "base64-js": "^1.5.1", diff --git a/packages/hdwallet-ledger-webhid/package.json b/packages/hdwallet-ledger-webhid/package.json index a6beba1c1..90e0820a7 100644 --- a/packages/hdwallet-ledger-webhid/package.json +++ b/packages/hdwallet-ledger-webhid/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-ledger-webhid", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -19,8 +19,8 @@ "@ledgerhq/hw-transport": "^6.31.2", "@ledgerhq/hw-transport-webhid": "^6.29.2", "@ledgerhq/live-common": "^21.8.2", - "@shapeshiftoss/hdwallet-core": "1.57.1", - "@shapeshiftoss/hdwallet-ledger": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", + "@shapeshiftoss/hdwallet-ledger": "1.58.0", "@types/w3c-web-hid": "^1.0.2" }, "devDependencies": { diff --git a/packages/hdwallet-ledger-webusb/package.json b/packages/hdwallet-ledger-webusb/package.json index 9ff777526..bf3d07ad4 100644 --- a/packages/hdwallet-ledger-webusb/package.json +++ b/packages/hdwallet-ledger-webusb/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-ledger-webusb", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -21,8 +21,8 @@ "@ledgerhq/hw-transport-webusb": "^6.29.2", "@ledgerhq/live-common": "^21.8.2", "@ledgerhq/logs": "^6.10.1", - "@shapeshiftoss/hdwallet-core": "1.57.1", - "@shapeshiftoss/hdwallet-ledger": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", + "@shapeshiftoss/hdwallet-ledger": "1.58.0", "@types/w3c-web-usb": "^1.0.4", "p-queue": "^7.4.1" }, diff --git a/packages/hdwallet-ledger/package.json b/packages/hdwallet-ledger/package.json index f42c0f3ba..e64885ab8 100644 --- a/packages/hdwallet-ledger/package.json +++ b/packages/hdwallet-ledger/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-ledger", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -19,7 +19,7 @@ "@ethereumjs/tx": "^3.3.0", "@ledgerhq/hw-app-cosmos": "^6.29.1", "@shapeshiftoss/bitcoinjs-lib": "7.0.0-shapeshift.0", - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "@solana/web3.js": "1.95.8", "base64-js": "^1.5.1", "bchaddrjs": "^0.4.4", diff --git a/packages/hdwallet-metamask-multichain/package.json b/packages/hdwallet-metamask-multichain/package.json index 9a6022e07..7bb46d96f 100644 --- a/packages/hdwallet-metamask-multichain/package.json +++ b/packages/hdwallet-metamask-multichain/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-metamask-multichain", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -17,7 +17,7 @@ "@metamask/detect-provider": "^1.2.0", "@metamask/onboarding": "^1.0.1", "@shapeshiftoss/common-api": "^9.3.0", - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "@shapeshiftoss/metamask-snaps-adapter": "^1.0.12", "@shapeshiftoss/metamask-snaps-types": "^1.0.12", "eth-rpc-errors": "^4.0.3", diff --git a/packages/hdwallet-native-vault/package.json b/packages/hdwallet-native-vault/package.json index b4b3f529f..dbcf5089d 100644 --- a/packages/hdwallet-native-vault/package.json +++ b/packages/hdwallet-native-vault/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-native-vault", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -15,7 +15,7 @@ }, "dependencies": { "@bitcoinerlab/secp256k1": "^1.1.1", - "@shapeshiftoss/hdwallet-native": "1.57.1", + "@shapeshiftoss/hdwallet-native": "1.58.0", "bip39": "^3.0.4", "hash-wasm": "^4.11.0", "idb-keyval": "^6.0.3", diff --git a/packages/hdwallet-native/package.json b/packages/hdwallet-native/package.json index 2455d4573..8547f059e 100644 --- a/packages/hdwallet-native/package.json +++ b/packages/hdwallet-native/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-native", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -17,7 +17,7 @@ "@bitcoinerlab/secp256k1": "^1.1.1", "@shapeshiftoss/bitcoinjs-lib": "7.0.0-shapeshift.0", "@shapeshiftoss/fiosdk": "1.2.1-shapeshift.6", - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "@shapeshiftoss/proto-tx-builder": "^0.8.0", "@zxing/text-encoding": "^0.9.0", "bchaddrjs": "^0.4.9", diff --git a/packages/hdwallet-phantom/package.json b/packages/hdwallet-phantom/package.json index c46d45c3c..807d25b59 100644 --- a/packages/hdwallet-phantom/package.json +++ b/packages/hdwallet-phantom/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-phantom", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -15,7 +15,7 @@ }, "dependencies": { "@shapeshiftoss/bitcoinjs-lib": "7.0.0-shapeshift.0", - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "@solana/web3.js": "1.95.8", "base64-js": "^1.5.1", "bitcoinjs-message": "^2.0.0", diff --git a/packages/hdwallet-portis/package.json b/packages/hdwallet-portis/package.json index 77cf1197b..7cf04a8ca 100644 --- a/packages/hdwallet-portis/package.json +++ b/packages/hdwallet-portis/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-portis", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -16,7 +16,7 @@ "dependencies": { "@portis/web3": "3.0.10", "@shapeshiftoss/bitcoinjs-lib": "7.0.0-shapeshift.0", - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "base64-js": "^1.5.1", "bip32": "^2.0.4", "bitcoinjs-message": "^2.1.0", diff --git a/packages/hdwallet-trezor-connect/package.json b/packages/hdwallet-trezor-connect/package.json index b1841bd4b..180b087be 100644 --- a/packages/hdwallet-trezor-connect/package.json +++ b/packages/hdwallet-trezor-connect/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-trezor-connect", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -14,8 +14,8 @@ "prepublishOnly": "yarn clean && yarn build" }, "dependencies": { - "@shapeshiftoss/hdwallet-core": "1.57.1", - "@shapeshiftoss/hdwallet-trezor": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", + "@shapeshiftoss/hdwallet-trezor": "1.58.0", "@trezor/rollout": "^1.2.0", "trezor-connect": "^8.2.1" } diff --git a/packages/hdwallet-trezor/package.json b/packages/hdwallet-trezor/package.json index bcb758d05..db7ebcc1f 100644 --- a/packages/hdwallet-trezor/package.json +++ b/packages/hdwallet-trezor/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-trezor", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -17,7 +17,7 @@ "dependencies": { "@ethereumjs/common": "^2.4.0", "@ethereumjs/tx": "^3.3.0", - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "base64-js": "^1.5.1", "lodash": "^4.17.21" }, diff --git a/packages/hdwallet-walletconnect/package.json b/packages/hdwallet-walletconnect/package.json index e6656d4f0..2475dce9e 100644 --- a/packages/hdwallet-walletconnect/package.json +++ b/packages/hdwallet-walletconnect/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-walletconnect", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -15,7 +15,7 @@ "prepublishOnly": "yarn clean && yarn build" }, "dependencies": { - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "@walletconnect/qrcode-modal": "^1.7.8", "@walletconnect/web3-provider": "^1.7.8", "ethers": "^5.6.5" diff --git a/packages/hdwallet-walletconnectV2/package.json b/packages/hdwallet-walletconnectV2/package.json index 2eacad807..04a39d8bd 100644 --- a/packages/hdwallet-walletconnectV2/package.json +++ b/packages/hdwallet-walletconnectV2/package.json @@ -1,6 +1,6 @@ { "name": "@shapeshiftoss/hdwallet-walletconnectv2", - "version": "1.57.1", + "version": "1.58.0", "license": "MIT", "publishConfig": { "access": "public" @@ -15,7 +15,7 @@ "prepublishOnly": "yarn clean && yarn build" }, "dependencies": { - "@shapeshiftoss/hdwallet-core": "1.57.1", + "@shapeshiftoss/hdwallet-core": "1.58.0", "@walletconnect/ethereum-provider": "^2.10.1", "@walletconnect/modal": "^2.6.2", "ethers": "^5.6.5"