@exodus/bitcoin-plugin 1.0.13 → 1.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Exodus bitcoin-plugin",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -19,12 +19,12 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@exodus/asset-lib": "^3.7.1",
22
- "@exodus/bitcoin-api": "^2.3.14",
23
- "@exodus/bitcoin-lib": "^2.2.7",
22
+ "@exodus/bitcoin-api": "^2.3.15",
23
+ "@exodus/bitcoin-lib": "^2.2.8",
24
24
  "minimalistic-assert": "^1.0.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@exodus/keychain": "^3.0.0"
28
28
  },
29
- "gitHead": "ae9ce2178387cabffcf542daabe8e6a25e9afa3c"
29
+ "gitHead": "90be61265b73fc6f3238604aea72368cf684faa5"
30
30
  }
@@ -51,6 +51,8 @@ export const createBitcoinAssetFactory = ({ asset, apiUrl, coinInfoNetwork }) =>
51
51
  const keys = createBtcLikeKeys({ coinInfo, versions, useBip86, ecc })
52
52
  const bip44 = bip44Constants['BTC']
53
53
 
54
+ const allowedPurposes = [44, 49, 84, 86]
55
+
54
56
  const useMultipleAddresses = true
55
57
 
56
58
  const features = {
@@ -92,7 +94,7 @@ export const createBitcoinAssetFactory = ({ asset, apiUrl, coinInfoNetwork }) =>
92
94
  address,
93
95
  signTx,
94
96
  getAddressesFromPrivateKey: getAddressesFromPrivateKeyFactory({
95
- purposes: [44, 49, 84, 86],
97
+ purposes: allowedPurposes,
96
98
  keys,
97
99
  coinInfo,
98
100
  }),
@@ -116,10 +118,15 @@ export const createBitcoinAssetFactory = ({ asset, apiUrl, coinInfoNetwork }) =>
116
118
  createFeeMonitor: (args) =>
117
119
  new BitcoinFeeMonitor({ ...args, insight: () => insightClient, assetName: asset.name }),
118
120
  createHistoryMonitor: (args) => createBitcoinMonitor({ insightClient, apiUrl, ...args }),
121
+ features,
119
122
  getFeeData: () => feeData,
120
123
  getBalances,
121
- getKeyIdentifier: createGetKeyIdentifier({ bip44 }),
122
- hasFeature: (feature) => !!features[feature],
124
+ getKeyIdentifier: createGetKeyIdentifier({
125
+ bip44,
126
+ allowedPurposes,
127
+ allowedChainIndices: [0, 1, 2],
128
+ }),
129
+ hasFeature: (feature) => !!features[feature], // @deprecated use api.features instead
123
130
  createAccountState: () => accountStateClass,
124
131
  parseUnsignedTx,
125
132
  parseTx: ({ unsignedTx }) => parseUnsignedTx(unsignedTx),