@exodus/bip322-js 2.1.0 → 2.2.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 +6 -0
- package/dist/Signer.js +3 -1
- package/package.json +12 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/bip322-js@2.1.0...@exodus/bip322-js@2.2.0) (2025-09-09)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- feat: do not use ECPair from bitcoinjs (#13791)
|
|
11
|
+
|
|
6
12
|
## [2.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/bip322-js@2.0.2...@exodus/bip322-js@2.1.0) (2025-04-01)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/dist/Signer.js
CHANGED
|
@@ -2,7 +2,10 @@ import Address from './Address.js';
|
|
|
2
2
|
import BIP322 from './BIP322.js';
|
|
3
3
|
import * as bitcoin from '@exodus/bitcoinjs';
|
|
4
4
|
import * as bitcoinMessage from '@exodus/bitcoinjs/message';
|
|
5
|
+
import { tiny_secp256k1_compat as ecc } from '@exodus/crypto/secp256k1';
|
|
6
|
+
import { ECPairFactory } from 'ecpair';
|
|
5
7
|
import assert from 'minimalistic-assert';
|
|
8
|
+
const ECPair = ECPairFactory(ecc);
|
|
6
9
|
const createAsyncSigner = ({ signer, publicKey, tweak }) => {
|
|
7
10
|
return {
|
|
8
11
|
publicKey,
|
|
@@ -17,7 +20,6 @@ const createAsyncSigner = ({ signer, publicKey, tweak }) => {
|
|
|
17
20
|
};
|
|
18
21
|
class Signer {
|
|
19
22
|
static sign(privateKeyOrWIF, address, message, network = bitcoin.networks.bitcoin) {
|
|
20
|
-
const ECPair = bitcoin.ECPair;
|
|
21
23
|
let signer = Buffer.isBuffer(privateKeyOrWIF)
|
|
22
24
|
? ECPair.fromPrivateKey(privateKeyOrWIF)
|
|
23
25
|
: ECPair.fromWIF(privateKeyOrWIF, network);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bip322-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A Javascript library that provides utility functions related to the BIP-322 signature scheme",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
|
-
"CHANGELOG.md"
|
|
13
|
+
"CHANGELOG.md",
|
|
14
|
+
"!**/__tests__/**"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
16
|
-
"build": "tsc
|
|
17
|
+
"build": "run -T tsc -p tsconfig.build.json",
|
|
17
18
|
"lint": "run -T eslint",
|
|
18
19
|
"lint:fix": "yarn lint --fix",
|
|
19
20
|
"doc": "typedoc src/index.ts",
|
|
20
|
-
"prepack": "npm run build",
|
|
21
21
|
"test": "run -T exodus-test --jest --esbuild",
|
|
22
22
|
"prepublishOnly": "yarn run -T build --scope @exodus/bip322-js"
|
|
23
23
|
},
|
|
@@ -35,23 +35,26 @@
|
|
|
35
35
|
},
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@exodus/secp256k1": "^4.0.2-exodus.0",
|
|
38
|
+
"@noble/secp256k1": "^1.7.1",
|
|
40
39
|
"@types/minimalistic-assert": "^1.0.1",
|
|
41
40
|
"@types/node": "^20.2.5",
|
|
42
|
-
"
|
|
41
|
+
"bech32": "^1.1.3",
|
|
42
|
+
"bs58check": "^3.0.1",
|
|
43
|
+
"buffer-equals": "^1.0.3",
|
|
43
44
|
"typedoc": "^0.24.8",
|
|
44
|
-
"typescript": "^5.1.3"
|
|
45
|
+
"typescript": "^5.1.3",
|
|
46
|
+
"varuint-bitcoin": "^1.0.1"
|
|
45
47
|
},
|
|
46
48
|
"dependencies": {
|
|
47
49
|
"@exodus/asset-types": "^0.3.0",
|
|
48
50
|
"@exodus/bitcoinjs": "^1.4.0",
|
|
49
51
|
"@exodus/crypto": "^1.0.0-rc.14",
|
|
52
|
+
"ecpair": "^2.0.1",
|
|
50
53
|
"minimalistic-assert": "^1.0.1"
|
|
51
54
|
},
|
|
52
55
|
"homepage": "https://github.com/ExodusMovement/exodus-hydra/tree/master/libraries/bip322-js",
|
|
53
56
|
"bugs": {
|
|
54
57
|
"url": "https://github.com/ExodusMovement/exodus-hydra/issues?q=is%3Aissue+is%3Aopen+label%3Abip322-js"
|
|
55
58
|
},
|
|
56
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "90ec3f786bb430800fae41568e71ec2b67cd9009"
|
|
57
60
|
}
|