@exodus/bitcoin-plugin 1.28.0 → 1.29.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 CHANGED
@@ -3,6 +3,23 @@
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
+ ## [1.29.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.28.0...@exodus/bitcoin-plugin@1.29.0) (2024-10-17)
7
+
8
+
9
+ ### Features
10
+
11
+ * **bitcoin-api:** switch from ecpair to plain keys ([#4043](https://github.com/ExodusMovement/assets/issues/4043)) ([dac115d](https://github.com/ExodusMovement/assets/commit/dac115daadbb2e2f8933eef152ba3c3c0a5f9fce))
12
+ * **bitcoin-plugin:** switch to exodus/crypto for secp256k1 ([#4073](https://github.com/ExodusMovement/assets/issues/4073)) ([73f2e19](https://github.com/ExodusMovement/assets/commit/73f2e19dcb055527c410c705558b04f090947d1a))
13
+ * btc-like unconfirmed received ([#4277](https://github.com/ExodusMovement/assets/issues/4277)) ([70d4b73](https://github.com/ExodusMovement/assets/commit/70d4b73811acd87265ad2c1fcf984afb5a89df73))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * reduce max pubkeys for multisig to 16 ([#4108](https://github.com/ExodusMovement/assets/issues/4108)) ([8c4c33b](https://github.com/ExodusMovement/assets/commit/8c4c33b08c5dc0786d601887e08b413a780b32a7))
19
+ * remove stray direct dependencies ([#4176](https://github.com/ExodusMovement/assets/issues/4176)) ([c4f93fa](https://github.com/ExodusMovement/assets/commit/c4f93fad5a930b40d326d7add1093b2d4f243f2a))
20
+
21
+
22
+
6
23
  ## [1.28.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.27.0...@exodus/bitcoin-plugin@1.28.0) (2024-09-25)
7
24
 
8
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "1.28.0",
3
+ "version": "1.29.0",
4
4
  "description": "Exodus bitcoin-plugin",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -22,14 +22,12 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@exodus/asset-lib": "^5.0.0",
25
- "@exodus/bip32": "^3.1.0",
26
25
  "@exodus/bip44-constants": "^195.0.0",
27
- "@exodus/bitcoin-api": "^2.25.0",
26
+ "@exodus/bitcoin-api": "^2.27.0",
28
27
  "@exodus/bitcoin-lib": "^2.4.2",
29
28
  "@exodus/bitcoin-meta": "^2.0.0",
30
- "@exodus/bitcoinerlab-secp256k1": "^1.0.5-exodus.1",
31
29
  "@exodus/bitcoinjs": "^1.1.0",
32
- "@exodus/crypto": "^1.0.0-rc.1",
30
+ "@exodus/crypto": "^1.0.0-rc.13",
33
31
  "@exodus/fetch": "^1.3.0",
34
32
  "@exodus/models": "^12.0.1",
35
33
  "@exodus/text-encoding-utf8": "^1.0.2",
@@ -41,14 +39,13 @@
41
39
  },
42
40
  "devDependencies": {
43
41
  "@exodus/assets-testing": "^1.0.0",
44
- "@exodus/bitcoin-meta": "^2.0.0",
42
+ "@exodus/bip32": "^3.3.0",
45
43
  "@exodus/bitcoinregtest-meta": "^2.0.0",
46
44
  "@exodus/bitcointestnet-meta": "^2.0.0",
47
45
  "@exodus/currency": "^5.0.2",
48
- "@exodus/hdkey": "^2.1.0-exodus.0",
49
- "@exodus/key-identifier": "^1.1.1",
50
- "@exodus/key-utils": "^3.2.1",
51
- "@exodus/keychain": "^6.4.0",
46
+ "@exodus/key-identifier": "^1.3.0",
47
+ "@exodus/key-utils": "^3.7.0",
48
+ "@exodus/keychain": "^7.3.0",
52
49
  "@exodus/tx-signer": "^2.3.1",
53
50
  "@scure/btc-signer": "^1.1.0",
54
51
  "bip39": "^2.6.0",
@@ -61,5 +58,5 @@
61
58
  "type": "git",
62
59
  "url": "git+https://github.com/ExodusMovement/assets.git"
63
60
  },
64
- "gitHead": "823ab98b35624d4cc58dc75fa5d081e09fdc1ee6"
61
+ "gitHead": "3218754fdfad087b6d789eb81f7fe9f21b636fef"
65
62
  }
@@ -1,8 +1,8 @@
1
1
  import { getOrdinalsUtxos, toAsyncSigner } from '@exodus/bitcoin-api'
2
2
  import { getTxSequence } from '@exodus/bitcoin-lib'
3
- import ecc from '@exodus/bitcoinerlab-secp256k1'
4
3
  import * as bitcoinjsLib from '@exodus/bitcoinjs'
5
4
  import { randomBytes } from '@exodus/crypto/randomBytes'
5
+ import { privateKeyToPublicKey, publicKeyToX } from '@exodus/crypto/secp256k1'
6
6
  import { TextEncoder } from '@exodus/text-encoding-utf8'
7
7
  import assert from 'minimalistic-assert'
8
8
 
@@ -83,7 +83,7 @@ export const inscriptionsServiceFactory = ({ network, ordinalChainIndex }) => {
83
83
  function createCommitTxData({ publicKey, inscription }) {
84
84
  assert(publicKey, 'encodePublic is required')
85
85
  assert(inscription, 'inscription is required')
86
- const xOnlyPublicKey = ecc.xOnlyPointFromPoint(publicKey)
86
+ const xOnlyPublicKey = publicKeyToX({ publicKey, format: 'buffer' })
87
87
  const script = createInscriptionScript({ xOnlyPublicKey, inscription })
88
88
 
89
89
  const outputScript = bitcoinjsLib.script.compile(script)
@@ -205,9 +205,7 @@ export const inscriptionsServiceFactory = ({ network, ordinalChainIndex }) => {
205
205
  ...commitTxData,
206
206
  })
207
207
 
208
- const keypair = bitcoinjsLib.ECPair.fromPrivateKey(privateKey, { network })
209
-
210
- await psbt.signInputAsync(0, toAsyncSigner({ keyPair: keypair, ecc }))
208
+ await psbt.signInputAsync(0, toAsyncSigner({ privateKey }))
211
209
 
212
210
  const signature = psbt.data.inputs[0].tapScriptSig[0].signature.toString('hex')
213
211
 
@@ -277,7 +275,7 @@ export const inscriptionsServiceFactory = ({ network, ordinalChainIndex }) => {
277
275
 
278
276
  const postage = inscription.postage
279
277
 
280
- const publicKey = Buffer.from(ecc.pointFromScalar(privateKey, false))
278
+ const publicKey = privateKeyToPublicKey({ privateKey, compressed: false, format: 'buffer' })
281
279
  const commitTxData = createCommitTxData({ publicKey, inscription })
282
280
 
283
281
  const feeData = await assetClientInterface.getFeeConfig({ assetName })