@exodus/hw-ledger 2.11.0 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.11.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.11.0...@exodus/hw-ledger@2.11.1) (2024-10-01)
7
+
8
+ ### Features
9
+
10
+ - use internal xpub for multisig hardware wallet policy ([#9639](https://github.com/ExodusMovement/exodus-hydra/issues/9639)) ([e96bee0](https://github.com/ExodusMovement/exodus-hydra/commit/e96bee045b3799a43464db4487d42a980ef95f0f))
11
+
6
12
  ## [2.11.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/hw-ledger@2.10.0...@exodus/hw-ledger@2.11.0) (2024-09-23)
7
13
 
8
14
  ### Features
package/lib/index.d.ts CHANGED
@@ -5,7 +5,7 @@ declare const hardwareWalletLedger: ({ bluetoothScannerTimeout, }?: Partial<HwLe
5
5
  readonly definition: {
6
6
  readonly id: "bluetoothStatusAtom";
7
7
  readonly type: "atom";
8
- readonly factory: () => import("libraries/atoms/lib").Atom<import("./atoms").BluetoothStatus>;
8
+ readonly factory: () => import("@exodus/atoms").Atom<import("./atoms").BluetoothStatus>;
9
9
  readonly dependencies: readonly [];
10
10
  readonly public: true;
11
11
  };
@@ -13,7 +13,7 @@ declare const hardwareWalletLedger: ({ bluetoothScannerTimeout, }?: Partial<HwLe
13
13
  readonly definition: {
14
14
  readonly id: "bluetoothScanningAtom";
15
15
  readonly type: "atom";
16
- readonly factory: () => import("libraries/atoms/lib").Atom<boolean>;
16
+ readonly factory: () => import("@exodus/atoms").Atom<boolean>;
17
17
  readonly dependencies: readonly [];
18
18
  readonly public: true;
19
19
  };
@@ -23,7 +23,7 @@ declare const hardwareWalletLedger: ({ bluetoothScannerTimeout, }?: Partial<HwLe
23
23
  readonly type: "atom";
24
24
  readonly factory: ({ storage }: {
25
25
  storage: import("adapters/storage-interface").Storage<Record<string, Buffer>>;
26
- }) => import("libraries/atoms/lib").Atom<Record<string, Buffer> | {}>;
26
+ }) => import("@exodus/atoms").Atom<Record<string, Buffer> | {}>;
27
27
  readonly dependencies: readonly ["storage"];
28
28
  readonly public: true;
29
29
  };
@@ -32,8 +32,8 @@ declare const hardwareWalletLedger: ({ bluetoothScannerTimeout, }?: Partial<HwLe
32
32
  readonly id: "hardwareWalletLedgerPlugin";
33
33
  readonly type: "plugin";
34
34
  readonly factory: ({ bluetoothStatusAtom, bluetoothScanningAtom, ledgerDiscovery, port, }: {
35
- bluetoothStatusAtom: import("libraries/atoms/lib").Atom<import("./atoms").BluetoothStatus>;
36
- bluetoothScanningAtom: import("libraries/atoms/lib").Atom<boolean>;
35
+ bluetoothStatusAtom: import("@exodus/atoms").Atom<import("./atoms").BluetoothStatus>;
36
+ bluetoothScanningAtom: import("@exodus/atoms").Atom<boolean>;
37
37
  ledgerDiscovery: import("./module").LedgerDiscovery;
38
38
  port: import("./shared/types").Port;
39
39
  }) => {
@@ -4,7 +4,6 @@ import type { MultisigData } from 'libraries/hw-common/lib';
4
4
  export declare function assertPsbtOnlyHasAllowedDerivationPaths(psbt: PsbtV2, masterFingerprint: string, derivationPaths: string[]): void;
5
5
  export declare function tagPsbtWithDerivationPaths(psbt: PsbtV2, masterFingerprint: string, derivationPathToPublicKeyMap: Record<string, Buffer>, addressToDerivationPathMap?: Record<string, string>): void;
6
6
  export declare const getWalletPolicy: (fpr: string, xpub: string, purpose: string, coin: string, account: string) => DefaultWalletPolicy;
7
- export declare const DUMMY_TAPROOT_XPUB = "xpub661MyMwAqRbcEYS8w7XLSVeEsBXy79zSzH1J8vCdxAZningWLdN3zgtU6QgnecKFpJFPpdzxKrwoaZoV44qAJewsc4kX9vGaCaBExuvJH57";
8
7
  export declare const getMultisigWalletPolicy: (fpr: string, xpub: string, purpose: string, coin: string, account: string, multisigData: MultisigData) => WalletPolicy;
9
8
  export declare function derivationPathsToWalletPolicy(fpr: string, app: any, derivationPaths: string[], multisigData?: MultisigData): Promise<WalletPolicy[]>;
10
9
  export declare function addDummyInputs(psbt: PsbtV2): void;
@@ -118,10 +118,9 @@ export const getWalletPolicy = (fpr, xpub, purpose, coin, account) => {
118
118
  }[purpose];
119
119
  return new DefaultWalletPolicy(desc, `[${fpr}/${purpose}/${coin}/${account}]${xpub}`);
120
120
  };
121
- export const DUMMY_TAPROOT_XPUB = 'xpub661MyMwAqRbcEYS8w7XLSVeEsBXy79zSzH1J8vCdxAZningWLdN3zgtU6QgnecKFpJFPpdzxKrwoaZoV44qAJewsc4kX9vGaCaBExuvJH57';
122
121
  export const getMultisigWalletPolicy = (fpr, xpub, purpose, coin, account, multisigData) => {
123
122
  let template = `tr(@0/**,sortedmulti_a(${multisigData.threshold}`;
124
- const keys = [DUMMY_TAPROOT_XPUB];
123
+ const keys = [multisigData.internalXpub];
125
124
  multisigData.xpubs.forEach((xpub2, i) => {
126
125
  if (xpub === xpub2) {
127
126
  keys.push(`[${fpr}/${purpose}/${coin}/${account}]${xpub}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/hw-ledger",
3
- "version": "2.11.0",
3
+ "version": "2.12.0",
4
4
  "description": "The ledger module",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "@exodus/bip322-js": "^1.1.0-exodus.4",
35
35
  "@exodus/bitcoinjs-lib": "^6.1.5-exodus.0",
36
36
  "@exodus/ethersproject-transactions": "^5.4.2-exodus.0",
37
- "@exodus/hw-common": "^2.4.0",
37
+ "@exodus/hw-common": "^2.5.0",
38
38
  "@exodus/ledger-bitcoin": "^0.2.3-exodus.3",
39
39
  "@exodus/ledgerhq-devices": "^8.1.0-exodus.3",
40
40
  "@exodus/ledgerhq-hw-app-eth": "^6.33.7-exodus.8",
@@ -71,5 +71,5 @@
71
71
  "tiny-secp256k1": "^2.2.3",
72
72
  "ts-jest": "^29.0.3"
73
73
  },
74
- "gitHead": "fbbf9681c3b997008ee9ad9d76a93484d3f686b9"
74
+ "gitHead": "d4838cd68554c8a09b6d2815a6c77dd6187234a0"
75
75
  }