@exodus/bitcoin-api 2.16.0 → 2.17.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
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
## [2.17.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.17.0...@exodus/bitcoin-api@2.17.1) (2024-06-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* support signing taproot scripts from xverse payment addresses ([#2548](https://github.com/ExodusMovement/assets/issues/2548)) ([0597ba2](https://github.com/ExodusMovement/assets/commit/0597ba27a83071a8a0be41d44d8c0ca32cc5e6f6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [2.17.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.16.0...@exodus/bitcoin-api@2.17.0) (2024-06-12)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* allow signSchnorr for non-taproot ([#2545](https://github.com/ExodusMovement/assets/issues/2545)) ([5f459fd](https://github.com/ExodusMovement/assets/commit/5f459fd89e571a8e880a52dda93e8a7ead0012a5))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [2.16.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.15.1...@exodus/bitcoin-api@2.16.0) (2024-05-28)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* allow address mocking in bitcoin monitor ([#2347](https://github.com/ExodusMovement/assets/issues/2347)) ([e11800d](https://github.com/ExodusMovement/assets/commit/e11800d2e8592580f837b4b272e44238230e8709))
|
|
30
|
+
* use asset config to override gap limit ([#2410](https://github.com/ExodusMovement/assets/issues/2410)) ([47f2840](https://github.com/ExodusMovement/assets/commit/47f2840e51c4f157a5bdbb72fce9423c2b733660))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [2.15.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.15.0...@exodus/bitcoin-api@2.15.1) (2024-05-22)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* async signing of bitcoin transaction ([#2343](https://github.com/ExodusMovement/assets/issues/2343)) ([6924e83](https://github.com/ExodusMovement/assets/commit/6924e832090737abce600393129e7e5b4f278f40))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## [2.15.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.14.1...@exodus/bitcoin-api@2.15.0) (2024-05-10)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Features
|
|
47
|
+
|
|
48
|
+
* 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)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## [2.14.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.14.0...@exodus/bitcoin-api@2.14.1) (2024-05-09)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Bug Fixes
|
|
56
|
+
|
|
57
|
+
* brc20 fee estimation ([#2229](https://github.com/ExodusMovement/assets/issues/2229)) ([191c997](https://github.com/ExodusMovement/assets/commit/191c997dcd39fea82d4d79780eff200d8d81bc10))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## [2.14.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.13.0...@exodus/bitcoin-api@2.14.0) (2024-05-07)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Features
|
|
65
|
+
|
|
66
|
+
* **bitcoin-plugin:** add `web3.simulateTransaction` API ([#2220](https://github.com/ExodusMovement/assets/issues/2220)) ([a3f66bb](https://github.com/ExodusMovement/assets/commit/a3f66bb4e1ee2565a5cdf370de22577521944403))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## [2.13.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.12.1...@exodus/bitcoin-api@2.13.0) (2024-04-25)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### Features
|
|
74
|
+
|
|
75
|
+
* **bitcoin:** taproot multisig address creation and signing ([#2132](https://github.com/ExodusMovement/assets/issues/2132)) ([179a6e4](https://github.com/ExodusMovement/assets/commit/179a6e4fc875cfe1e616dcc67478ae473706e7c1))
|
|
76
|
+
* replace custom ecc with bitcoinerlab fork ([#1926](https://github.com/ExodusMovement/assets/issues/1926)) ([312374f](https://github.com/ExodusMovement/assets/commit/312374f350cabd46e460d5fa1790ee83b4b8d38b))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## [2.12.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.12.0...@exodus/bitcoin-api@2.12.1) (2024-04-22)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Bug Fixes
|
|
84
|
+
|
|
85
|
+
* bitcoin ordinals and brc20 fee calculation ([#2130](https://github.com/ExodusMovement/assets/issues/2130)) ([f43e7d3](https://github.com/ExodusMovement/assets/commit/f43e7d35030b8e093b8f9247b469377d53bc9ca8))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## [2.12.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.10.1...@exodus/bitcoin-api@2.12.0) (2024-04-16)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Features
|
|
93
|
+
|
|
94
|
+
* 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))
|
|
95
|
+
* **bitcoin:** add `asset.api.signMessage` ([#1993](https://github.com/ExodusMovement/assets/issues/1993)) ([a3c53c8](https://github.com/ExodusMovement/assets/commit/a3c53c808bc68c524122e88c433083ccbb8691c2))
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Bug Fixes
|
|
99
|
+
|
|
100
|
+
* add exodus user agent to headers in bitcoin websocket ([#1996](https://github.com/ExodusMovement/assets/issues/1996)) ([d553881](https://github.com/ExodusMovement/assets/commit/d553881a572847c787025d9ce92c73e52128e6a3))
|
|
101
|
+
* btc send refactoring missing params ([#2063](https://github.com/ExodusMovement/assets/issues/2063)) ([9d2ea7f](https://github.com/ExodusMovement/assets/commit/9d2ea7fcf6d322a121c83e4aed863eb13f89faa9))
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
## [2.11.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.10.1...@exodus/bitcoin-api@2.11.0) (2024-04-15)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Features
|
|
109
|
+
|
|
110
|
+
* 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))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Bug Fixes
|
|
114
|
+
|
|
115
|
+
* add exodus user agent to headers in bitcoin websocket ([#1996](https://github.com/ExodusMovement/assets/issues/1996)) ([d553881](https://github.com/ExodusMovement/assets/commit/d553881a572847c787025d9ce92c73e52128e6a3))
|
|
116
|
+
* btc send refactoring missing params ([#2063](https://github.com/ExodusMovement/assets/issues/2063)) ([9d2ea7f](https://github.com/ExodusMovement/assets/commit/9d2ea7fcf6d322a121c83e4aed863eb13f89faa9))
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## [2.10.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.10.0...@exodus/bitcoin-api@2.10.1) (2024-04-01)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Bug Fixes
|
|
124
|
+
|
|
125
|
+
* doge number unit private access ([#1929](https://github.com/ExodusMovement/assets/issues/1929)) ([9ebb009](https://github.com/ExodusMovement/assets/commit/9ebb009fd730659a14877dd3f7af709868e7bdac))
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## [2.10.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.9.6...@exodus/bitcoin-api@2.10.0) (2024-03-28)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Features
|
|
133
|
+
|
|
134
|
+
* **bitcoin:** Port priority fee sorting ([#1885](https://github.com/ExodusMovement/assets/issues/1885)) ([e217547](https://github.com/ExodusMovement/assets/commit/e217547b0b4dbc92bf3e908acd42a6f26d4be1c6))
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### Bug Fixes
|
|
138
|
+
|
|
139
|
+
* Revert "fix: @noble/secp256k1 to use @noble/hashes ([#1850](https://github.com/ExodusMovement/assets/issues/1850))" ([#1915](https://github.com/ExodusMovement/assets/issues/1915)) ([a2d89ad](https://github.com/ExodusMovement/assets/commit/a2d89ad7892c33382c3754fe8a8eab247d311fb1))
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
## [2.9.6](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.9.5...@exodus/bitcoin-api@2.9.6) (2024-03-22)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
### Bug Fixes
|
|
147
|
+
|
|
148
|
+
* @noble/secp256k1 to use @noble/hashes ([#1850](https://github.com/ExodusMovement/assets/issues/1850)) ([c7d64be](https://github.com/ExodusMovement/assets/commit/c7d64be1a3aca822d039572c9b89068777758643))
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## [2.9.5](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.9.3...@exodus/bitcoin-api@2.9.5) (2024-03-18)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### Performance Improvements
|
|
156
|
+
|
|
157
|
+
* remove bip-schnorr custom implementation ([#1783](https://github.com/ExodusMovement/assets/issues/1783)) ([f07a177](https://github.com/ExodusMovement/assets/commit/f07a17740cf21b0945dd487ad37ee76c9a0ac2ac))
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
## [2.9.4](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.9.3...@exodus/bitcoin-api@2.9.4) (2024-03-18)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Performance Improvements
|
|
164
|
+
|
|
165
|
+
* bitcoin unfork bitcoinjs and bolt11 dependencies ([#1730](https://github.com/ExodusMovement/assets/issues/1730)) ([94fd0b9](https://github.com/ExodusMovement/assets/commit/94fd0b94fab17a7876dac7fdf0b708bcda115403))
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
## [2.9.3](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.9.2...@exodus/bitcoin-api@2.9.3) (2024-02-28)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
### Bug Fixes
|
|
175
|
+
|
|
176
|
+
* do not expose bitcoin private key in error message ([#1596](https://github.com/ExodusMovement/assets/issues/1596)) ([ea247b4](https://github.com/ExodusMovement/assets/commit/ea247b4295b9f96e379406c7574245a9934fd1b1))
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### Reverts
|
|
180
|
+
|
|
181
|
+
* Revert "Publish" ([adb8015](https://github.com/ExodusMovement/assets/commit/adb8015efd51a4fa36ad0c86c28cb2d94c52a578))
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.17.1",
|
|
4
4
|
"description": "Exodus bitcoin-api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
8
|
+
"CHANGELOG.md",
|
|
8
9
|
"!src/**/__tests__"
|
|
9
10
|
],
|
|
10
|
-
"author": "Exodus",
|
|
11
|
+
"author": "Exodus Movement, Inc.",
|
|
11
12
|
"license": "ISC",
|
|
12
13
|
"publishConfig": {
|
|
13
14
|
"access": "restricted"
|
|
14
15
|
},
|
|
15
16
|
"scripts": {
|
|
16
17
|
"test": "run -T jest",
|
|
17
|
-
"lint": "run -T eslint
|
|
18
|
+
"lint": "run -T eslint .",
|
|
18
19
|
"lint:fix": "yarn lint --fix"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
@@ -22,30 +23,30 @@
|
|
|
22
23
|
"@exodus/basic-utils": "^2.1.0",
|
|
23
24
|
"@exodus/bip322-js": "^1.1.0-exodus.4",
|
|
24
25
|
"@exodus/bip44-constants": "^195.0.0",
|
|
25
|
-
"@exodus/bitcoin-lib": "2.3.0",
|
|
26
|
+
"@exodus/bitcoin-lib": "^2.3.0",
|
|
26
27
|
"@exodus/bitcoinerlab-secp256k1": "^1.0.5-exodus.1",
|
|
27
28
|
"@exodus/bitcoinjs-lib": "^6.1.5-exodus.1",
|
|
28
29
|
"@exodus/currency": "^2.3.2",
|
|
29
30
|
"@exodus/fetch": "^1.3.0",
|
|
30
31
|
"@exodus/key-identifier": "^1.1.1",
|
|
31
32
|
"@exodus/models": "^11.0.0",
|
|
32
|
-
"@exodus/simple-retry": "0.0.6",
|
|
33
|
+
"@exodus/simple-retry": "^0.0.6",
|
|
33
34
|
"@exodus/timer": "^1.0.0",
|
|
34
35
|
"bech32": "^1.1.3",
|
|
35
36
|
"bip32-path": "^0.4.2",
|
|
36
|
-
"bn.js": "4.12.0",
|
|
37
|
+
"bn.js": "^4.12.0",
|
|
37
38
|
"bs58check": "^2.1.2",
|
|
38
|
-
"coininfo": "5.1.0",
|
|
39
|
+
"coininfo": "^5.1.0",
|
|
39
40
|
"create-hash": "^1.2.0",
|
|
40
|
-
"delay": "4.0.1",
|
|
41
|
-
"ecpair": "2.0.1",
|
|
41
|
+
"delay": "^4.0.1",
|
|
42
|
+
"ecpair": "^2.0.1",
|
|
42
43
|
"lodash": "^4.17.21",
|
|
43
44
|
"minimalistic-assert": "^1.0.1",
|
|
44
45
|
"ms": "^2.1.1",
|
|
45
46
|
"secp256k1": "^3.0.1",
|
|
46
|
-
"socket.io-client": "2.1.1",
|
|
47
|
-
"tiny-secp256k1": "1.1.3",
|
|
48
|
-
"url-join": "4.0.0",
|
|
47
|
+
"socket.io-client": "^2.1.1",
|
|
48
|
+
"tiny-secp256k1": "^1.1.3",
|
|
49
|
+
"url-join": "^4.0.0",
|
|
49
50
|
"varuint-bitcoin": "^1.1.0",
|
|
50
51
|
"wif": "^2.0.6"
|
|
51
52
|
},
|
|
@@ -58,5 +59,13 @@
|
|
|
58
59
|
"jest-when": "^3.5.1",
|
|
59
60
|
"safe-buffer": "^5.2.1"
|
|
60
61
|
},
|
|
61
|
-
"
|
|
62
|
+
"bugs": {
|
|
63
|
+
"url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Abitcoin-api"
|
|
64
|
+
},
|
|
65
|
+
"homepage": "https://github.com/ExodusMovement/assets/tree/master/bitcoin/bitcoin-api",
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
69
|
+
},
|
|
70
|
+
"gitHead": "7882251e138663159eff38925571acadbac1a00f"
|
|
62
71
|
}
|
package/src/btc-like-keys.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as bech32 from 'bech32'
|
|
|
4
4
|
import assert from 'minimalistic-assert'
|
|
5
5
|
import { identity, pickBy } from 'lodash'
|
|
6
6
|
import * as defaultBitcoinjsLib from '@exodus/bitcoinjs-lib'
|
|
7
|
-
import secp256k1 from 'secp256k1'
|
|
7
|
+
import * as secp256k1 from 'secp256k1'
|
|
8
8
|
import { hash160 } from './hash-utils'
|
|
9
9
|
import { toXOnly } from './bitcoinjs-lib/ecc-utils'
|
|
10
10
|
import { eccFactory } from './bitcoinjs-lib/ecc'
|
package/src/move-funds.js
CHANGED
|
@@ -2,7 +2,7 @@ import wif from 'wif'
|
|
|
2
2
|
import { UtxoCollection, Address } from '@exodus/models'
|
|
3
3
|
import { createInputs, createOutput, getNonWitnessTxs } from './tx-send'
|
|
4
4
|
import assert from 'minimalistic-assert'
|
|
5
|
-
import secp256k1 from 'secp256k1'
|
|
5
|
+
import * as secp256k1 from 'secp256k1'
|
|
6
6
|
|
|
7
7
|
const isValidPrivateKey = (privateKey) => {
|
|
8
8
|
try {
|
|
@@ -44,8 +44,8 @@ export function createSignWithWallet({
|
|
|
44
44
|
: [sigHash, Transaction.SIGHASH_ALL]
|
|
45
45
|
const { key, purpose, keyId, publicKey } = await getKeyWithMetadata(address)
|
|
46
46
|
|
|
47
|
-
const isP2SH = purpose === 49
|
|
48
47
|
const hasTapLeafScript = input.tapLeafScript && input.tapLeafScript.length > 0
|
|
48
|
+
const isP2SH = purpose === 49 && !hasTapLeafScript
|
|
49
49
|
const isTaprootKeySpend = isTaprootPurpose(purpose) && !hasTapLeafScript
|
|
50
50
|
|
|
51
51
|
if (isP2SH) {
|
package/src/tx-sign/taproot.js
CHANGED
|
@@ -94,10 +94,6 @@ export async function toAsyncBufferSigner({ signer, purpose, keyId, isTaprootKey
|
|
|
94
94
|
return Buffer.from(signature)
|
|
95
95
|
},
|
|
96
96
|
signSchnorr: async (data) => {
|
|
97
|
-
assert(
|
|
98
|
-
isTaprootPurpose(purpose),
|
|
99
|
-
`signSchnorr: invalid purpose for schnorr signing: ${purpose}`
|
|
100
|
-
)
|
|
101
97
|
return signer.sign({
|
|
102
98
|
data,
|
|
103
99
|
keyId,
|