@exodus/bitcoin-plugin 1.18.0 → 1.19.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 ADDED
@@ -0,0 +1,226 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [1.19.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.18.1...@exodus/bitcoin-plugin@1.19.0) (2024-06-20)
7
+
8
+
9
+ ### Features
10
+
11
+ * Remove ordinals wallet BTC from total balance ([#2524](https://github.com/ExodusMovement/assets/issues/2524)) ([3674bb1](https://github.com/ExodusMovement/assets/commit/3674bb1852aa50f8a8195da276a5b106d3ae1606))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * bitcoinjs-lib bump, ecc cleanup ([#2634](https://github.com/ExodusMovement/assets/issues/2634)) ([96d47a5](https://github.com/ExodusMovement/assets/commit/96d47a508657389ba766bfd44feef7365eb0de9b))
17
+
18
+
19
+
20
+ ## [1.18.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.18.0...@exodus/bitcoin-plugin@1.18.1) (2024-06-04)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * pass all opts to getSupportedPurposes in factory ([#2445](https://github.com/ExodusMovement/assets/issues/2445)) ([c213d74](https://github.com/ExodusMovement/assets/commit/c213d741e35492a12755317c9b88170dee4a29c6))
26
+
27
+
28
+
29
+ ## [1.18.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.17.3...@exodus/bitcoin-plugin@1.18.0) (2024-05-28)
30
+
31
+
32
+ ### Features
33
+
34
+ * add xverseNotMerged ([#2349](https://github.com/ExodusMovement/assets/issues/2349)) ([2e82254](https://github.com/ExodusMovement/assets/commit/2e82254ebe32524dfd92488481e6856f9715deb8))
35
+
36
+
37
+
38
+ ## [1.17.3](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.17.2...@exodus/bitcoin-plugin@1.17.3) (2024-05-23)
39
+
40
+ **Note:** Version bump only for package @exodus/bitcoin-plugin
41
+
42
+
43
+
44
+
45
+
46
+ ## [1.17.2](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.17.1...@exodus/bitcoin-plugin@1.17.2) (2024-05-17)
47
+
48
+
49
+ ### Bug Fixes
50
+
51
+ * manually merge updated Tx properties ([#2311](https://github.com/ExodusMovement/assets/issues/2311)) ([8046c5e](https://github.com/ExodusMovement/assets/commit/8046c5eaa2c9b67f7c531fdf2c82d85a1d8000c7))
52
+
53
+
54
+
55
+ ## [1.17.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.17.0...@exodus/bitcoin-plugin@1.17.1) (2024-05-14)
56
+
57
+
58
+ ### Bug Fixes
59
+
60
+ * bump `@exodus/web3-bitcoin-utils` to 1.12.2 ([#2275](https://github.com/ExodusMovement/assets/issues/2275)) ([2a8b629](https://github.com/ExodusMovement/assets/commit/2a8b629b56d4f4c64ddccc84a3c123dd0389d66e))
61
+ * rename to plural ([#2266](https://github.com/ExodusMovement/assets/issues/2266)) ([954e79b](https://github.com/ExodusMovement/assets/commit/954e79ba25ae43a917ebfdec7d08714e34966d4f))
62
+
63
+
64
+
65
+ ## [1.17.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.16.5...@exodus/bitcoin-plugin@1.17.0) (2024-05-10)
66
+
67
+
68
+ ### Features
69
+
70
+ * buffer signing for BTC ([#2059](https://github.com/ExodusMovement/assets/issues/2059)) ([4616324](https://github.com/ExodusMovement/assets/commit/46163247b24d130318b4cd69814a3b4863e89ce1)), closes [#2234](https://github.com/ExodusMovement/assets/issues/2234)
71
+
72
+
73
+
74
+ ## [1.16.5](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.16.4...@exodus/bitcoin-plugin@1.16.5) (2024-05-09)
75
+
76
+
77
+ ### Bug Fixes
78
+
79
+ * brc20 fee estimation ([#2229](https://github.com/ExodusMovement/assets/issues/2229)) ([191c997](https://github.com/ExodusMovement/assets/commit/191c997dcd39fea82d4d79780eff200d8d81bc10))
80
+
81
+
82
+
83
+ ## [1.16.4](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.16.3...@exodus/bitcoin-plugin@1.16.4) (2024-05-09)
84
+
85
+
86
+ ### Bug Fixes
87
+
88
+ * **bitcoin-plugin:** simulation API calls ([#2237](https://github.com/ExodusMovement/assets/issues/2237)) ([03c01d7](https://github.com/ExodusMovement/assets/commit/03c01d7ab0493f0e78ec9d364c63d903482b10d7))
89
+
90
+
91
+
92
+ ## [1.16.3](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.16.2...@exodus/bitcoin-plugin@1.16.3) (2024-05-08)
93
+
94
+
95
+ ### Bug Fixes
96
+
97
+ * provide `assetName` to createGetKeyIdentifier ([#2191](https://github.com/ExodusMovement/assets/issues/2191)) ([55e5171](https://github.com/ExodusMovement/assets/commit/55e5171b142fd72ff88b645f02f0ad358b93ccf8))
98
+
99
+
100
+
101
+ ## [1.16.2](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.16.1...@exodus/bitcoin-plugin@1.16.2) (2024-05-08)
102
+
103
+ **Note:** Version bump only for package @exodus/bitcoin-plugin
104
+
105
+
106
+
107
+
108
+
109
+ ## [1.16.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.16.0...@exodus/bitcoin-plugin@1.16.1) (2024-05-07)
110
+
111
+
112
+ ### Bug Fixes
113
+
114
+ * revert "support BTC legacy address on trezor (#1807)" ([#2212](https://github.com/ExodusMovement/assets/issues/2212)) ([30f9c79](https://github.com/ExodusMovement/assets/commit/30f9c794043704512da41abff6282a7aabd15517))
115
+
116
+
117
+ ## [1.16.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.15.0...@exodus/bitcoin-plugin@1.16.0) (2024-05-07)
118
+
119
+
120
+ ### Features
121
+
122
+ * **bitcoin-plugin:** add `web3.simulateTransaction` API ([#2220](https://github.com/ExodusMovement/assets/issues/2220)) ([a3f66bb](https://github.com/ExodusMovement/assets/commit/a3f66bb4e1ee2565a5cdf370de22577521944403))
123
+
124
+
125
+
126
+ ## [1.15.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.13.0...@exodus/bitcoin-plugin@1.15.0) (2024-05-06)
127
+
128
+
129
+ ### Features
130
+
131
+ * add option to omit supported purposes ([#2217](https://github.com/ExodusMovement/assets/issues/2217)) ([f0f2866](https://github.com/ExodusMovement/assets/commit/f0f286644eeb5a71a1645de0e8e7ce3a8143769e))
132
+ * **BTC:** only support purpose 86 for multisig wallet accounts ([#2214](https://github.com/ExodusMovement/assets/issues/2214)) ([adac906](https://github.com/ExodusMovement/assets/commit/adac906c22d9a183531070015a7d5ff65a39b581))
133
+
134
+
135
+
136
+ ## [1.14.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.13.0...@exodus/bitcoin-plugin@1.14.0) (2024-05-06)
137
+
138
+
139
+ ### Features
140
+
141
+ * add option to omit supported purposes ([#2217](https://github.com/ExodusMovement/assets/issues/2217)) ([f0f2866](https://github.com/ExodusMovement/assets/commit/f0f286644eeb5a71a1645de0e8e7ce3a8143769e))
142
+
143
+
144
+
145
+ ## [1.13.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.12.1...@exodus/bitcoin-plugin@1.13.0) (2024-04-25)
146
+
147
+
148
+ ### Features
149
+
150
+ * **bitcoin:** taproot multisig address creation and signing ([#2132](https://github.com/ExodusMovement/assets/issues/2132)) ([179a6e4](https://github.com/ExodusMovement/assets/commit/179a6e4fc875cfe1e616dcc67478ae473706e7c1))
151
+
152
+
153
+
154
+ ## [1.12.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.12.0...@exodus/bitcoin-plugin@1.12.1) (2024-04-22)
155
+
156
+
157
+ ### Bug Fixes
158
+
159
+ * bitcoin ordinals and brc20 fee calculation ([#2130](https://github.com/ExodusMovement/assets/issues/2130)) ([f43e7d3](https://github.com/ExodusMovement/assets/commit/f43e7d35030b8e093b8f9247b469377d53bc9ca8))
160
+
161
+
162
+
163
+ ## [1.12.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.10.1...@exodus/bitcoin-plugin@1.12.0) (2024-04-16)
164
+
165
+
166
+ ### Features
167
+
168
+ * add getPrepareSendTransaction and make it available in bitcoin api ([#2060](https://github.com/ExodusMovement/assets/issues/2060)) ([4891835](https://github.com/ExodusMovement/assets/commit/489183511f20e5bff59c4d3babe198d08e1bbef1))
169
+ * **bitcoin:** add `asset.api.signMessage` ([#1993](https://github.com/ExodusMovement/assets/issues/1993)) ([a3c53c8](https://github.com/ExodusMovement/assets/commit/a3c53c808bc68c524122e88c433083ccbb8691c2))
170
+
171
+
172
+
173
+ ## [1.11.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.10.1...@exodus/bitcoin-plugin@1.11.0) (2024-04-15)
174
+
175
+
176
+ ### Features
177
+
178
+ * add getPrepareSendTransaction and make it available in bitcoin api ([#2060](https://github.com/ExodusMovement/assets/issues/2060)) ([4891835](https://github.com/ExodusMovement/assets/commit/489183511f20e5bff59c4d3babe198d08e1bbef1))
179
+
180
+
181
+
182
+ ## [1.10.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.10.0...@exodus/bitcoin-plugin@1.10.1) (2024-04-01)
183
+
184
+
185
+ ### Bug Fixes
186
+
187
+ * do not require arg in `getDefaultAddressPath` ([#1914](https://github.com/ExodusMovement/assets/issues/1914)) ([0a44064](https://github.com/ExodusMovement/assets/commit/0a440649b568f9a3a31cb9172b8f1e8d087197f6))
188
+
189
+
190
+
191
+ ## [1.10.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.9.0...@exodus/bitcoin-plugin@1.10.0) (2024-03-28)
192
+
193
+
194
+ ### Features
195
+
196
+ * **bitcoin:** Increase time between BRC20 refresh ([#1858](https://github.com/ExodusMovement/assets/issues/1858)) ([190090c](https://github.com/ExodusMovement/assets/commit/190090c44c4a34da7a6347146814c832ea8f55b9))
197
+ * **bitcoin:** Port priority fee sorting ([#1885](https://github.com/ExodusMovement/assets/issues/1885)) ([e217547](https://github.com/ExodusMovement/assets/commit/e217547b0b4dbc92bf3e908acd42a6f26d4be1c6))
198
+ * **bitcoin:** Switch to brc20 v2 endpoint ([#1846](https://github.com/ExodusMovement/assets/issues/1846)) ([a1960b4](https://github.com/ExodusMovement/assets/commit/a1960b49926c721b0933368ddcd02f7e1133b2bb))
199
+
200
+
201
+
202
+ ## [1.9.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.8.3...@exodus/bitcoin-plugin@1.9.0) (2024-03-25)
203
+
204
+
205
+ ### Features
206
+
207
+ * add isTestnet flag ([#1887](https://github.com/ExodusMovement/assets/issues/1887)) ([7f6ac2b](https://github.com/ExodusMovement/assets/commit/7f6ac2ba9ce6a402214a60cf90888a37d1faac02))
208
+
209
+
210
+ ### Bug Fixes
211
+
212
+ * support BTC legacy address on trezor ([#1807](https://github.com/ExodusMovement/assets/issues/1807)) ([0bffad2](https://github.com/ExodusMovement/assets/commit/0bffad20d6348fe461636372c5feb4f5a00f6e22))
213
+
214
+
215
+
216
+ ## [1.8.3](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.8.2...@exodus/bitcoin-plugin@1.8.3) (2024-03-18)
217
+
218
+
219
+ ### Performance Improvements
220
+
221
+ * bitcoin unfork bitcoinjs and bolt11 dependencies ([#1730](https://github.com/ExodusMovement/assets/issues/1730)) ([94fd0b9](https://github.com/ExodusMovement/assets/commit/94fd0b94fab17a7876dac7fdf0b708bcda115403))
222
+
223
+
224
+ ### Reverts
225
+
226
+ * Revert "Publish" ([adb8015](https://github.com/ExodusMovement/assets/commit/adb8015efd51a4fa36ad0c86c28cb2d94c52a578))
package/package.json CHANGED
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "Exodus bitcoin-plugin",
5
5
  "main": "src/index.js",
6
6
  "files": [
7
7
  "src",
8
- "!src/**/__tests__"
8
+ "!src/**/__tests__",
9
+ "CHANGELOG.md"
9
10
  ],
10
- "author": "Exodus",
11
+ "homepage": "https://github.com/ExodusMovement/assets/tree/master/bitcoin/bitcoin-plugin",
12
+ "author": "Exodus Movement, Inc.",
11
13
  "license": "ISC",
12
14
  "publishConfig": {
13
15
  "access": "restricted"
14
16
  },
15
17
  "scripts": {
16
18
  "test": "run -T jest",
17
- "lint": "run -T eslint ./src",
19
+ "lint": "run -T eslint .",
18
20
  "lint:fix": "yarn lint --fix"
19
21
  },
20
22
  "dependencies": {
@@ -22,22 +24,22 @@
22
24
  "@exodus/basic-utils": "^2.1.0",
23
25
  "@exodus/bip32": "^1.1.2",
24
26
  "@exodus/bip44-constants": "^195.0.0",
25
- "@exodus/bitcoin-api": "^2.15.0",
27
+ "@exodus/bitcoin-api": "^2.18.4",
26
28
  "@exodus/bitcoin-lib": "^2.4.0",
27
29
  "@exodus/bitcoin-meta": "^1.0.2",
28
- "@exodus/bitcoinjs-lib": "^6.1.5-exodus.1",
30
+ "@exodus/bitcoinjs-lib": "^6.1.5-exodus.2",
29
31
  "@exodus/crypto": "^1.0.0-rc.1",
30
32
  "@exodus/fetch": "^1.3.0",
31
33
  "@exodus/models": "^11.13.0",
32
34
  "@exodus/text-encoding-utf8": "^1.0.2",
33
35
  "@exodus/web3-bitcoin-utils": "^1.12.2",
34
- "bip32-path": "0.4.2",
35
- "coininfo": "5.1.0",
36
+ "bip32-path": "^0.4.2",
37
+ "coininfo": "^5.1.0",
36
38
  "create-hash": "^1.2.0",
37
39
  "lodash": "^4.17.21",
38
40
  "minimalistic-assert": "^1.0.1",
39
41
  "ms": "^2.1.3",
40
- "tiny-secp256k1": "1.1.3"
42
+ "tiny-secp256k1": "^1.1.3"
41
43
  },
42
44
  "devDependencies": {
43
45
  "@exodus/assets-testing": "^1.0.0",
@@ -55,5 +57,12 @@
55
57
  "bip39": "^2.6.0",
56
58
  "jest-when": "^3.5.1"
57
59
  },
58
- "gitHead": "c63a283be662247dc12c3b94fced4799937e9fb5"
60
+ "bugs": {
61
+ "url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Abitcoin-plugin"
62
+ },
63
+ "repository": {
64
+ "type": "git",
65
+ "url": "git+https://github.com/ExodusMovement/assets.git"
66
+ },
67
+ "gitHead": "b7cc185dce729a04f48833e29c606eeb7b24407b"
59
68
  }
@@ -49,8 +49,8 @@ export const getSupportedPurposes = ({ compatibilityMode, isMultisig, walletAcco
49
49
  }
50
50
 
51
51
  export const createGetSupportedPurposes = ({ omitPurposes = [] } = {}) => {
52
- return ({ compatibilityMode, walletAccount }) => {
53
- const purposes = getSupportedPurposes({ compatibilityMode, walletAccount })
52
+ return ({ compatibilityMode, walletAccount, isMultisig }) => {
53
+ const purposes = getSupportedPurposes({ compatibilityMode, walletAccount, isMultisig })
54
54
  return without(purposes, ...omitPurposes)
55
55
  }
56
56
  }
@@ -18,7 +18,6 @@ import {
18
18
  InsightAPIClient,
19
19
  isValidInscription,
20
20
  moveFundsFactory,
21
- parseUnsignedTx,
22
21
  signTxFactory,
23
22
  signHardwareFactory,
24
23
  signMessage,
@@ -343,8 +342,6 @@ export const createBitcoinAssetFactory =
343
342
  getSupportedPurposes: createGetSupportedPurposes({ omitPurposes: omitSupportedPurposes }),
344
343
  hasFeature: (feature) => !!features[feature], // @deprecated use api.features instead
345
344
  createAccountState: () => accountStateClass,
346
- parseUnsignedTx,
347
- signUnsignedTx: (unsignedTx, privateKey, opts) => signTx({ unsignedTx, privateKey, ...opts }), // legacy
348
345
  sendTx,
349
346
  signTx,
350
347
  signHardware,
@@ -2,18 +2,12 @@ import assert from 'minimalistic-assert'
2
2
  import * as bitcoinjsLib from '@exodus/bitcoinjs-lib'
3
3
  import { TextEncoder } from '@exodus/text-encoding-utf8'
4
4
  import { randomBytes } from '@exodus/crypto/randomBytes'
5
- import secp256k1 from 'tiny-secp256k1'
5
+ import * as secp256k1 from 'tiny-secp256k1'
6
6
  import { DEFAULT_BRC20_POSTAGE, DEFAULT_ORDINAL_POSTAGE } from './ordinals-constants'
7
7
 
8
8
  import { witnessStackToScriptWitness } from '@exodus/bitcoinjs-lib/src/psbt/psbtutils'
9
9
  import { getTxSequence } from '@exodus/bitcoin-lib'
10
- import {
11
- eccFactory,
12
- getECPair,
13
- getOrdinalsUtxos,
14
- toAsyncSigner,
15
- toXOnly,
16
- } from '@exodus/bitcoin-api'
10
+ import { ecc, getECPair, getOrdinalsUtxos, toAsyncSigner, toXOnly } from '@exodus/bitcoin-api'
17
11
 
18
12
  const encoder = new TextEncoder()
19
13
  export function createInscriptionScript({ xOnlyPublicKey, inscription }) {
@@ -38,7 +32,6 @@ export function createInscriptionScript({ xOnlyPublicKey, inscription }) {
38
32
  }
39
33
 
40
34
  export const inscriptionsServiceFactory = ({ network, ordinalChainIndex }) => {
41
- const ecc = eccFactory()
42
35
  assert(network, 'network is required')
43
36
  assert(typeof ordinalChainIndex === 'number', 'ordinalChainIndex must be a number')
44
37