@exodus/bitcoin-plugin 2.0.0 → 2.1.1
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 +20 -0
- package/package.json +4 -4
- package/src/create-asset.js +26 -20
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
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.1.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@2.1.0...@exodus/bitcoin-plugin@2.1.1) (2025-08-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: bump bitcoin-api to v4 (#6208)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [2.1.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@2.0.0...@exodus/bitcoin-plugin@2.1.0) (2025-07-16)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* feat: move send validation to each asset plugin (#6076)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [2.0.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.35.1...@exodus/bitcoin-plugin@2.0.0) (2025-07-11)
|
|
7
27
|
|
|
8
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Bitcoin plugin for Exodus SDK powered wallets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@exodus/asset-lib": "^5.0.0",
|
|
25
25
|
"@exodus/bip44-constants": "^195.0.0",
|
|
26
|
-
"@exodus/bitcoin-api": "^
|
|
26
|
+
"@exodus/bitcoin-api": "^4.0.0",
|
|
27
27
|
"@exodus/bitcoin-lib": "^2.4.2",
|
|
28
28
|
"@exodus/bitcoin-meta": "^2.0.1",
|
|
29
29
|
"@exodus/bitcoinjs": "^1.1.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@exodus/assets-testing": "^1.0.0",
|
|
40
|
-
"@exodus/bip32": "^
|
|
40
|
+
"@exodus/bip32": "^4.0.2",
|
|
41
41
|
"@exodus/bip39": "^1.0.1",
|
|
42
42
|
"@exodus/bitcoinregtest-meta": "^2.0.1",
|
|
43
43
|
"@exodus/bitcointestnet-meta": "^2.0.1",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"type": "git",
|
|
57
57
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "868fcd77abfbc05568d41ed790ab9ae659fb7312"
|
|
60
60
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
InsightAPIClient,
|
|
20
20
|
isValidInscription,
|
|
21
21
|
moveFundsFactory,
|
|
22
|
+
sendValidations,
|
|
22
23
|
signHardwareFactory,
|
|
23
24
|
signMessage,
|
|
24
25
|
signMessageWithSigner,
|
|
@@ -244,40 +245,45 @@ export const createBitcoinAssetFactory =
|
|
|
244
245
|
const encodeMultisigContract = createEncodeMultisigContract({ network: coinInfo.toBitcoinJS() })
|
|
245
246
|
const psbtToUnsignedTx = createPsbtToUnsignedTx({ assetClientInterface, assetName: asset.name })
|
|
246
247
|
|
|
248
|
+
const signMessageApi = ({ privateKey, signer, message }) =>
|
|
249
|
+
signer ? signMessageWithSigner({ signer, message }) : signMessage({ privateKey, message })
|
|
250
|
+
const web3 = createWeb3API({
|
|
251
|
+
assetClientInterface,
|
|
252
|
+
baseAssetName: asset.name,
|
|
253
|
+
currency: asset.currency,
|
|
254
|
+
insightClient,
|
|
255
|
+
prepareForSigning,
|
|
256
|
+
})
|
|
257
|
+
const createFeeMonitor = (args) =>
|
|
258
|
+
new BitcoinFeeMonitor({ ...args, insight: () => insightClient, assetName: asset.name })
|
|
259
|
+
|
|
247
260
|
const api = {
|
|
248
|
-
getActivityTxs,
|
|
249
261
|
addressHasHistory,
|
|
250
|
-
defaultAddressPath: 'm/0/0', // deprecated
|
|
251
262
|
broadcastTx: (...args) => insightClient.broadcastTx(...args),
|
|
252
|
-
|
|
253
|
-
|
|
263
|
+
createAccountState: () => accountStateClass,
|
|
264
|
+
createFeeMonitor,
|
|
254
265
|
createHistoryMonitor,
|
|
255
266
|
customFees: createCustomFeesApi({ baseAsset: asset, feeData }),
|
|
267
|
+
defaultAddressPath: 'm/0/0', // deprecated
|
|
256
268
|
features,
|
|
269
|
+
getActivityTxs,
|
|
270
|
+
getBalanceForAddress,
|
|
271
|
+
getBalances,
|
|
257
272
|
getDefaultAddressPath,
|
|
273
|
+
getFee,
|
|
258
274
|
getFeeData: () => feeData,
|
|
259
|
-
getBalances,
|
|
260
|
-
getBalanceForAddress,
|
|
261
275
|
getKeyIdentifier,
|
|
276
|
+
getSendValidations: () => sendValidations,
|
|
262
277
|
getSupportedPurposes: createGetSupportedPurposes({ omitPurposes: omitSupportedPurposes }),
|
|
263
278
|
hasFeature: (feature) => !!features[feature], // @deprecated use api.features instead
|
|
264
|
-
|
|
279
|
+
moveFunds,
|
|
280
|
+
nfts,
|
|
265
281
|
privateKeyEncodingDefinition: { encoding: 'wif', version: [coinInfo.versions.private] },
|
|
266
282
|
sendTx,
|
|
267
|
-
signTx,
|
|
268
283
|
signHardware,
|
|
269
|
-
signMessage:
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
moveFunds,
|
|
273
|
-
nfts,
|
|
274
|
-
web3: createWeb3API({
|
|
275
|
-
assetClientInterface,
|
|
276
|
-
baseAssetName: asset.name,
|
|
277
|
-
currency: asset.currency,
|
|
278
|
-
insightClient,
|
|
279
|
-
prepareForSigning,
|
|
280
|
-
}),
|
|
284
|
+
signMessage: signMessageApi,
|
|
285
|
+
signTx,
|
|
286
|
+
web3,
|
|
281
287
|
}
|
|
282
288
|
|
|
283
289
|
const fullAsset = {
|