@exodus/bitcoin-plugin 1.22.0 → 1.22.2
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 +19 -0
- package/package.json +4 -4
- package/src/create-asset.js +20 -20
- package/src/index.js +1 -0
- package/src/ordinals/brc-20-balances-and-fee-adapter.js +4 -3
- package/src/ordinals/brc-20-client.js +1 -1
- package/src/ordinals/brc-20-utils.js +1 -1
- package/src/ordinals/create-brc-20-command.js +1 -0
- package/src/ordinals/get-inscription-addresses.js +2 -1
- package/src/ordinals/inscriptions-service.js +6 -6
- package/src/ordinals/nfts.js +3 -2
- package/src/ordinals/reload-brc20-token-balances.js +2 -1
- package/src/web3/createSimulateTransactions.js +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.22.2](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.22.1...@exodus/bitcoin-plugin@1.22.2) (2024-07-31)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* pass compatibility mode to getKeyIdentifier ([#3048](https://github.com/ExodusMovement/assets/issues/3048)) ([61066f9](https://github.com/ExodusMovement/assets/commit/61066f958cafb59ab3b9be9234e9c8360ea51841))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [1.22.1](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.22.0...@exodus/bitcoin-plugin@1.22.1) (2024-07-26)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* btc like lint ([#2978](https://github.com/ExodusMovement/assets/issues/2978)) ([cfb0b91](https://github.com/ExodusMovement/assets/commit/cfb0b914b469728349c39673d268ad58b9f90f6f))
|
|
21
|
+
* disable multi address scanning in `multiAddressMode` is false ([#2984](https://github.com/ExodusMovement/assets/issues/2984)) ([37bab79](https://github.com/ExodusMovement/assets/commit/37bab79ec9bcb8e08850402dd5f71df823eddd3b))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.22.0](https://github.com/ExodusMovement/assets/compare/@exodus/bitcoin-plugin@1.21.1...@exodus/bitcoin-plugin@1.22.0) (2024-07-19)
|
|
7
26
|
|
|
8
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-plugin",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.2",
|
|
4
4
|
"description": "Exodus bitcoin-plugin",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"access": "restricted"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"test": "run -T jest",
|
|
18
|
+
"test": "run -T exodus-test --jest --esbuild",
|
|
19
19
|
"lint": "run -T eslint .",
|
|
20
20
|
"lint:fix": "yarn lint --fix"
|
|
21
21
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@exodus/basic-utils": "^2.1.0",
|
|
25
25
|
"@exodus/bip32": "^3.1.0",
|
|
26
26
|
"@exodus/bip44-constants": "^195.0.0",
|
|
27
|
-
"@exodus/bitcoin-api": "^2.21.
|
|
27
|
+
"@exodus/bitcoin-api": "^2.21.3",
|
|
28
28
|
"@exodus/bitcoin-lib": "^2.4.0",
|
|
29
29
|
"@exodus/bitcoin-meta": "^1.0.2",
|
|
30
30
|
"@exodus/bitcoinjs-lib": "^6.1.5-exodus.2",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"type": "git",
|
|
65
65
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "a9a07ce549e5e911d65a75e2d768a6ff5a1d854e"
|
|
68
68
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import _coinInfo from 'coininfo'
|
|
2
|
-
import * as bitcoinjsLib from '@exodus/bitcoinjs-lib'
|
|
3
|
-
import { createGetKeyIdentifier } from '@exodus/bitcoin-lib'
|
|
4
|
-
import { Tx } from '@exodus/models'
|
|
5
|
-
|
|
6
1
|
import bip44Constants from '@exodus/bip44-constants/by-ticker'
|
|
7
2
|
import {
|
|
8
3
|
createAccountState,
|
|
9
4
|
createAndBroadcastTXFactory,
|
|
10
5
|
createBitcoinMonitor,
|
|
11
|
-
createMagicEdenBitcoinMonitor,
|
|
12
6
|
createBtcLikeAddress,
|
|
13
7
|
createBtcLikeKeys,
|
|
8
|
+
createEncodeMultisigContract,
|
|
9
|
+
createMagicEdenBitcoinMonitor,
|
|
10
|
+
createPrepareForSigning,
|
|
11
|
+
createPsbtToUnsignedTx,
|
|
14
12
|
getAddressesFromPrivateKeyFactory,
|
|
15
13
|
getBalancesFactory,
|
|
16
14
|
getBtcVersions,
|
|
15
|
+
getCreateBatchTransaction,
|
|
17
16
|
getFeeEstimatorFactory,
|
|
18
17
|
GetFeeResolver,
|
|
18
|
+
getPrepareSendTransaction,
|
|
19
19
|
InsightAPIClient,
|
|
20
20
|
isValidInscription,
|
|
21
21
|
moveFundsFactory,
|
|
22
|
-
signTxFactory,
|
|
23
22
|
signHardwareFactory,
|
|
24
23
|
signMessage,
|
|
25
|
-
|
|
26
|
-
getCreateBatchTransaction,
|
|
27
|
-
createEncodeMultisigContract,
|
|
28
|
-
createPrepareForSigning,
|
|
29
|
-
createPsbtToUnsignedTx,
|
|
24
|
+
signTxFactory,
|
|
30
25
|
} from '@exodus/bitcoin-api'
|
|
26
|
+
import { parseCurrency } from '@exodus/bitcoin-api/src/fee/fee-utils'
|
|
27
|
+
import { createGetKeyIdentifier } from '@exodus/bitcoin-lib'
|
|
28
|
+
import * as bitcoinjsLib from '@exodus/bitcoinjs-lib'
|
|
29
|
+
import { Tx } from '@exodus/models'
|
|
30
|
+
import _coinInfo from 'coininfo'
|
|
31
|
+
import assert from 'minimalistic-assert'
|
|
32
|
+
|
|
33
|
+
import { createGetSupportedPurposes, getDefaultAddressPath } from './compatibility-modes'
|
|
31
34
|
import { bitcoinFeeDataFactory } from './fee-data'
|
|
32
35
|
import BitcoinFeeMonitor from './fee-monitor'
|
|
33
|
-
import assert from 'minimalistic-assert'
|
|
34
|
-
import { DEFAULT_ORDINAL_CHAIN_INDEX } from './ordinals/ordinals-constants'
|
|
35
|
-
import { reloadBrc20TokenBalances } from './ordinals/reload-brc20-token-balances'
|
|
36
|
-
import { createTokenFactory } from './ordinals/create-token-factory'
|
|
37
|
-
import { brc20ApiClientFactory, DEFAULT_BRC_20_URL } from './ordinals/brc-20-client'
|
|
38
|
-
import { nftsApiFactory } from './ordinals/nfts'
|
|
39
36
|
import { brc20BalancesAndFeeAdapterFactory } from './ordinals/brc-20-balances-and-fee-adapter'
|
|
40
|
-
import {
|
|
37
|
+
import { brc20ApiClientFactory, DEFAULT_BRC_20_URL } from './ordinals/brc-20-client'
|
|
38
|
+
import { createTokenFactory } from './ordinals/create-token-factory'
|
|
41
39
|
import { inscriptionsServiceFactory } from './ordinals/inscriptions-service'
|
|
40
|
+
import { nftsApiFactory } from './ordinals/nfts'
|
|
41
|
+
import { DEFAULT_ORDINAL_CHAIN_INDEX } from './ordinals/ordinals-constants'
|
|
42
|
+
import { reloadBrc20TokenBalances } from './ordinals/reload-brc20-token-balances'
|
|
42
43
|
import { tickInscriptionIdIndexerFactory } from './ordinals/tick-inscription-id-indexer'
|
|
43
|
-
import { createGetSupportedPurposes, getDefaultAddressPath } from './compatibility-modes'
|
|
44
44
|
import { createWeb3API } from './web3'
|
|
45
45
|
|
|
46
46
|
const DEFAULT_TICKS_BETWEEN_BRC20_FETCHES = 30
|
package/src/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { getOrdinalsUtxos } from '@exodus/bitcoin-api'
|
|
2
2
|
import { BumpType } from '@exodus/bitcoin-lib'
|
|
3
|
+
import { Address, UtxoCollection } from '@exodus/models'
|
|
4
|
+
import assert from 'minimalistic-assert'
|
|
5
|
+
|
|
3
6
|
import { brc20Utils } from './brc-20-utils'
|
|
4
7
|
import { createBrc20Command } from './create-brc-20-command'
|
|
5
|
-
import { Address, UtxoCollection } from '@exodus/models'
|
|
6
|
-
import { getOrdinalsUtxos } from '@exodus/bitcoin-api'
|
|
7
8
|
|
|
8
9
|
export const brc20BalancesAndFeeAdapterFactory = ({
|
|
9
10
|
assetClientInterface,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ecc, getECPair, getOrdinalsUtxos, toAsyncSigner, toXOnly } from '@exodus/bitcoin-api'
|
|
2
|
+
import { getTxSequence } from '@exodus/bitcoin-lib'
|
|
2
3
|
import * as bitcoinjsLib from '@exodus/bitcoinjs-lib'
|
|
3
|
-
import {
|
|
4
|
+
import { witnessStackToScriptWitness } from '@exodus/bitcoinjs-lib/src/psbt/psbtutils'
|
|
4
5
|
import { randomBytes } from '@exodus/crypto/randomBytes'
|
|
6
|
+
import { TextEncoder } from '@exodus/text-encoding-utf8'
|
|
7
|
+
import assert from 'minimalistic-assert'
|
|
5
8
|
import * as secp256k1 from 'tiny-secp256k1'
|
|
6
|
-
import { DEFAULT_BRC20_POSTAGE, DEFAULT_ORDINAL_POSTAGE } from './ordinals-constants'
|
|
7
9
|
|
|
8
|
-
import {
|
|
9
|
-
import { getTxSequence } from '@exodus/bitcoin-lib'
|
|
10
|
-
import { ecc, getECPair, getOrdinalsUtxos, toAsyncSigner, toXOnly } from '@exodus/bitcoin-api'
|
|
10
|
+
import { DEFAULT_BRC20_POSTAGE, DEFAULT_ORDINAL_POSTAGE } from './ordinals-constants'
|
|
11
11
|
|
|
12
12
|
const encoder = new TextEncoder()
|
|
13
13
|
export function createInscriptionScript({ xOnlyPublicKey, inscription }) {
|
package/src/ordinals/nfts.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { getOrdinalAddress, getOrdinalsUtxos, getUtxos, partitionUtxos } from '@exodus/bitcoin-api'
|
|
2
|
+
import { isEqual, uniq } from 'lodash'
|
|
1
3
|
import assert from 'minimalistic-assert'
|
|
4
|
+
|
|
2
5
|
import { getInscriptionAddresses } from './get-inscription-addresses'
|
|
3
6
|
import { isNftBrc20 } from './nft-utils'
|
|
4
|
-
import { getOrdinalAddress, getOrdinalsUtxos, getUtxos, partitionUtxos } from '@exodus/bitcoin-api'
|
|
5
|
-
import { uniq, isEqual } from 'lodash'
|
|
6
7
|
|
|
7
8
|
export const nftsApiFactory = ({ ordinalChainIndex, asset, assetClientInterface: aci }) => {
|
|
8
9
|
assert(asset, 'asset is required')
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { groupBy, mapValues } from 'lodash'
|
|
1
2
|
import assert from 'minimalistic-assert'
|
|
3
|
+
|
|
2
4
|
import { getInscriptionAddresses } from './get-inscription-addresses'
|
|
3
|
-
import { groupBy, mapValues } from 'lodash'
|
|
4
5
|
|
|
5
6
|
const toTxLog = ({ historyItem, baseAsset, asset }) => {
|
|
6
7
|
const amount = asset.currency.defaultUnit(historyItem.brc20Amt || 0)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { createSimulateTransactions as createSimulateBitcoinTransactions } from '@exodus/web3-bitcoin-utils'
|
|
2
1
|
import { Psbt } from '@exodus/bitcoinjs-lib'
|
|
3
|
-
|
|
2
|
+
import { createSimulateTransactions as createSimulateBitcoinTransactions } from '@exodus/web3-bitcoin-utils'
|
|
4
3
|
import assert from 'minimalistic-assert'
|
|
5
4
|
|
|
6
5
|
// This function accepts either a list of transactions created by a wallet (unsignedTxs) or a web3 transaction (transactionBuffers).
|