@exodus/bitcoin-plugin 1.6.4 → 1.6.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-plugin",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"description": "Exodus bitcoin-plugin",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -20,12 +20,11 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@exodus/asset-lib": "^4.0.0",
|
|
22
22
|
"@exodus/basic-utils": "^2.1.0",
|
|
23
|
-
"@exodus/bitcoin-api": "^2.6.
|
|
23
|
+
"@exodus/bitcoin-api": "^2.6.5",
|
|
24
24
|
"@exodus/bitcoin-lib": "^2.2.11",
|
|
25
25
|
"@exodus/models": "^11.0.0",
|
|
26
26
|
"@exodus/text-encoding-utf8": "^1.0.2",
|
|
27
|
-
"bitcoinjs-lib": "^6.1.5",
|
|
28
27
|
"minimalistic-assert": "^1.0.1"
|
|
29
28
|
},
|
|
30
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "c8877a87f29d0c4c27b18937a9ec57c81be223dd"
|
|
31
30
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _coinInfo from 'coininfo'
|
|
2
|
-
import * as bitcoinjsLib from 'bitcoinjs-lib'
|
|
2
|
+
import * as bitcoinjsLib from '@exodus/bitcoinjs-lib'
|
|
3
3
|
import createGetKeyIdentifier from '@exodus/bitcoin-lib/lib/key-identifier'
|
|
4
4
|
|
|
5
5
|
import bip44Constants from '@exodus/bip44-constants/by-ticker'
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import assert from 'minimalistic-assert'
|
|
2
|
-
import * as bitcoinjsLib from 'bitcoinjs-lib'
|
|
2
|
+
import * as bitcoinjsLib from '@exodus/bitcoinjs-lib'
|
|
3
3
|
import { TextEncoder } from '@exodus/text-encoding-utf8'
|
|
4
|
-
import ECPairFactory from 'ecpair'
|
|
5
4
|
import { randomBytes } from '@exodus/crypto/randomBytes'
|
|
6
5
|
import secp256k1 from 'tiny-secp256k1'
|
|
7
6
|
import { DEFAULT_BRC20_POSTAGE, DEFAULT_ORDINAL_POSTAGE } from './ordinals-constants'
|
|
8
7
|
|
|
9
|
-
import { witnessStackToScriptWitness } from 'bitcoinjs-lib/src/psbt/psbtutils'
|
|
8
|
+
import { witnessStackToScriptWitness } from '@exodus/bitcoinjs-lib/src/psbt/psbtutils'
|
|
10
9
|
import getTxSequence from '@exodus/bitcoin-lib/lib/utils/get-tx-sequence'
|
|
11
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
eccFactory,
|
|
12
|
+
getECPair,
|
|
13
|
+
getOrdinalsUtxos,
|
|
14
|
+
toAsyncSigner,
|
|
15
|
+
toXOnly,
|
|
16
|
+
} from '@exodus/bitcoin-api'
|
|
12
17
|
|
|
13
18
|
const encoder = new TextEncoder()
|
|
14
19
|
export function createInscriptionScript({ xOnlyPublicKey, inscription }) {
|
|
@@ -37,8 +42,6 @@ export const inscriptionsServiceFactory = ({ network, ordinalChainIndex }) => {
|
|
|
37
42
|
assert(network, 'network is required')
|
|
38
43
|
assert(typeof ordinalChainIndex === 'number', 'ordinalChainIndex must be a number')
|
|
39
44
|
|
|
40
|
-
let ECPair
|
|
41
|
-
|
|
42
45
|
function createInscription({ contentType, content, postage }) {
|
|
43
46
|
assert(Number.isSafeInteger(postage), 'postage must be a Safe integer')
|
|
44
47
|
assert(contentType, 'contentType is required integer')
|
|
@@ -208,7 +211,7 @@ export const inscriptionsServiceFactory = ({ network, ordinalChainIndex }) => {
|
|
|
208
211
|
...commitTxData,
|
|
209
212
|
})
|
|
210
213
|
|
|
211
|
-
ECPair =
|
|
214
|
+
const ECPair = getECPair()
|
|
212
215
|
|
|
213
216
|
const keypair = ECPair.fromPrivateKey(privateKey, { network })
|
|
214
217
|
|