@exodus/bitcoin-api 2.18.3 → 2.18.4
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,15 @@
|
|
|
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.18.4](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.18.3...@exodus/bitcoin-api@2.18.4) (2024-06-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* bitcoinjs-lib bump, ecc cleanup ([#2634](https://github.com/ExodusMovement/assets/issues/2634)) ([96d47a5](https://github.com/ExodusMovement/assets/commit/96d47a508657389ba766bfd44feef7365eb0de9b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [2.18.3](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-api@2.18.2...@exodus/bitcoin-api@2.18.3) (2024-06-20)
|
|
7
16
|
|
|
8
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-api",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.4",
|
|
4
4
|
"description": "Exodus bitcoin-api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"@exodus/bip322-js": "^1.1.0-exodus.4",
|
|
25
25
|
"@exodus/bip44-constants": "^195.0.0",
|
|
26
26
|
"@exodus/bitcoin-lib": "^2.4.1",
|
|
27
|
-
"@exodus/
|
|
28
|
-
"@exodus/bitcoinjs-lib": "^6.1.5-exodus.1",
|
|
27
|
+
"@exodus/bitcoinjs-lib": "^6.1.5-exodus.2",
|
|
29
28
|
"@exodus/currency": "^2.3.2",
|
|
30
29
|
"@exodus/fetch": "^1.3.0",
|
|
31
30
|
"@exodus/key-identifier": "^1.1.1",
|
|
@@ -67,5 +66,5 @@
|
|
|
67
66
|
"type": "git",
|
|
68
67
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
69
68
|
},
|
|
70
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "b7cc185dce729a04f48833e29c606eeb7b24407b"
|
|
71
70
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import ECPairFactory from 'ecpair'
|
|
2
|
-
import {
|
|
2
|
+
import { ecc } from './ecc'
|
|
3
3
|
|
|
4
4
|
let ECPair
|
|
5
5
|
|
|
6
6
|
export const getECPair = () => {
|
|
7
|
-
ECPair = ECPair || ECPairFactory(
|
|
7
|
+
ECPair = ECPair || ECPairFactory(ecc)
|
|
8
8
|
return ECPair
|
|
9
9
|
}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import bitcoinerlab from '@exodus/bitcoinerlab-secp256k1'
|
|
4
|
-
|
|
5
|
-
export const ecc = bitcoinerlab
|
|
6
|
-
|
|
7
|
-
initEccLib(ecc)
|
|
1
|
+
import { eccLib } from '@exodus/bitcoinjs-lib'
|
|
8
2
|
|
|
3
|
+
export const ecc = eccLib
|
|
9
4
|
export const eccFactory = () => ecc
|
package/src/btc-like-keys.js
CHANGED
|
@@ -7,7 +7,7 @@ import * as defaultBitcoinjsLib from '@exodus/bitcoinjs-lib'
|
|
|
7
7
|
import * as secp256k1 from 'secp256k1'
|
|
8
8
|
import { hash160 } from './hash-utils'
|
|
9
9
|
import { toXOnly } from './bitcoinjs-lib/ecc-utils'
|
|
10
|
-
import {
|
|
10
|
+
import { ecc } from './bitcoinjs-lib/ecc'
|
|
11
11
|
|
|
12
12
|
export const publicKeyToHashFactory = (p2pkh) => (publicKey) => {
|
|
13
13
|
const payload = Buffer.concat([Buffer.from([p2pkh]), hash160(publicKey)])
|
|
@@ -23,7 +23,6 @@ export const createBtcLikeKeys = ({
|
|
|
23
23
|
}) => {
|
|
24
24
|
assert(coinInfo, 'coinInfo is required')
|
|
25
25
|
assert(versions, 'versions is required')
|
|
26
|
-
const ecc = eccFactory()
|
|
27
26
|
const {
|
|
28
27
|
encodePrivate: encodePrivateCustom,
|
|
29
28
|
encodePublic: encodePublicCustom,
|
package/src/multisig-address.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as defaultBitcoinjsLib from '@exodus/bitcoinjs-lib'
|
|
2
2
|
import { toXOnly } from './bitcoinjs-lib/ecc-utils'
|
|
3
|
-
import {
|
|
3
|
+
import { ecc as defaultEcc } from './bitcoinjs-lib/ecc'
|
|
4
4
|
|
|
5
5
|
// Key to use when key path spending is disabled https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#constructing-and-spending-taproot-outputs
|
|
6
6
|
const DUMMY_TAPROOT_PUBKEY = Buffer.from(
|
|
@@ -18,7 +18,7 @@ export const createEncodeMultisigContract =
|
|
|
18
18
|
({
|
|
19
19
|
bitcoinjsLib = defaultBitcoinjsLib,
|
|
20
20
|
network = bitcoinjsLib.Network.bitcoin,
|
|
21
|
-
ecc =
|
|
21
|
+
ecc = defaultEcc,
|
|
22
22
|
}) =>
|
|
23
23
|
(publicKeys, { threshold = publicKeys.length, version = 0 } = Object.create(null)) => {
|
|
24
24
|
if (
|
package/src/tx-sign/taproot.js
CHANGED
|
@@ -2,10 +2,9 @@ import { crypto } from '@exodus/bitcoinjs-lib'
|
|
|
2
2
|
import assert from 'minimalistic-assert'
|
|
3
3
|
|
|
4
4
|
import { getSchnorrEntropy } from './default-entropy'
|
|
5
|
-
import {
|
|
5
|
+
import { ecc } from '../bitcoinjs-lib/ecc'
|
|
6
6
|
import { getECPair } from '../bitcoinjs-lib'
|
|
7
7
|
|
|
8
|
-
const ecc = eccFactory()
|
|
9
8
|
const ECPair = getECPair()
|
|
10
9
|
|
|
11
10
|
function tweakSigner({ signer, tweakHash, network }) {
|