xpi-ts 0.2.13 → 0.2.15
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/dist/cjs/lib/bitcore/address.js +75 -74
- package/dist/cjs/lib/bitcore/block/block.js +124 -126
- package/dist/cjs/lib/bitcore/block/blockheader.js +142 -208
- package/dist/cjs/lib/bitcore/block/index.js +3 -1
- package/dist/cjs/lib/bitcore/block/merkleblock.js +301 -0
- package/dist/cjs/lib/bitcore/crypto/bn.js +18 -22
- package/dist/cjs/lib/bitcore/crypto/ecdsa.js +50 -49
- package/dist/cjs/lib/bitcore/crypto/hash.js +25 -22
- package/dist/cjs/lib/bitcore/crypto/musig2.js +86 -92
- package/dist/cjs/lib/bitcore/crypto/point.js +42 -35
- package/dist/cjs/lib/bitcore/crypto/random.js +3 -2
- package/dist/cjs/lib/bitcore/crypto/schnorr.js +46 -55
- package/dist/cjs/lib/bitcore/crypto/signature.js +67 -55
- package/dist/cjs/lib/bitcore/crypto/sigtype.js +1 -1
- package/dist/cjs/lib/bitcore/encoding/base58.js +5 -4
- package/dist/cjs/lib/bitcore/encoding/base58check.js +14 -57
- package/dist/cjs/lib/bitcore/encoding/bufferreader.js +17 -17
- package/dist/cjs/lib/bitcore/encoding/bufferwriter.js +22 -26
- package/dist/cjs/lib/bitcore/encoding/varint.js +12 -11
- package/dist/cjs/lib/bitcore/errors.js +1 -0
- package/dist/cjs/lib/bitcore/hdprivatekey.js +74 -66
- package/dist/cjs/lib/bitcore/hdpublickey.js +96 -116
- package/dist/cjs/lib/bitcore/index.js +165 -172
- package/dist/cjs/lib/bitcore/message.js +36 -35
- package/dist/cjs/lib/bitcore/mnemonic/mnemonic.js +4 -3
- package/dist/cjs/lib/bitcore/mnemonic/pbkdf2.js +6 -5
- package/dist/cjs/lib/bitcore/mnemonic/words/french.js +2053 -0
- package/dist/cjs/lib/bitcore/mnemonic/words/index.js +2 -0
- package/dist/cjs/lib/bitcore/musig2/session.js +26 -25
- package/dist/cjs/lib/bitcore/musig2/signer.js +17 -16
- package/dist/cjs/lib/bitcore/networks.js +4 -3
- package/dist/cjs/lib/bitcore/opcode.js +11 -7
- package/dist/cjs/lib/bitcore/privatekey.js +42 -42
- package/dist/cjs/lib/bitcore/publickey.js +61 -57
- package/dist/cjs/lib/bitcore/script/interpreter/condition-stack.js +41 -0
- package/dist/cjs/lib/bitcore/script/interpreter/index.js +25 -0
- package/dist/cjs/lib/bitcore/script/interpreter/interpreter.js +1362 -0
- package/dist/cjs/lib/bitcore/script/interpreter/script-num.js +200 -0
- package/dist/cjs/lib/bitcore/script/interpreter/types.js +96 -0
- package/dist/cjs/lib/bitcore/{taproot.js → script/taproot.js} +107 -95
- package/dist/cjs/lib/bitcore/script.js +163 -104
- package/dist/cjs/lib/bitcore/taproot/musig2.js +51 -42
- package/dist/cjs/lib/bitcore/transaction/index.js +21 -21
- package/dist/cjs/lib/bitcore/transaction/input/multisig.js +10 -0
- package/dist/cjs/lib/bitcore/transaction/input/multisigscripthash.js +10 -0
- package/dist/cjs/lib/bitcore/transaction/input/publickey.js +10 -0
- package/dist/cjs/lib/bitcore/transaction/input/publickeyhash.js +10 -0
- package/dist/cjs/lib/bitcore/transaction/input/taproot.js +20 -0
- package/dist/cjs/lib/bitcore/transaction/input.js +145 -166
- package/dist/cjs/lib/bitcore/transaction/outpoint.js +89 -0
- package/dist/cjs/lib/bitcore/transaction/output.js +13 -8
- package/dist/cjs/lib/bitcore/transaction/sighash.js +96 -96
- package/dist/cjs/lib/bitcore/transaction/signature.js +39 -40
- package/dist/cjs/lib/bitcore/transaction/transaction.js +130 -118
- package/dist/cjs/lib/bitcore/transaction/unspentoutput.js +27 -23
- package/dist/cjs/lib/bitcore/util/bits.js +33 -0
- package/dist/cjs/lib/bitcore/util/buffer.js +29 -18
- package/dist/cjs/lib/bitcore/util/js.js +0 -3
- package/dist/cjs/lib/bitcore/util/merkle.js +53 -0
- package/dist/cjs/lib/bitcore/util/preconditions.js +8 -7
- package/dist/cjs/lib/bitcore/xaddress.js +27 -23
- package/dist/cjs/lib/{bitcore/taproot/nft.js → nft.js} +98 -29
- package/dist/cjs/lib/rank/index.js +28 -27
- package/dist/cjs/lib/rank/script.js +2 -1
- package/dist/cjs/lib/rank/transaction.js +2 -1
- package/dist/cjs/utils/string.js +6 -5
- package/dist/esm/lib/bitcore/address.js +42 -41
- package/dist/esm/lib/bitcore/block/block.js +126 -128
- package/dist/esm/lib/bitcore/block/blockheader.js +141 -207
- package/dist/esm/lib/bitcore/block/index.js +1 -0
- package/dist/esm/lib/bitcore/block/merkleblock.js +295 -0
- package/dist/esm/lib/bitcore/crypto/bn.js +18 -22
- package/dist/esm/lib/bitcore/crypto/ecdsa.js +25 -24
- package/dist/esm/lib/bitcore/crypto/hash.js +25 -22
- package/dist/esm/lib/bitcore/crypto/musig2.js +60 -66
- package/dist/esm/lib/bitcore/crypto/point.js +22 -15
- package/dist/esm/lib/bitcore/crypto/random.js +3 -2
- package/dist/esm/lib/bitcore/crypto/schnorr.js +35 -44
- package/dist/esm/lib/bitcore/crypto/signature.js +61 -49
- package/dist/esm/lib/bitcore/crypto/sigtype.js +1 -1
- package/dist/esm/lib/bitcore/encoding/base58.js +5 -4
- package/dist/esm/lib/bitcore/encoding/base58check.js +11 -57
- package/dist/esm/lib/bitcore/encoding/bufferreader.js +7 -7
- package/dist/esm/lib/bitcore/encoding/bufferwriter.js +18 -21
- package/dist/esm/lib/bitcore/encoding/varint.js +7 -6
- package/dist/esm/lib/bitcore/errors.js +1 -0
- package/dist/esm/lib/bitcore/hdprivatekey.js +47 -39
- package/dist/esm/lib/bitcore/hdpublickey.js +77 -97
- package/dist/esm/lib/bitcore/index.js +42 -45
- package/dist/esm/lib/bitcore/message.js +16 -15
- package/dist/esm/lib/bitcore/mnemonic/mnemonic.js +4 -3
- package/dist/esm/lib/bitcore/mnemonic/pbkdf2.js +5 -4
- package/dist/esm/lib/bitcore/mnemonic/words/french.js +2050 -0
- package/dist/esm/lib/bitcore/mnemonic/words/index.js +2 -0
- package/dist/esm/lib/bitcore/musig2/session.js +17 -16
- package/dist/esm/lib/bitcore/musig2/signer.js +19 -18
- package/dist/esm/lib/bitcore/networks.js +4 -3
- package/dist/esm/lib/bitcore/opcode.js +9 -5
- package/dist/esm/lib/bitcore/privatekey.js +25 -25
- package/dist/esm/lib/bitcore/publickey.js +46 -42
- package/dist/esm/lib/bitcore/script/interpreter/condition-stack.js +37 -0
- package/dist/esm/lib/bitcore/script/interpreter/index.js +4 -0
- package/dist/esm/lib/bitcore/script/interpreter/interpreter.js +1356 -0
- package/dist/esm/lib/bitcore/script/interpreter/script-num.js +195 -0
- package/dist/esm/lib/bitcore/script/interpreter/types.js +93 -0
- package/dist/esm/lib/bitcore/{taproot.js → script/taproot.js} +92 -81
- package/dist/esm/lib/bitcore/script.js +163 -102
- package/dist/esm/lib/bitcore/taproot/musig2.js +36 -27
- package/dist/esm/lib/bitcore/transaction/index.js +6 -6
- package/dist/esm/lib/bitcore/transaction/input/multisig.js +6 -0
- package/dist/esm/lib/bitcore/transaction/input/multisigscripthash.js +6 -0
- package/dist/esm/lib/bitcore/transaction/input/publickey.js +6 -0
- package/dist/esm/lib/bitcore/transaction/input/publickeyhash.js +6 -0
- package/dist/esm/lib/bitcore/transaction/input/taproot.js +16 -0
- package/dist/esm/lib/bitcore/transaction/input.js +55 -76
- package/dist/esm/lib/bitcore/transaction/outpoint.js +85 -0
- package/dist/esm/lib/bitcore/transaction/output.js +13 -8
- package/dist/esm/lib/bitcore/transaction/sighash.js +22 -22
- package/dist/esm/lib/bitcore/transaction/signature.js +16 -17
- package/dist/esm/lib/bitcore/transaction/transaction.js +58 -46
- package/dist/esm/lib/bitcore/transaction/unspentoutput.js +15 -11
- package/dist/esm/lib/bitcore/util/bits.js +27 -0
- package/dist/esm/lib/bitcore/util/buffer.js +20 -9
- package/dist/esm/lib/bitcore/util/js.js +0 -3
- package/dist/esm/lib/bitcore/util/merkle.js +47 -0
- package/dist/esm/lib/bitcore/util/preconditions.js +3 -2
- package/dist/esm/lib/bitcore/xaddress.js +16 -12
- package/dist/esm/lib/{bitcore/taproot/nft.js → nft.js} +97 -28
- package/dist/esm/lib/rank/index.js +15 -14
- package/dist/esm/lib/rank/script.js +1 -0
- package/dist/esm/lib/rank/transaction.js +1 -0
- package/dist/esm/utils/string.js +1 -0
- package/dist/types/lib/bitcore/address.d.ts +4 -3
- package/dist/types/lib/bitcore/address.d.ts.map +1 -1
- package/dist/types/lib/bitcore/block/block.d.ts +11 -19
- package/dist/types/lib/bitcore/block/block.d.ts.map +1 -1
- package/dist/types/lib/bitcore/block/blockheader.d.ts +30 -32
- package/dist/types/lib/bitcore/block/blockheader.d.ts.map +1 -1
- package/dist/types/lib/bitcore/block/index.d.ts +2 -0
- package/dist/types/lib/bitcore/block/index.d.ts.map +1 -1
- package/dist/types/lib/bitcore/block/merkleblock.d.ts +53 -0
- package/dist/types/lib/bitcore/block/merkleblock.d.ts.map +1 -0
- package/dist/types/lib/bitcore/crypto/bn.d.ts +2 -2
- package/dist/types/lib/bitcore/crypto/bn.d.ts.map +1 -1
- package/dist/types/lib/bitcore/crypto/ecdsa.d.ts +5 -4
- package/dist/types/lib/bitcore/crypto/ecdsa.d.ts.map +1 -1
- package/dist/types/lib/bitcore/crypto/hash.d.ts +3 -1
- package/dist/types/lib/bitcore/crypto/hash.d.ts.map +1 -1
- package/dist/types/lib/bitcore/crypto/musig2.d.ts +22 -30
- package/dist/types/lib/bitcore/crypto/musig2.d.ts.map +1 -1
- package/dist/types/lib/bitcore/crypto/point.d.ts +8 -3
- package/dist/types/lib/bitcore/crypto/point.d.ts.map +1 -1
- package/dist/types/lib/bitcore/crypto/random.d.ts +1 -0
- package/dist/types/lib/bitcore/crypto/random.d.ts.map +1 -1
- package/dist/types/lib/bitcore/crypto/schnorr.d.ts +5 -4
- package/dist/types/lib/bitcore/crypto/schnorr.d.ts.map +1 -1
- package/dist/types/lib/bitcore/crypto/signature.d.ts +4 -1
- package/dist/types/lib/bitcore/crypto/signature.d.ts.map +1 -1
- package/dist/types/lib/bitcore/crypto/sigtype.d.ts +1 -0
- package/dist/types/lib/bitcore/crypto/sigtype.d.ts.map +1 -1
- package/dist/types/lib/bitcore/encoding/base58.d.ts +1 -0
- package/dist/types/lib/bitcore/encoding/base58.d.ts.map +1 -1
- package/dist/types/lib/bitcore/encoding/base58check.d.ts +1 -2
- package/dist/types/lib/bitcore/encoding/base58check.d.ts.map +1 -1
- package/dist/types/lib/bitcore/encoding/bufferreader.d.ts +2 -1
- package/dist/types/lib/bitcore/encoding/bufferreader.d.ts.map +1 -1
- package/dist/types/lib/bitcore/encoding/bufferwriter.d.ts +2 -2
- package/dist/types/lib/bitcore/encoding/bufferwriter.d.ts.map +1 -1
- package/dist/types/lib/bitcore/encoding/varint.d.ts +3 -2
- package/dist/types/lib/bitcore/encoding/varint.d.ts.map +1 -1
- package/dist/types/lib/bitcore/errors.d.ts +3 -0
- package/dist/types/lib/bitcore/errors.d.ts.map +1 -1
- package/dist/types/lib/bitcore/hdprivatekey.d.ts +5 -4
- package/dist/types/lib/bitcore/hdprivatekey.d.ts.map +1 -1
- package/dist/types/lib/bitcore/hdpublickey.d.ts +4 -3
- package/dist/types/lib/bitcore/hdpublickey.d.ts.map +1 -1
- package/dist/types/lib/bitcore/index.d.ts +55 -60
- package/dist/types/lib/bitcore/index.d.ts.map +1 -1
- package/dist/types/lib/bitcore/message.d.ts +7 -4
- package/dist/types/lib/bitcore/message.d.ts.map +1 -1
- package/dist/types/lib/bitcore/mnemonic/mnemonic.d.ts +2 -0
- package/dist/types/lib/bitcore/mnemonic/mnemonic.d.ts.map +1 -1
- package/dist/types/lib/bitcore/mnemonic/pbkdf2.d.ts +1 -0
- package/dist/types/lib/bitcore/mnemonic/pbkdf2.d.ts.map +1 -1
- package/dist/types/lib/bitcore/mnemonic/words/french.d.ts +2 -0
- package/dist/types/lib/bitcore/mnemonic/words/french.d.ts.map +1 -0
- package/dist/types/lib/bitcore/mnemonic/words/index.d.ts +1 -0
- package/dist/types/lib/bitcore/mnemonic/words/index.d.ts.map +1 -1
- package/dist/types/lib/bitcore/musig2/session.d.ts +8 -7
- package/dist/types/lib/bitcore/musig2/session.d.ts.map +1 -1
- package/dist/types/lib/bitcore/musig2/signer.d.ts +10 -9
- package/dist/types/lib/bitcore/musig2/signer.d.ts.map +1 -1
- package/dist/types/lib/bitcore/networks.d.ts +1 -0
- package/dist/types/lib/bitcore/networks.d.ts.map +1 -1
- package/dist/types/lib/bitcore/opcode.d.ts +5 -0
- package/dist/types/lib/bitcore/opcode.d.ts.map +1 -1
- package/dist/types/lib/bitcore/privatekey.d.ts +5 -4
- package/dist/types/lib/bitcore/privatekey.d.ts.map +1 -1
- package/dist/types/lib/bitcore/publickey.d.ts +13 -6
- package/dist/types/lib/bitcore/publickey.d.ts.map +1 -1
- package/dist/types/lib/bitcore/{chunk.d.ts → script/chunk.d.ts} +1 -0
- package/dist/types/lib/bitcore/script/chunk.d.ts.map +1 -0
- package/dist/types/lib/bitcore/script/interpreter/condition-stack.d.ts +11 -0
- package/dist/types/lib/bitcore/script/interpreter/condition-stack.d.ts.map +1 -0
- package/dist/types/lib/bitcore/script/interpreter/index.d.ts +5 -0
- package/dist/types/lib/bitcore/script/interpreter/index.d.ts.map +1 -0
- package/dist/types/lib/bitcore/script/interpreter/interpreter.d.ts +21 -0
- package/dist/types/lib/bitcore/script/interpreter/interpreter.d.ts.map +1 -0
- package/dist/types/lib/bitcore/script/interpreter/script-num.d.ts +35 -0
- package/dist/types/lib/bitcore/script/interpreter/script-num.d.ts.map +1 -0
- package/dist/types/lib/bitcore/script/interpreter/types.d.ts +101 -0
- package/dist/types/lib/bitcore/script/interpreter/types.d.ts.map +1 -0
- package/dist/types/lib/bitcore/{taproot.d.ts → script/taproot.d.ts} +20 -7
- package/dist/types/lib/bitcore/script/taproot.d.ts.map +1 -0
- package/dist/types/lib/bitcore/script.d.ts +12 -11
- package/dist/types/lib/bitcore/script.d.ts.map +1 -1
- package/dist/types/lib/bitcore/taproot/musig2.d.ts +17 -16
- package/dist/types/lib/bitcore/taproot/musig2.d.ts.map +1 -1
- package/dist/types/lib/bitcore/transaction/index.d.ts +11 -11
- package/dist/types/lib/bitcore/transaction/index.d.ts.map +1 -1
- package/dist/types/lib/bitcore/transaction/input/multisig.d.ts +5 -0
- package/dist/types/lib/bitcore/transaction/input/multisig.d.ts.map +1 -0
- package/dist/types/lib/bitcore/transaction/input/multisigscripthash.d.ts +5 -0
- package/dist/types/lib/bitcore/transaction/input/multisigscripthash.d.ts.map +1 -0
- package/dist/types/lib/bitcore/transaction/input/publickey.d.ts +5 -0
- package/dist/types/lib/bitcore/transaction/input/publickey.d.ts.map +1 -0
- package/dist/types/lib/bitcore/transaction/input/publickeyhash.d.ts +6 -0
- package/dist/types/lib/bitcore/transaction/input/publickeyhash.d.ts.map +1 -0
- package/dist/types/lib/bitcore/transaction/input/taproot.d.ts +18 -0
- package/dist/types/lib/bitcore/transaction/input/taproot.d.ts.map +1 -0
- package/dist/types/lib/bitcore/transaction/input.d.ts +27 -35
- package/dist/types/lib/bitcore/transaction/input.d.ts.map +1 -1
- package/dist/types/lib/bitcore/transaction/outpoint.d.ts +32 -0
- package/dist/types/lib/bitcore/transaction/outpoint.d.ts.map +1 -0
- package/dist/types/lib/bitcore/transaction/output.d.ts +3 -1
- package/dist/types/lib/bitcore/transaction/output.d.ts.map +1 -1
- package/dist/types/lib/bitcore/transaction/sighash.d.ts +8 -7
- package/dist/types/lib/bitcore/transaction/sighash.d.ts.map +1 -1
- package/dist/types/lib/bitcore/transaction/signature.d.ts +3 -2
- package/dist/types/lib/bitcore/transaction/signature.d.ts.map +1 -1
- package/dist/types/lib/bitcore/transaction/transaction.d.ts +18 -15
- package/dist/types/lib/bitcore/transaction/transaction.d.ts.map +1 -1
- package/dist/types/lib/bitcore/transaction/unspentoutput.d.ts +9 -7
- package/dist/types/lib/bitcore/transaction/unspentoutput.d.ts.map +1 -1
- package/dist/types/lib/bitcore/unit.d.ts.map +1 -1
- package/dist/types/lib/bitcore/util/base32.d.ts.map +1 -1
- package/dist/types/lib/bitcore/util/bits.d.ts +5 -0
- package/dist/types/lib/bitcore/util/bits.d.ts.map +1 -0
- package/dist/types/lib/bitcore/util/buffer.d.ts +10 -2
- package/dist/types/lib/bitcore/util/buffer.d.ts.map +1 -1
- package/dist/types/lib/bitcore/util/js.d.ts +0 -1
- package/dist/types/lib/bitcore/util/js.d.ts.map +1 -1
- package/dist/types/lib/bitcore/util/merkle.d.ts +6 -0
- package/dist/types/lib/bitcore/util/merkle.d.ts.map +1 -0
- package/dist/types/lib/bitcore/util/preconditions.d.ts.map +1 -1
- package/dist/types/lib/bitcore/xaddress.d.ts +1 -0
- package/dist/types/lib/bitcore/xaddress.d.ts.map +1 -1
- package/dist/types/lib/{bitcore/taproot/nft.d.ts → nft.d.ts} +26 -12
- package/dist/types/lib/nft.d.ts.map +1 -0
- package/dist/types/lib/rank/index.d.ts +1 -0
- package/dist/types/lib/rank/index.d.ts.map +1 -1
- package/dist/types/lib/rank/script.d.ts +1 -0
- package/dist/types/lib/rank/script.d.ts.map +1 -1
- package/dist/types/lib/rank/transaction.d.ts +1 -0
- package/dist/types/lib/rank/transaction.d.ts.map +1 -1
- package/dist/types/utils/string.d.ts +1 -0
- package/dist/types/utils/string.d.ts.map +1 -1
- package/package.json +3 -2
- package/dist/cjs/lib/bitcore/script/interpreter.js +0 -1757
- package/dist/esm/lib/bitcore/script/interpreter.js +0 -1753
- package/dist/types/lib/bitcore/chunk.d.ts.map +0 -1
- package/dist/types/lib/bitcore/script/interpreter.d.ts +0 -101
- package/dist/types/lib/bitcore/script/interpreter.d.ts.map +0 -1
- package/dist/types/lib/bitcore/taproot/nft.d.ts.map +0 -1
- package/dist/types/lib/bitcore/taproot.d.ts.map +0 -1
- /package/dist/cjs/lib/bitcore/{chunk.js → script/chunk.js} +0 -0
- /package/dist/esm/lib/bitcore/{chunk.js → script/chunk.js} +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { Hash } from '
|
|
2
|
-
import { Script } from '
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { Hash } from './bitcore/crypto/hash.js';
|
|
2
|
+
import { Script } from './bitcore/script.js';
|
|
3
|
+
import { Opcode } from './bitcore/opcode.js';
|
|
4
|
+
import { buildScriptPathTaproot, extractTaprootCommitment, extractTaprootState, createControlBlock, } from './bitcore/script/taproot.js';
|
|
5
|
+
import { Transaction } from './bitcore/transaction/transaction.js';
|
|
6
|
+
import { Output } from './bitcore/transaction/output.js';
|
|
7
|
+
import { TaprootInput } from './bitcore/transaction/input/taproot.js';
|
|
8
|
+
import { UnspentOutput, } from './bitcore/transaction/unspentoutput.js';
|
|
9
|
+
import { Signature } from './bitcore/crypto/signature.js';
|
|
10
|
+
import { BufferUtil } from './bitcore/index.js';
|
|
9
11
|
export class NFT {
|
|
10
12
|
_script;
|
|
11
13
|
_address;
|
|
@@ -16,6 +18,7 @@ export class NFT {
|
|
|
16
18
|
_outputIndex;
|
|
17
19
|
_commitment;
|
|
18
20
|
_merkleRoot;
|
|
21
|
+
_controlBlock;
|
|
19
22
|
_leaves;
|
|
20
23
|
_collectionHash;
|
|
21
24
|
constructor(config) {
|
|
@@ -36,9 +39,20 @@ export class NFT {
|
|
|
36
39
|
this._commitment = result.commitment;
|
|
37
40
|
this._merkleRoot = result.merkleRoot;
|
|
38
41
|
this._leaves = result.leaves;
|
|
42
|
+
if (result.leaves.length > 0) {
|
|
43
|
+
this._controlBlock = createControlBlock(config.ownerKey, 0, config.scriptTree);
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
46
|
else {
|
|
41
|
-
|
|
47
|
+
const scriptTree = { script: new Script().add(Opcode.OP_CHECKSIG) };
|
|
48
|
+
const result = buildScriptPathTaproot(config.ownerKey, scriptTree, this._metadataHash);
|
|
49
|
+
this._script = result.script;
|
|
50
|
+
this._commitment = result.commitment;
|
|
51
|
+
this._merkleRoot = result.merkleRoot;
|
|
52
|
+
this._leaves = result.leaves;
|
|
53
|
+
if (result.leaves.length > 0) {
|
|
54
|
+
this._controlBlock = createControlBlock(config.ownerKey, 0, scriptTree);
|
|
55
|
+
}
|
|
42
56
|
}
|
|
43
57
|
const address = this._script.toAddress(config.network);
|
|
44
58
|
if (!address) {
|
|
@@ -47,7 +61,7 @@ export class NFT {
|
|
|
47
61
|
this._address = address;
|
|
48
62
|
}
|
|
49
63
|
static fromScript(script, metadata, satoshis, txid, outputIndex) {
|
|
50
|
-
if (!
|
|
64
|
+
if (!script.isTaprootOut()) {
|
|
51
65
|
throw new Error('Script is not a valid Pay-To-Taproot script');
|
|
52
66
|
}
|
|
53
67
|
const metadataHash = extractTaprootState(script);
|
|
@@ -122,6 +136,9 @@ export class NFT {
|
|
|
122
136
|
get leaves() {
|
|
123
137
|
return this._leaves;
|
|
124
138
|
}
|
|
139
|
+
get controlBlock() {
|
|
140
|
+
return this._controlBlock;
|
|
141
|
+
}
|
|
125
142
|
get collectionHash() {
|
|
126
143
|
return this._collectionHash;
|
|
127
144
|
}
|
|
@@ -138,6 +155,18 @@ export class NFT {
|
|
|
138
155
|
if (!this._txid || this._outputIndex === undefined) {
|
|
139
156
|
throw new Error('Cannot transfer NFT without UTXO information (txid and outputIndex)');
|
|
140
157
|
}
|
|
158
|
+
if (!this._merkleRoot ||
|
|
159
|
+
!this._controlBlock ||
|
|
160
|
+
!this._leaves ||
|
|
161
|
+
this._leaves.length === 0) {
|
|
162
|
+
throw new Error('NFT does not have required script-path spending data (merkleRoot, controlBlock, leaves)');
|
|
163
|
+
}
|
|
164
|
+
const scriptPathData = {
|
|
165
|
+
internalPubKey: currentOwnerKey.publicKey,
|
|
166
|
+
merkleRoot: this._merkleRoot,
|
|
167
|
+
controlBlock: this._controlBlock,
|
|
168
|
+
tapScript: this._leaves[0].script,
|
|
169
|
+
};
|
|
141
170
|
return NFTUtil.transferNFT({
|
|
142
171
|
currentOwnerKey,
|
|
143
172
|
newOwnerKey,
|
|
@@ -148,6 +177,7 @@ export class NFT {
|
|
|
148
177
|
satoshis: this._satoshis,
|
|
149
178
|
},
|
|
150
179
|
metadataHash: this._metadataHash,
|
|
180
|
+
scriptPathData,
|
|
151
181
|
fee,
|
|
152
182
|
});
|
|
153
183
|
}
|
|
@@ -193,6 +223,9 @@ export class NFT {
|
|
|
193
223
|
};
|
|
194
224
|
}
|
|
195
225
|
toJSON() {
|
|
226
|
+
if (!this._commitment || !this._merkleRoot || !this._controlBlock) {
|
|
227
|
+
throw new Error('NFT is missing required script-path data for JSON serialization');
|
|
228
|
+
}
|
|
196
229
|
return {
|
|
197
230
|
script: this._script.toBuffer().toString('hex'),
|
|
198
231
|
address: this._address.toString(),
|
|
@@ -201,12 +234,19 @@ export class NFT {
|
|
|
201
234
|
satoshis: this._satoshis,
|
|
202
235
|
txid: this._txid,
|
|
203
236
|
outputIndex: this._outputIndex,
|
|
204
|
-
commitment: this._commitment
|
|
205
|
-
merkleRoot: this._merkleRoot
|
|
237
|
+
commitment: this._commitment.toString(),
|
|
238
|
+
merkleRoot: this._merkleRoot.toString('hex'),
|
|
239
|
+
controlBlock: this._controlBlock.toString('hex'),
|
|
206
240
|
collectionHash: this._collectionHash?.toString('hex'),
|
|
207
241
|
};
|
|
208
242
|
}
|
|
209
243
|
toObject() {
|
|
244
|
+
if (!this._commitment ||
|
|
245
|
+
!this._merkleRoot ||
|
|
246
|
+
!this._controlBlock ||
|
|
247
|
+
!this._leaves) {
|
|
248
|
+
throw new Error('NFT is missing required script-path data');
|
|
249
|
+
}
|
|
210
250
|
return {
|
|
211
251
|
script: this._script,
|
|
212
252
|
address: this._address,
|
|
@@ -215,6 +255,10 @@ export class NFT {
|
|
|
215
255
|
satoshis: this._satoshis,
|
|
216
256
|
txid: this._txid,
|
|
217
257
|
outputIndex: this._outputIndex,
|
|
258
|
+
commitment: this._commitment,
|
|
259
|
+
merkleRoot: this._merkleRoot,
|
|
260
|
+
controlBlock: this._controlBlock,
|
|
261
|
+
leaves: this._leaves,
|
|
218
262
|
};
|
|
219
263
|
}
|
|
220
264
|
toString() {
|
|
@@ -224,11 +268,11 @@ export class NFT {
|
|
|
224
268
|
export class NFTUtil {
|
|
225
269
|
static hashMetadata(metadata) {
|
|
226
270
|
const metadataJSON = JSON.stringify(metadata);
|
|
227
|
-
return Hash.sha256(
|
|
271
|
+
return Hash.sha256(BufferUtil.from(metadataJSON, 'utf8'));
|
|
228
272
|
}
|
|
229
273
|
static hashCollection(collectionInfo) {
|
|
230
274
|
const collectionJSON = JSON.stringify(collectionInfo);
|
|
231
|
-
return Hash.sha256(
|
|
275
|
+
return Hash.sha256(BufferUtil.from(collectionJSON, 'utf8'));
|
|
232
276
|
}
|
|
233
277
|
static hashCollectionNFT(collectionHash, nftMetadata) {
|
|
234
278
|
const combinedData = {
|
|
@@ -236,7 +280,7 @@ export class NFTUtil {
|
|
|
236
280
|
nft: nftMetadata,
|
|
237
281
|
};
|
|
238
282
|
const combinedJSON = JSON.stringify(combinedData);
|
|
239
|
-
return Hash.sha256(
|
|
283
|
+
return Hash.sha256(BufferUtil.from(combinedJSON, 'utf8'));
|
|
240
284
|
}
|
|
241
285
|
static verifyMetadata(metadata, hash) {
|
|
242
286
|
const computedHash = NFTUtil.hashMetadata(metadata);
|
|
@@ -247,24 +291,36 @@ export class NFTUtil {
|
|
|
247
291
|
return computedHash.equals(hash);
|
|
248
292
|
}
|
|
249
293
|
static extractMetadataHash(script) {
|
|
250
|
-
if (!
|
|
294
|
+
if (!script.isTaprootOut()) {
|
|
251
295
|
throw new Error('Script is not a valid Pay-To-Taproot script');
|
|
252
296
|
}
|
|
253
297
|
return extractTaprootState(script);
|
|
254
298
|
}
|
|
255
|
-
static
|
|
299
|
+
static createNFT(ownerKey, metadata, satoshis = 1000, network) {
|
|
256
300
|
const metadataHash = NFTUtil.hashMetadata(metadata);
|
|
257
|
-
const
|
|
258
|
-
|
|
301
|
+
const metadataScript = new Script()
|
|
302
|
+
.add(Opcode.OP_SHA256)
|
|
303
|
+
.add(metadataHash)
|
|
304
|
+
.add(Opcode.OP_EQUALVERIFY)
|
|
305
|
+
.add(Opcode.OP_CHECKSIG);
|
|
306
|
+
const scriptTree = {
|
|
307
|
+
script: metadataScript,
|
|
308
|
+
};
|
|
309
|
+
const result = buildScriptPathTaproot(ownerKey, scriptTree, metadataHash);
|
|
310
|
+
const address = result.script.toAddress(network);
|
|
259
311
|
if (!address) {
|
|
260
312
|
throw new Error('Failed to create address from script');
|
|
261
313
|
}
|
|
262
314
|
return {
|
|
263
|
-
script,
|
|
315
|
+
script: result.script,
|
|
264
316
|
address,
|
|
265
317
|
metadataHash,
|
|
266
318
|
metadata,
|
|
267
319
|
satoshis,
|
|
320
|
+
commitment: result.commitment,
|
|
321
|
+
merkleRoot: result.merkleRoot,
|
|
322
|
+
controlBlock: createControlBlock(ownerKey, 0, scriptTree),
|
|
323
|
+
leaves: result.leaves,
|
|
268
324
|
};
|
|
269
325
|
}
|
|
270
326
|
static createScriptPathNFT(ownerKey, metadata, scriptTree, satoshis = 1000, network) {
|
|
@@ -274,6 +330,7 @@ export class NFTUtil {
|
|
|
274
330
|
if (!address) {
|
|
275
331
|
throw new Error('Failed to create address from script');
|
|
276
332
|
}
|
|
333
|
+
const controlBlock = createControlBlock(ownerKey, 0, scriptTree);
|
|
277
334
|
return {
|
|
278
335
|
script,
|
|
279
336
|
address,
|
|
@@ -282,12 +339,16 @@ export class NFTUtil {
|
|
|
282
339
|
satoshis,
|
|
283
340
|
commitment,
|
|
284
341
|
merkleRoot,
|
|
342
|
+
controlBlock,
|
|
285
343
|
leaves,
|
|
286
344
|
};
|
|
287
345
|
}
|
|
288
346
|
static createCollectionNFT(ownerKey, collectionHash, nftMetadata, satoshis = 1000, network) {
|
|
289
347
|
const metadataHash = NFTUtil.hashCollectionNFT(collectionHash, nftMetadata);
|
|
290
|
-
const script =
|
|
348
|
+
const { script, commitment, merkleRoot, leaves } = buildScriptPathTaproot(ownerKey, { script: new Script().add(Opcode.OP_CHECKSIG) }, metadataHash);
|
|
349
|
+
const controlBlock = createControlBlock(ownerKey, 0, {
|
|
350
|
+
script: new Script().add(Opcode.OP_CHECKSIG),
|
|
351
|
+
});
|
|
291
352
|
const address = script.toAddress(network);
|
|
292
353
|
if (!address) {
|
|
293
354
|
throw new Error('Failed to create address from script');
|
|
@@ -298,11 +359,15 @@ export class NFTUtil {
|
|
|
298
359
|
metadataHash,
|
|
299
360
|
metadata: nftMetadata,
|
|
300
361
|
satoshis,
|
|
362
|
+
commitment,
|
|
363
|
+
merkleRoot,
|
|
364
|
+
controlBlock,
|
|
365
|
+
leaves,
|
|
301
366
|
collectionHash,
|
|
302
367
|
};
|
|
303
368
|
}
|
|
304
369
|
static mintNFT(config) {
|
|
305
|
-
const nft = NFTUtil.
|
|
370
|
+
const nft = NFTUtil.createNFT(config.ownerKey.publicKey, config.metadata, config.satoshis || 1000, config.network);
|
|
306
371
|
const tx = new Transaction();
|
|
307
372
|
tx.addOutput(new Output({
|
|
308
373
|
script: nft.script,
|
|
@@ -313,7 +378,7 @@ export class NFTUtil {
|
|
|
313
378
|
static mintBatch(ownerKey, nftMetadataList, satoshisPerNFT = 1000, network) {
|
|
314
379
|
const tx = new Transaction();
|
|
315
380
|
for (const metadata of nftMetadataList) {
|
|
316
|
-
const nft = NFTUtil.
|
|
381
|
+
const nft = NFTUtil.createNFT(ownerKey.publicKey, metadata, satoshisPerNFT, network);
|
|
317
382
|
tx.addOutput(new Output({
|
|
318
383
|
script: nft.script,
|
|
319
384
|
satoshis: nft.satoshis,
|
|
@@ -334,31 +399,35 @@ export class NFTUtil {
|
|
|
334
399
|
return tx;
|
|
335
400
|
}
|
|
336
401
|
static transferNFT(config) {
|
|
337
|
-
const { currentOwnerKey, newOwnerKey, nftUtxo, metadataHash, fee } = config;
|
|
402
|
+
const { currentOwnerKey, newOwnerKey, nftUtxo, metadataHash, fee, scriptPathData, } = config;
|
|
338
403
|
const inputState = NFTUtil.extractMetadataHash(nftUtxo.script);
|
|
339
404
|
if (!inputState || !inputState.equals(metadataHash)) {
|
|
340
405
|
throw new Error('Input script metadata hash does not match');
|
|
341
406
|
}
|
|
342
|
-
const newNFTScript =
|
|
407
|
+
const newNFTScript = buildScriptPathTaproot(newOwnerKey, { script: new Script().add(Opcode.OP_CHECKSIG) }, metadataHash).script;
|
|
343
408
|
const outputSatoshis = fee ? nftUtxo.satoshis - fee : nftUtxo.satoshis;
|
|
344
409
|
if (outputSatoshis < 546) {
|
|
345
410
|
throw new Error('Output value below dust limit (546 satoshis)');
|
|
346
411
|
}
|
|
347
412
|
const tx = new Transaction();
|
|
348
413
|
tx.addInput(new TaprootInput({
|
|
349
|
-
prevTxId:
|
|
414
|
+
prevTxId: BufferUtil.from(nftUtxo.txid, 'hex'),
|
|
350
415
|
outputIndex: nftUtxo.outputIndex,
|
|
351
416
|
output: new Output({
|
|
352
417
|
script: nftUtxo.script,
|
|
353
418
|
satoshis: nftUtxo.satoshis,
|
|
354
419
|
}),
|
|
355
420
|
script: new Script(),
|
|
421
|
+
internalPubKey: scriptPathData.internalPubKey,
|
|
422
|
+
merkleRoot: scriptPathData.merkleRoot,
|
|
423
|
+
controlBlock: scriptPathData.controlBlock,
|
|
424
|
+
tapScript: scriptPathData.tapScript,
|
|
356
425
|
}));
|
|
357
426
|
tx.addOutput(new Output({
|
|
358
427
|
script: newNFTScript,
|
|
359
428
|
satoshis: outputSatoshis,
|
|
360
429
|
}));
|
|
361
|
-
tx.sign(currentOwnerKey, Signature.SIGHASH_ALL | Signature.
|
|
430
|
+
tx.sign(currentOwnerKey, Signature.SIGHASH_ALL | Signature.SIGHASH_FORKID, 'schnorr');
|
|
362
431
|
return tx;
|
|
363
432
|
}
|
|
364
433
|
static validateTransfer(inputScript, outputScript) {
|
|
@@ -382,7 +451,7 @@ export class NFTUtil {
|
|
|
382
451
|
return true;
|
|
383
452
|
}
|
|
384
453
|
static isNFT(script) {
|
|
385
|
-
if (!
|
|
454
|
+
if (!script.isTaprootOut()) {
|
|
386
455
|
return false;
|
|
387
456
|
}
|
|
388
457
|
const state = extractTaprootState(script);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Buffer } from 'buffer/';
|
|
1
2
|
import { MAX_OP_RETURN_DATA, RNKC_MIN_DATA_LENGTH, RNKC_MIN_FEE_RATE, } from '../../utils/constants.js';
|
|
2
3
|
import { toHex } from '../../utils/string.js';
|
|
3
4
|
import OpCode from './opcode.js';
|
|
@@ -107,11 +108,11 @@ export function toProfileIdBuf(platform, profileId) {
|
|
|
107
108
|
switch (platform) {
|
|
108
109
|
case 'lotusia': {
|
|
109
110
|
const profileIdHex = Buffer.from(profileId, 'hex');
|
|
110
|
-
|
|
111
|
+
profileIdHex.copy(profileBuf, profileIdSpec.len - profileIdHex.length);
|
|
111
112
|
break;
|
|
112
113
|
}
|
|
113
114
|
case 'twitter':
|
|
114
|
-
|
|
115
|
+
Buffer.from(profileId, 'utf8').copy(profileBuf, profileIdSpec.len - profileId.length);
|
|
115
116
|
break;
|
|
116
117
|
default:
|
|
117
118
|
return null;
|
|
@@ -139,13 +140,13 @@ export function toPlatformBuf(platform) {
|
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
export function toPlatformUTF8(platformBuf) {
|
|
142
|
-
return SCRIPT_CHUNK_PLATFORM.get(platformBuf.
|
|
143
|
+
return SCRIPT_CHUNK_PLATFORM.get(platformBuf.readUInt8(0));
|
|
143
144
|
}
|
|
144
145
|
export function toSentimentOpCode(sentiment) {
|
|
145
146
|
return RANK_SENTIMENT_OP_CODES.get(sentiment);
|
|
146
147
|
}
|
|
147
148
|
export function toSentimentUTF8(sentimentBuf) {
|
|
148
|
-
return SCRIPT_CHUNK_SENTIMENT.get(sentimentBuf.readUInt8());
|
|
149
|
+
return SCRIPT_CHUNK_SENTIMENT.get(sentimentBuf.readUInt8(0));
|
|
149
150
|
}
|
|
150
151
|
export function toCommentUTF8(commentBuf) {
|
|
151
152
|
return new TextDecoder('utf-8').decode(commentBuf);
|
|
@@ -215,13 +216,13 @@ export function toScriptRNKC({ platform, profileId, postId, comment, }) {
|
|
|
215
216
|
scriptRNKC += toHex(toPostIdBuf(platform, postId));
|
|
216
217
|
}
|
|
217
218
|
scriptBufs.push(Buffer.from(scriptRNKC, 'hex'));
|
|
218
|
-
const commentBuf1 = commentBuf.
|
|
219
|
+
const commentBuf1 = commentBuf.slice(0, MAX_OP_RETURN_DATA);
|
|
219
220
|
let scriptComment = OP_RETURN + OP_PUSHDATA1;
|
|
220
221
|
scriptComment += toHex(commentBuf1.length);
|
|
221
222
|
scriptComment += toHex(commentBuf1);
|
|
222
223
|
scriptBufs.push(Buffer.from(scriptComment, 'hex'));
|
|
223
224
|
if (commentBuf.length > MAX_OP_RETURN_DATA) {
|
|
224
|
-
const commentBuf2 = commentBuf.
|
|
225
|
+
const commentBuf2 = commentBuf.slice(MAX_OP_RETURN_DATA);
|
|
225
226
|
let scriptComment2 = OP_RETURN + OP_PUSHDATA1;
|
|
226
227
|
scriptComment2 += toHex(commentBuf2.length);
|
|
227
228
|
scriptComment2 += toHex(commentBuf2);
|
|
@@ -258,7 +259,7 @@ export class ScriptProcessor {
|
|
|
258
259
|
return this.processLokad();
|
|
259
260
|
}
|
|
260
261
|
processLokad() {
|
|
261
|
-
const lokadBuf = this.script.
|
|
262
|
+
const lokadBuf = this.script.slice(2, 6);
|
|
262
263
|
const lokad = SCRIPT_CHUNK_LOKAD.get(lokadBuf.readUInt32BE(0));
|
|
263
264
|
if (!lokad) {
|
|
264
265
|
return undefined;
|
|
@@ -270,16 +271,16 @@ export class ScriptProcessor {
|
|
|
270
271
|
if (!chunk || chunk.offset === null) {
|
|
271
272
|
return undefined;
|
|
272
273
|
}
|
|
273
|
-
const sentimentBuf = this.script.
|
|
274
|
-
return SCRIPT_CHUNK_SENTIMENT.get(sentimentBuf.readUInt8());
|
|
274
|
+
const sentimentBuf = this.script.slice(chunk.offset, chunk.offset + chunk.len);
|
|
275
|
+
return SCRIPT_CHUNK_SENTIMENT.get(sentimentBuf.readUInt8(0));
|
|
275
276
|
}
|
|
276
277
|
processPlatform() {
|
|
277
278
|
const chunk = this.chunks?.get('platform');
|
|
278
279
|
if (!chunk || chunk.offset === null) {
|
|
279
280
|
return undefined;
|
|
280
281
|
}
|
|
281
|
-
const platformBuf = this.script.
|
|
282
|
-
const platform = SCRIPT_CHUNK_PLATFORM.get(platformBuf.readUInt8());
|
|
282
|
+
const platformBuf = this.script.slice(chunk.offset, chunk.offset + chunk.len);
|
|
283
|
+
const platform = SCRIPT_CHUNK_PLATFORM.get(platformBuf.readUInt8(0));
|
|
283
284
|
if (!platform) {
|
|
284
285
|
return undefined;
|
|
285
286
|
}
|
|
@@ -295,7 +296,7 @@ export class ScriptProcessor {
|
|
|
295
296
|
return undefined;
|
|
296
297
|
}
|
|
297
298
|
const profileIdSpec = platformSpec.profileId;
|
|
298
|
-
const profileIdBuf = this.script.
|
|
299
|
+
const profileIdBuf = this.script.slice(chunk.offset, chunk.offset + profileIdSpec.len);
|
|
299
300
|
if (profileIdBuf.length < profileIdSpec.len) {
|
|
300
301
|
return undefined;
|
|
301
302
|
}
|
|
@@ -322,7 +323,7 @@ export class ScriptProcessor {
|
|
|
322
323
|
}
|
|
323
324
|
const postIdSpec = platformSpec.postId;
|
|
324
325
|
const postIdOffset = profileIdChunk.offset + platformSpec.profileId.len + 1;
|
|
325
|
-
const postIdBuf = this.script.
|
|
326
|
+
const postIdBuf = this.script.slice(postIdOffset, postIdOffset + postIdSpec.len);
|
|
326
327
|
try {
|
|
327
328
|
switch (platform) {
|
|
328
329
|
case 'lotusia':
|
|
@@ -348,7 +349,7 @@ export class ScriptProcessor {
|
|
|
348
349
|
if (isNaN(dataSize) || dataSize > MAX_OP_RETURN_DATA) {
|
|
349
350
|
break;
|
|
350
351
|
}
|
|
351
|
-
commentBuf = Buffer.concat([commentBuf, script.
|
|
352
|
+
commentBuf = Buffer.concat([commentBuf, script.slice(3, 3 + dataSize)]);
|
|
352
353
|
}
|
|
353
354
|
if (!commentBuf) {
|
|
354
355
|
return null;
|
package/dist/esm/utils/string.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Network, type NetworkName } from './networks
|
|
2
|
-
import { PublicKey } from './publickey
|
|
3
|
-
import { Script } from './script
|
|
1
|
+
import { Network, type NetworkName } from './networks';
|
|
2
|
+
import { PublicKey } from './publickey';
|
|
3
|
+
import { Script } from './script';
|
|
4
|
+
import type { Buffer } from 'buffer/';
|
|
4
5
|
export interface AddressData {
|
|
5
6
|
hashBuffer?: Buffer;
|
|
6
7
|
network?: Network;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../../lib/bitcore/address.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../../lib/bitcore/address.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,OAAO,EAGP,KAAK,WAAW,EACjB,MAAM,YAAY,CAAA;AAGnB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAGrC,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,WAAW,CAAA;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CA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a;IAQzB,MAAM,IAAI,aAAa;IAOvB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM;IAUjD,eAAe,IAAI,MAAM;IAOzB,aAAa,IAAI,MAAM;IAQvB,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM;IA0BnD,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB;IAa9D,OAAO,IAAI,MAAM;CAWlB"}
|
|
@@ -1,47 +1,34 @@
|
|
|
1
|
+
import { Buffer } from 'buffer/';
|
|
1
2
|
import { BufferReader } from '../encoding/bufferreader.js';
|
|
2
3
|
import { BufferWriter } from '../encoding/bufferwriter.js';
|
|
3
4
|
import { Transaction } from '../transaction/index.js';
|
|
4
|
-
import { BlockHeader, BlockHeaderData, BlockHeaderObject } from './blockheader.js';
|
|
5
|
+
import { BlockHeader, type BlockHeaderData, type BlockHeaderObject } from './blockheader.js';
|
|
6
|
+
import { MerkleBlock } from './merkleblock.js';
|
|
5
7
|
export interface BlockData {
|
|
6
8
|
header?: BlockHeader | BlockHeaderData;
|
|
7
|
-
metadata?: number;
|
|
8
9
|
transactions?: Transaction[];
|
|
9
10
|
}
|
|
10
11
|
export interface BlockObject {
|
|
11
12
|
id: string;
|
|
12
13
|
hash: string;
|
|
13
14
|
header: BlockHeaderObject;
|
|
14
|
-
metadata: number;
|
|
15
15
|
transactions: unknown[];
|
|
16
16
|
}
|
|
17
17
|
export declare class Block {
|
|
18
18
|
static readonly MAX_BLOCK_SIZE: number;
|
|
19
|
-
static readonly
|
|
20
|
-
static readonly NULL_HASH: Buffer<ArrayBuffer>;
|
|
21
|
-
static readonly Values: {
|
|
22
|
-
START_OF_BLOCK: number;
|
|
23
|
-
NULL_HASH: Buffer<ArrayBuffer>;
|
|
24
|
-
};
|
|
19
|
+
static readonly NULL_HASH: Buffer;
|
|
25
20
|
header: BlockHeader;
|
|
26
|
-
metadata: number;
|
|
27
21
|
transactions: Transaction[];
|
|
28
22
|
private _id?;
|
|
29
23
|
constructor(serialized?: BlockData | Block | Buffer | string);
|
|
30
24
|
static shallowCopy(block: Block): Block;
|
|
31
|
-
private static _from;
|
|
32
25
|
static fromObject(obj: BlockData): Block;
|
|
33
26
|
static fromBufferReader(br: BufferReader): Block;
|
|
34
27
|
static fromBuffer(buf: Buffer): Block;
|
|
35
28
|
static fromString(str: string): Block;
|
|
36
29
|
static fromRawBlock(data: Buffer | string): Block;
|
|
37
|
-
private static _fromObject;
|
|
38
|
-
private static _fromBufferReader;
|
|
39
|
-
private _newBlock;
|
|
40
|
-
fromBuffer(buf: Buffer): Block;
|
|
41
|
-
fromString(str: string): Block;
|
|
42
|
-
fromObject(obj: BlockData): Block;
|
|
43
30
|
toObject(): BlockObject;
|
|
44
|
-
toJSON
|
|
31
|
+
toJSON(): BlockObject;
|
|
45
32
|
toBuffer(): Buffer;
|
|
46
33
|
toString(): string;
|
|
47
34
|
toBufferWriter(bw?: BufferWriter): BufferWriter;
|
|
@@ -49,9 +36,14 @@ export declare class Block {
|
|
|
49
36
|
getMerkleTree(): Buffer[];
|
|
50
37
|
getMerkleRoot(): Buffer;
|
|
51
38
|
validMerkleRoot(): boolean;
|
|
52
|
-
|
|
39
|
+
toMerkleBlock(txids: string[]): MerkleBlock;
|
|
53
40
|
get hash(): string;
|
|
54
41
|
get id(): string;
|
|
55
42
|
inspect(): string;
|
|
43
|
+
private static _from;
|
|
44
|
+
private static _fromObject;
|
|
45
|
+
private static _readFromBuffer;
|
|
46
|
+
private _initEmpty;
|
|
47
|
+
private _fromString;
|
|
56
48
|
}
|
|
57
49
|
//# sourceMappingURL=block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../../../lib/bitcore/block/block.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../../../lib/bitcore/block/block.ts"],"names":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AK;IAUrC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK;IAkBjD,QAAQ,IAAI,WAAW;IAavB,MAAM,IAAI,WAAW;IAWrB,QAAQ,IAAI,MAAM;IASlB,QAAQ,IAAI,MAAM;IAalB,cAAc,CAAC,EAAE,CAAC,EAAE,YAAY,GAAG,YAAY;IA8B/C,oBAAoB,IAAI,MAAM,EAAE;IAsBhC,aAAa,IAAI,MAAM,EAAE;IAwBzB,aAAa,IAAI,MAAM;IAUvB,eAAe,IAAI,OAAO;IAgB1B,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW;IAoE3C,IAAI,IAAI,IAAI,MAAM,CAKjB;IAKD,IAAI,EAAE,IAAI,MAAM,CAEf;IAKD,OAAO,IAAI,MAAM;IAWjB,OAAO,CAAC,MAAM,CAAC,KAAK;IAYpB,OAAO,CAAC,MAAM,CAAC,WAAW;IA0B1B,OAAO,CAAC,MAAM,CAAC,eAAe;IA2B9B,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,WAAW;CAMpB"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
import { Buffer } from 'buffer/';
|
|
1
2
|
import { BufferReader } from '../encoding/bufferreader.js';
|
|
2
3
|
import { BufferWriter } from '../encoding/bufferwriter.js';
|
|
3
4
|
import { BN } from '../crypto/bn.js';
|
|
4
5
|
export interface BlockHeaderData {
|
|
5
|
-
prevHash?: Buffer
|
|
6
|
+
prevHash?: Buffer;
|
|
6
7
|
bits?: number;
|
|
7
8
|
time?: number;
|
|
8
|
-
timestamp?: number;
|
|
9
9
|
reserved?: number;
|
|
10
10
|
nonce?: BN;
|
|
11
11
|
version?: number;
|
|
12
12
|
size?: BN;
|
|
13
13
|
height?: number;
|
|
14
|
-
epochBlock?: Buffer
|
|
15
|
-
merkleRoot?: Buffer
|
|
16
|
-
extendedMetadata?: Buffer
|
|
14
|
+
epochBlock?: Buffer;
|
|
15
|
+
merkleRoot?: Buffer;
|
|
16
|
+
extendedMetadata?: Buffer;
|
|
17
17
|
hash?: string;
|
|
18
18
|
}
|
|
19
19
|
export interface BlockHeaderObject {
|
|
@@ -31,52 +31,50 @@ export interface BlockHeaderObject {
|
|
|
31
31
|
extendedMetadata: string;
|
|
32
32
|
}
|
|
33
33
|
export declare class BlockHeader {
|
|
34
|
+
static readonly START_OF_HEADER = 0;
|
|
35
|
+
static readonly MAX_TIME_OFFSET: number;
|
|
36
|
+
static readonly LARGEST_HASH: BN;
|
|
37
|
+
static readonly HEADER_SIZE = 160;
|
|
38
|
+
static readonly EPOCH_NUM_BLOCKS = 5040;
|
|
34
39
|
static readonly Constants: {
|
|
35
40
|
START_OF_HEADER: number;
|
|
36
41
|
MAX_TIME_OFFSET: number;
|
|
37
42
|
LARGEST_HASH: BN;
|
|
38
43
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
epochBlock: Buffer;
|
|
52
|
-
merkleRoot: Buffer;
|
|
53
|
-
extendedMetadata: Buffer;
|
|
44
|
+
readonly prevHash: Buffer;
|
|
45
|
+
readonly bits: number;
|
|
46
|
+
readonly time: number;
|
|
47
|
+
readonly timestamp: number;
|
|
48
|
+
readonly reserved: number;
|
|
49
|
+
readonly nonce: BN;
|
|
50
|
+
readonly version: number;
|
|
51
|
+
readonly size: BN;
|
|
52
|
+
readonly height: number;
|
|
53
|
+
readonly epochBlock: Buffer;
|
|
54
|
+
readonly merkleRoot: Buffer;
|
|
55
|
+
readonly extendedMetadata: Buffer;
|
|
54
56
|
private _id?;
|
|
55
57
|
constructor(arg?: BlockHeaderData | BlockHeader);
|
|
56
|
-
|
|
57
|
-
private static _fromObject;
|
|
58
|
-
static fromObject(obj: BlockHeaderData): BlockHeader;
|
|
58
|
+
static fromObject(obj: BlockHeaderObject): BlockHeader;
|
|
59
59
|
static fromRawBlock(data: Buffer | string): BlockHeader;
|
|
60
60
|
static fromBuffer(buf: Buffer): BlockHeader;
|
|
61
61
|
static fromString(str: string): BlockHeader;
|
|
62
|
-
private static _fromBufferReader;
|
|
63
62
|
static fromBufferReader(br: BufferReader): BlockHeader;
|
|
64
63
|
toObject(): BlockHeaderObject;
|
|
65
|
-
toJSON
|
|
64
|
+
toJSON(): BlockHeaderObject;
|
|
66
65
|
toBuffer(): Buffer;
|
|
67
66
|
toString(): string;
|
|
68
67
|
toBufferWriter(bw?: BufferWriter): BufferWriter;
|
|
69
|
-
getTargetDifficulty(bits?: number): BN;
|
|
70
|
-
getDifficulty(): number;
|
|
71
|
-
private _getHash;
|
|
72
|
-
private _timeToBytes;
|
|
73
|
-
private _sizeToBytes;
|
|
74
|
-
private _getLayer3Hash;
|
|
75
|
-
private _getLayer2Hash;
|
|
76
68
|
get hash(): string;
|
|
77
69
|
get id(): string;
|
|
70
|
+
getTargetDifficulty(bits?: number): BN;
|
|
71
|
+
getDifficulty(): number;
|
|
78
72
|
validTimestamp(): boolean;
|
|
79
73
|
validProofOfWork(): boolean;
|
|
80
74
|
inspect(): string;
|
|
75
|
+
private _computeHash;
|
|
76
|
+
private static _normalizeData;
|
|
77
|
+
private static _defaultData;
|
|
78
|
+
private static _readFromBuffer;
|
|
81
79
|
}
|
|
82
80
|
//# sourceMappingURL=blockheader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockheader.d.ts","sourceRoot":"","sources":["../../../../../lib/bitcore/block/blockheader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blockheader.d.ts","sourceRoot":"","sources":["../../../../../lib/bitcore/block/blockheader.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAGhC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,M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