utxo-lib 1.1.5 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of utxo-lib might be problematic. Click here for more details.
- package/index.js +47 -0
- package/package.json +6 -80
- package/LICENSE +0 -21
- package/README.md +0 -59
- package/dist/src/address.d.ts +0 -11
- package/dist/src/address.d.ts.map +0 -1
- package/dist/src/address.js +0 -37
- package/dist/src/addressFormat.d.ts +0 -53
- package/dist/src/addressFormat.d.ts.map +0 -1
- package/dist/src/addressFormat.js +0 -110
- package/dist/src/bitgo/Musig2.d.ts +0 -51
- package/dist/src/bitgo/Musig2.d.ts.map +0 -1
- package/dist/src/bitgo/Musig2.js +0 -175
- package/dist/src/bitgo/Unspent.d.ts +0 -95
- package/dist/src/bitgo/Unspent.d.ts.map +0 -1
- package/dist/src/bitgo/Unspent.js +0 -138
- package/dist/src/bitgo/UtxoPsbt.d.ts +0 -132
- package/dist/src/bitgo/UtxoPsbt.d.ts.map +0 -1
- package/dist/src/bitgo/UtxoPsbt.js +0 -469
- package/dist/src/bitgo/UtxoTransaction.d.ts +0 -22
- package/dist/src/bitgo/UtxoTransaction.d.ts.map +0 -1
- package/dist/src/bitgo/UtxoTransaction.js +0 -97
- package/dist/src/bitgo/UtxoTransactionBuilder.d.ts +0 -26
- package/dist/src/bitgo/UtxoTransactionBuilder.d.ts.map +0 -1
- package/dist/src/bitgo/UtxoTransactionBuilder.js +0 -67
- package/dist/src/bitgo/bbc/DashPsbt.d.ts +0 -12
- package/dist/src/bitgo/bbc/DashPsbt.d.ts.map +0 -1
- package/dist/src/bitgo/bbc/DashPsbt.js +0 -27
- package/dist/src/bitgo/bbc/DashTransaction.d.ts +0 -39
- package/dist/src/bitgo/bbc/DashTransaction.d.ts.map +0 -1
- package/dist/src/bitgo/bbc/DashTransaction.js +0 -109
- package/dist/src/bitgo/bbc/DashTransactionBuilder.d.ts +0 -14
- package/dist/src/bitgo/bbc/DashTransactionBuilder.d.ts.map +0 -1
- package/dist/src/bitgo/bbc/DashTransactionBuilder.js +0 -28
- package/dist/src/bitgo/bbc/index.d.ts +0 -4
- package/dist/src/bitgo/bbc/index.d.ts.map +0 -1
- package/dist/src/bitgo/bbc/index.js +0 -16
- package/dist/src/bitgo/bitcoincash/address.d.ts +0 -35
- package/dist/src/bitgo/bitcoincash/address.d.ts.map +0 -1
- package/dist/src/bitgo/bitcoincash/address.js +0 -151
- package/dist/src/bitgo/bitcoincash/index.d.ts +0 -2
- package/dist/src/bitgo/bitcoincash/index.d.ts.map +0 -1
- package/dist/src/bitgo/bitcoincash/index.js +0 -14
- package/dist/src/bitgo/dash/DashPsbt.d.ts +0 -12
- package/dist/src/bitgo/dash/DashPsbt.d.ts.map +0 -1
- package/dist/src/bitgo/dash/DashPsbt.js +0 -27
- package/dist/src/bitgo/dash/DashTransaction.d.ts +0 -39
- package/dist/src/bitgo/dash/DashTransaction.d.ts.map +0 -1
- package/dist/src/bitgo/dash/DashTransaction.js +0 -109
- package/dist/src/bitgo/dash/DashTransactionBuilder.d.ts +0 -14
- package/dist/src/bitgo/dash/DashTransactionBuilder.d.ts.map +0 -1
- package/dist/src/bitgo/dash/DashTransactionBuilder.js +0 -28
- package/dist/src/bitgo/dash/index.d.ts +0 -4
- package/dist/src/bitgo/dash/index.d.ts.map +0 -1
- package/dist/src/bitgo/dash/index.js +0 -16
- package/dist/src/bitgo/index.d.ts +0 -17
- package/dist/src/bitgo/index.d.ts.map +0 -1
- package/dist/src/bitgo/index.js +0 -30
- package/dist/src/bitgo/keyutil.d.ts +0 -17
- package/dist/src/bitgo/keyutil.d.ts.map +0 -1
- package/dist/src/bitgo/keyutil.js +0 -37
- package/dist/src/bitgo/nonStandardHalfSigned.d.ts +0 -7
- package/dist/src/bitgo/nonStandardHalfSigned.d.ts.map +0 -1
- package/dist/src/bitgo/nonStandardHalfSigned.js +0 -56
- package/dist/src/bitgo/outputScripts.d.ts +0 -84
- package/dist/src/bitgo/outputScripts.d.ts.map +0 -1
- package/dist/src/bitgo/outputScripts.js +0 -297
- package/dist/src/bitgo/parseInput.d.ts +0 -92
- package/dist/src/bitgo/parseInput.d.ts.map +0 -1
- package/dist/src/bitgo/parseInput.js +0 -344
- package/dist/src/bitgo/psbt/fromHalfSigned.d.ts +0 -24
- package/dist/src/bitgo/psbt/fromHalfSigned.d.ts.map +0 -1
- package/dist/src/bitgo/psbt/fromHalfSigned.js +0 -91
- package/dist/src/bitgo/psbt/scriptTypes.d.ts +0 -6
- package/dist/src/bitgo/psbt/scriptTypes.d.ts.map +0 -1
- package/dist/src/bitgo/psbt/scriptTypes.js +0 -23
- package/dist/src/bitgo/signature.d.ts +0 -84
- package/dist/src/bitgo/signature.d.ts.map +0 -1
- package/dist/src/bitgo/signature.js +0 -222
- package/dist/src/bitgo/tnumber.d.ts +0 -9
- package/dist/src/bitgo/tnumber.d.ts.map +0 -1
- package/dist/src/bitgo/tnumber.js +0 -31
- package/dist/src/bitgo/transaction.d.ts +0 -29
- package/dist/src/bitgo/transaction.d.ts.map +0 -1
- package/dist/src/bitgo/transaction.js +0 -231
- package/dist/src/bitgo/types.d.ts +0 -5
- package/dist/src/bitgo/types.d.ts.map +0 -1
- package/dist/src/bitgo/types.js +0 -12
- package/dist/src/bitgo/wallet/Psbt.d.ts +0 -47
- package/dist/src/bitgo/wallet/Psbt.d.ts.map +0 -1
- package/dist/src/bitgo/wallet/Psbt.js +0 -232
- package/dist/src/bitgo/wallet/Unspent.d.ts +0 -47
- package/dist/src/bitgo/wallet/Unspent.d.ts.map +0 -1
- package/dist/src/bitgo/wallet/Unspent.js +0 -154
- package/dist/src/bitgo/wallet/WalletKeys.d.ts +0 -72
- package/dist/src/bitgo/wallet/WalletKeys.d.ts.map +0 -1
- package/dist/src/bitgo/wallet/WalletKeys.js +0 -104
- package/dist/src/bitgo/wallet/WalletOutput.d.ts +0 -18
- package/dist/src/bitgo/wallet/WalletOutput.d.ts.map +0 -1
- package/dist/src/bitgo/wallet/WalletOutput.js +0 -69
- package/dist/src/bitgo/wallet/WalletScripts.d.ts +0 -7
- package/dist/src/bitgo/wallet/WalletScripts.d.ts.map +0 -1
- package/dist/src/bitgo/wallet/WalletScripts.js +0 -15
- package/dist/src/bitgo/wallet/WalletUnspentSigner.d.ts +0 -19
- package/dist/src/bitgo/wallet/WalletUnspentSigner.d.ts.map +0 -1
- package/dist/src/bitgo/wallet/WalletUnspentSigner.js +0 -47
- package/dist/src/bitgo/wallet/chains.d.ts +0 -57
- package/dist/src/bitgo/wallet/chains.d.ts.map +0 -1
- package/dist/src/bitgo/wallet/chains.js +0 -106
- package/dist/src/bitgo/wallet/index.d.ts +0 -8
- package/dist/src/bitgo/wallet/index.d.ts.map +0 -1
- package/dist/src/bitgo/wallet/index.js +0 -20
- package/dist/src/bitgo/zcash/ZcashBufferutils.d.ts +0 -26
- package/dist/src/bitgo/zcash/ZcashBufferutils.d.ts.map +0 -1
- package/dist/src/bitgo/zcash/ZcashBufferutils.js +0 -157
- package/dist/src/bitgo/zcash/ZcashPsbt.d.ts +0 -36
- package/dist/src/bitgo/zcash/ZcashPsbt.d.ts.map +0 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.js +0 -146
- package/dist/src/bitgo/zcash/ZcashTransaction.d.ts +0 -61
- package/dist/src/bitgo/zcash/ZcashTransaction.d.ts.map +0 -1
- package/dist/src/bitgo/zcash/ZcashTransaction.js +0 -341
- package/dist/src/bitgo/zcash/ZcashTransactionBuilder.d.ts +0 -21
- package/dist/src/bitgo/zcash/ZcashTransactionBuilder.d.ts.map +0 -1
- package/dist/src/bitgo/zcash/ZcashTransactionBuilder.js +0 -105
- package/dist/src/bitgo/zcash/address.d.ts +0 -8
- package/dist/src/bitgo/zcash/address.d.ts.map +0 -1
- package/dist/src/bitgo/zcash/address.js +0 -57
- package/dist/src/bitgo/zcash/hashZip0244.d.ts +0 -27
- package/dist/src/bitgo/zcash/hashZip0244.d.ts.map +0 -1
- package/dist/src/bitgo/zcash/hashZip0244.js +0 -184
- package/dist/src/bitgo/zcash/index.d.ts +0 -4
- package/dist/src/bitgo/zcash/index.d.ts.map +0 -1
- package/dist/src/bitgo/zcash/index.js +0 -16
- package/dist/src/classify.d.ts +0 -19
- package/dist/src/classify.d.ts.map +0 -1
- package/dist/src/classify.js +0 -89
- package/dist/src/index.d.ts +0 -13
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -36
- package/dist/src/networks.d.ts +0 -115
- package/dist/src/networks.d.ts.map +0 -1
- package/dist/src/networks.js +0 -458
- package/dist/src/noble_ecc.d.ts +0 -28
- package/dist/src/noble_ecc.d.ts.map +0 -1
- package/dist/src/noble_ecc.js +0 -168
- package/dist/src/payments/index.d.ts +0 -4
- package/dist/src/payments/index.d.ts.map +0 -1
- package/dist/src/payments/index.js +0 -8
- package/dist/src/payments/p2tr.d.ts +0 -3
- package/dist/src/payments/p2tr.d.ts.map +0 -1
- package/dist/src/payments/p2tr.js +0 -348
- package/dist/src/payments/p2tr_ns.d.ts +0 -3
- package/dist/src/payments/p2tr_ns.d.ts.map +0 -1
- package/dist/src/payments/p2tr_ns.js +0 -134
- package/dist/src/taproot.d.ts +0 -141
- package/dist/src/taproot.d.ts.map +0 -1
- package/dist/src/taproot.js +0 -384
- package/dist/src/templates/multisig/index.d.ts +0 -4
- package/dist/src/templates/multisig/index.d.ts.map +0 -1
- package/dist/src/templates/multisig/index.js +0 -8
- package/dist/src/templates/multisig/input.d.ts +0 -7
- package/dist/src/templates/multisig/input.d.ts.map +0 -1
- package/dist/src/templates/multisig/input.js +0 -25
- package/dist/src/templates/multisig/output.d.ts +0 -7
- package/dist/src/templates/multisig/output.d.ts.map +0 -1
- package/dist/src/templates/multisig/output.js +0 -38
- package/dist/src/templates/nulldata.d.ts +0 -10
- package/dist/src/templates/nulldata.d.ts.map +0 -1
- package/dist/src/templates/nulldata.js +0 -17
- package/dist/src/templates/pubkey/index.d.ts +0 -4
- package/dist/src/templates/pubkey/index.d.ts.map +0 -1
- package/dist/src/templates/pubkey/index.js +0 -8
- package/dist/src/templates/pubkey/input.d.ts +0 -7
- package/dist/src/templates/pubkey/input.d.ts.map +0 -1
- package/dist/src/templates/pubkey/input.js +0 -14
- package/dist/src/templates/pubkey/output.d.ts +0 -7
- package/dist/src/templates/pubkey/output.d.ts.map +0 -1
- package/dist/src/templates/pubkey/output.js +0 -15
- package/dist/src/templates/pubkeyhash/index.d.ts +0 -4
- package/dist/src/templates/pubkeyhash/index.d.ts.map +0 -1
- package/dist/src/templates/pubkeyhash/index.js +0 -8
- package/dist/src/templates/pubkeyhash/input.d.ts +0 -7
- package/dist/src/templates/pubkeyhash/input.d.ts.map +0 -1
- package/dist/src/templates/pubkeyhash/input.js +0 -16
- package/dist/src/templates/pubkeyhash/output.d.ts +0 -6
- package/dist/src/templates/pubkeyhash/output.d.ts.map +0 -1
- package/dist/src/templates/pubkeyhash/output.js +0 -20
- package/dist/src/templates/scripthash/index.d.ts +0 -4
- package/dist/src/templates/scripthash/index.d.ts.map +0 -1
- package/dist/src/templates/scripthash/index.js +0 -8
- package/dist/src/templates/scripthash/input.d.ts +0 -6
- package/dist/src/templates/scripthash/input.d.ts.map +0 -1
- package/dist/src/templates/scripthash/input.js +0 -43
- package/dist/src/templates/scripthash/output.d.ts +0 -6
- package/dist/src/templates/scripthash/output.d.ts.map +0 -1
- package/dist/src/templates/scripthash/output.js +0 -15
- package/dist/src/templates/taproot/index.d.ts +0 -4
- package/dist/src/templates/taproot/index.d.ts.map +0 -1
- package/dist/src/templates/taproot/index.js +0 -8
- package/dist/src/templates/taproot/input.d.ts +0 -6
- package/dist/src/templates/taproot/input.d.ts.map +0 -1
- package/dist/src/templates/taproot/input.js +0 -23
- package/dist/src/templates/taproot/output.d.ts +0 -6
- package/dist/src/templates/taproot/output.d.ts.map +0 -1
- package/dist/src/templates/taproot/output.js +0 -15
- package/dist/src/templates/taprootnofn/index.d.ts +0 -4
- package/dist/src/templates/taprootnofn/index.d.ts.map +0 -1
- package/dist/src/templates/taprootnofn/index.js +0 -8
- package/dist/src/templates/taprootnofn/input.d.ts +0 -7
- package/dist/src/templates/taprootnofn/input.d.ts.map +0 -1
- package/dist/src/templates/taprootnofn/input.js +0 -24
- package/dist/src/templates/taprootnofn/output.d.ts +0 -7
- package/dist/src/templates/taprootnofn/output.d.ts.map +0 -1
- package/dist/src/templates/taprootnofn/output.js +0 -28
- package/dist/src/templates/witnesscommitment/index.d.ts +0 -3
- package/dist/src/templates/witnesscommitment/index.d.ts.map +0 -1
- package/dist/src/templates/witnesscommitment/index.js +0 -6
- package/dist/src/templates/witnesscommitment/output.d.ts +0 -8
- package/dist/src/templates/witnesscommitment/output.d.ts.map +0 -1
- package/dist/src/templates/witnesscommitment/output.js +0 -31
- package/dist/src/templates/witnesspubkeyhash/index.d.ts +0 -4
- package/dist/src/templates/witnesspubkeyhash/index.d.ts.map +0 -1
- package/dist/src/templates/witnesspubkeyhash/index.js +0 -8
- package/dist/src/templates/witnesspubkeyhash/input.d.ts +0 -7
- package/dist/src/templates/witnesspubkeyhash/input.d.ts.map +0 -1
- package/dist/src/templates/witnesspubkeyhash/input.js +0 -19
- package/dist/src/templates/witnesspubkeyhash/output.d.ts +0 -6
- package/dist/src/templates/witnesspubkeyhash/output.d.ts.map +0 -1
- package/dist/src/templates/witnesspubkeyhash/output.js +0 -15
- package/dist/src/templates/witnessscripthash/index.d.ts +0 -4
- package/dist/src/templates/witnessscripthash/index.d.ts.map +0 -1
- package/dist/src/templates/witnessscripthash/index.js +0 -8
- package/dist/src/templates/witnessscripthash/input.d.ts +0 -6
- package/dist/src/templates/witnessscripthash/input.d.ts.map +0 -1
- package/dist/src/templates/witnessscripthash/input.js +0 -35
- package/dist/src/templates/witnessscripthash/output.d.ts +0 -6
- package/dist/src/templates/witnessscripthash/output.d.ts.map +0 -1
- package/dist/src/templates/witnessscripthash/output.js +0 -15
- package/dist/src/testutil/index.d.ts +0 -3
- package/dist/src/testutil/index.d.ts.map +0 -1
- package/dist/src/testutil/index.js +0 -15
- package/dist/src/testutil/keys.d.ts +0 -10
- package/dist/src/testutil/keys.d.ts.map +0 -1
- package/dist/src/testutil/keys.js +0 -40
- package/dist/src/testutil/mock.d.ts +0 -21
- package/dist/src/testutil/mock.d.ts.map +0 -1
- package/dist/src/testutil/mock.js +0 -86
- package/dist/src/transaction_builder.d.ts +0 -47
- package/dist/src/transaction_builder.d.ts.map +0 -1
- package/dist/src/transaction_builder.js +0 -1084
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/templates/pubkey/input.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAG/B,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAIrD;yBAJe,KAAK"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// {signature}
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
function check(script) {
|
7
|
-
const chunks = __1.script.decompile(script);
|
8
|
-
return chunks.length === 1 && __1.script.isCanonicalScriptSignature(chunks[0]);
|
9
|
-
}
|
10
|
-
exports.check = check;
|
11
|
-
check.toJSON = () => {
|
12
|
-
return 'pubKey input';
|
13
|
-
};
|
14
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3B1YmtleS9pbnB1dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsY0FBYzs7O0FBR2QsOEJBQTJDO0FBRTNDLFNBQWdCLEtBQUssQ0FBQyxNQUFzQjtJQUMxQyxNQUFNLE1BQU0sR0FBRyxVQUFPLENBQUMsU0FBUyxDQUFDLE1BQU0sQ0FBVSxDQUFDO0lBRWxELE9BQU8sTUFBTSxDQUFDLE1BQU0sS0FBSyxDQUFDLElBQUksVUFBTyxDQUFDLDBCQUEwQixDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQVcsQ0FBQyxDQUFDO0FBQ3hGLENBQUM7QUFKRCxzQkFJQztBQUNELEtBQUssQ0FBQyxNQUFNLEdBQUcsR0FBVyxFQUFFO0lBQzFCLE9BQU8sY0FBYyxDQUFDO0FBQ3hCLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8vIHtzaWduYXR1cmV9XG5cbmltcG9ydCB7IFN0YWNrIH0gZnJvbSAnLi4vLi4vJztcbmltcG9ydCB7IHNjcmlwdCBhcyBic2NyaXB0IH0gZnJvbSAnLi4vLi4vJztcblxuZXhwb3J0IGZ1bmN0aW9uIGNoZWNrKHNjcmlwdDogQnVmZmVyIHwgU3RhY2spOiBib29sZWFuIHtcbiAgY29uc3QgY2h1bmtzID0gYnNjcmlwdC5kZWNvbXBpbGUoc2NyaXB0KSBhcyBTdGFjaztcblxuICByZXR1cm4gY2h1bmtzLmxlbmd0aCA9PT0gMSAmJiBic2NyaXB0LmlzQ2Fub25pY2FsU2NyaXB0U2lnbmF0dXJlKGNodW5rc1swXSBhcyBCdWZmZXIpO1xufVxuY2hlY2sudG9KU09OID0gKCk6IHN0cmluZyA9PiB7XG4gIHJldHVybiAncHViS2V5IGlucHV0Jztcbn07XG4iXX0=
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/templates/pubkey/output.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAI/B,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAIrD;yBAJe,KAAK"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// {pubKey} OP_CHECKSIG
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
const __2 = require("../../");
|
7
|
-
function check(script) {
|
8
|
-
const chunks = __1.script.decompile(script);
|
9
|
-
return chunks.length === 2 && __1.script.isCanonicalPubKey(chunks[0]) && chunks[1] === __2.opcodes.OP_CHECKSIG;
|
10
|
-
}
|
11
|
-
exports.check = check;
|
12
|
-
check.toJSON = () => {
|
13
|
-
return 'pubKey output';
|
14
|
-
};
|
15
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0cHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3RlbXBsYXRlcy9wdWJrZXkvb3V0cHV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSx1QkFBdUI7OztBQUd2Qiw4QkFBMkM7QUFDM0MsOEJBQWlDO0FBRWpDLFNBQWdCLEtBQUssQ0FBQyxNQUFzQjtJQUMxQyxNQUFNLE1BQU0sR0FBRyxVQUFPLENBQUMsU0FBUyxDQUFDLE1BQU0sQ0FBVSxDQUFDO0lBRWxELE9BQU8sTUFBTSxDQUFDLE1BQU0sS0FBSyxDQUFDLElBQUksVUFBTyxDQUFDLGlCQUFpQixDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQVcsQ0FBQyxJQUFJLE1BQU0sQ0FBQyxDQUFDLENBQUMsS0FBSyxXQUFPLENBQUMsV0FBVyxDQUFDO0FBQ3BILENBQUM7QUFKRCxzQkFJQztBQUNELEtBQUssQ0FBQyxNQUFNLEdBQUcsR0FBVyxFQUFFO0lBQzFCLE9BQU8sZUFBZSxDQUFDO0FBQ3pCLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8vIHtwdWJLZXl9IE9QX0NIRUNLU0lHXG5cbmltcG9ydCB7IFN0YWNrIH0gZnJvbSAnLi4vLi4vJztcbmltcG9ydCB7IHNjcmlwdCBhcyBic2NyaXB0IH0gZnJvbSAnLi4vLi4vJztcbmltcG9ydCB7IG9wY29kZXMgfSBmcm9tICcuLi8uLi8nO1xuXG5leHBvcnQgZnVuY3Rpb24gY2hlY2soc2NyaXB0OiBCdWZmZXIgfCBTdGFjayk6IGJvb2xlYW4ge1xuICBjb25zdCBjaHVua3MgPSBic2NyaXB0LmRlY29tcGlsZShzY3JpcHQpIGFzIFN0YWNrO1xuXG4gIHJldHVybiBjaHVua3MubGVuZ3RoID09PSAyICYmIGJzY3JpcHQuaXNDYW5vbmljYWxQdWJLZXkoY2h1bmtzWzBdIGFzIEJ1ZmZlcikgJiYgY2h1bmtzWzFdID09PSBvcGNvZGVzLk9QX0NIRUNLU0lHO1xufVxuY2hlY2sudG9KU09OID0gKCk6IHN0cmluZyA9PiB7XG4gIHJldHVybiAncHViS2V5IG91dHB1dCc7XG59O1xuIl19
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/pubkeyhash/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.output = exports.input = void 0;
|
4
|
-
const input = require("./input");
|
5
|
-
exports.input = input;
|
6
|
-
const output = require("./output");
|
7
|
-
exports.output = output;
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3B1YmtleWhhc2gvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUNBQWlDO0FBR3hCLHNCQUFLO0FBRmQsbUNBQW1DO0FBRW5CLHdCQUFNIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgaW5wdXQgZnJvbSAnLi9pbnB1dCc7XG5pbXBvcnQgKiBhcyBvdXRwdXQgZnJvbSAnLi9vdXRwdXQnO1xuXG5leHBvcnQgeyBpbnB1dCwgb3V0cHV0IH07XG4iXX0=
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/templates/pubkeyhash/input.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAG/B,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAQrD;yBARe,KAAK"}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// {signature} {pubKey}
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
function check(script) {
|
7
|
-
const chunks = __1.script.decompile(script);
|
8
|
-
return (chunks.length === 2 &&
|
9
|
-
__1.script.isCanonicalScriptSignature(chunks[0]) &&
|
10
|
-
__1.script.isCanonicalPubKey(chunks[1]));
|
11
|
-
}
|
12
|
-
exports.check = check;
|
13
|
-
check.toJSON = () => {
|
14
|
-
return 'pubKeyHash input';
|
15
|
-
};
|
16
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3B1YmtleWhhc2gvaW5wdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHVCQUF1Qjs7O0FBR3ZCLDhCQUEyQztBQUUzQyxTQUFnQixLQUFLLENBQUMsTUFBc0I7SUFDMUMsTUFBTSxNQUFNLEdBQ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-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/templates/pubkeyhash/output.ts"],"names":[],"mappings":";AAKA,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAWtE;yBAXe,KAAK"}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// OP_DUP OP_HASH160 {pubKeyHash} OP_EQUALVERIFY OP_CHECKSIG
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
const __2 = require("../../");
|
7
|
-
function check(script) {
|
8
|
-
const buffer = __1.script.compile(script);
|
9
|
-
return (buffer.length === 25 &&
|
10
|
-
buffer[0] === __2.opcodes.OP_DUP &&
|
11
|
-
buffer[1] === __2.opcodes.OP_HASH160 &&
|
12
|
-
buffer[2] === 0x14 &&
|
13
|
-
buffer[23] === __2.opcodes.OP_EQUALVERIFY &&
|
14
|
-
buffer[24] === __2.opcodes.OP_CHECKSIG);
|
15
|
-
}
|
16
|
-
exports.check = check;
|
17
|
-
check.toJSON = () => {
|
18
|
-
return 'pubKeyHash output';
|
19
|
-
};
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0cHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3RlbXBsYXRlcy9wdWJrZXloYXNoL291dHB1dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsNERBQTREOzs7QUFFNUQsOEJBQTJDO0FBQzNDLDhCQUFpQztBQUVqQyxTQUFnQixLQUFLLENBQUMsTUFBdUM7SUFDM0QsTUFBTSxNQUFNLEdBQUcsVUFBTyxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQztJQUV2QyxPQUFPLENBQ0wsTUF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IGJ1ZmZlclsyM10gPT09IG9wY29kZXMuT1BfRVFVQUxWRVJJRlkgJiZcbiAgICBidWZmZXJbMjRdID09PSBvcGNvZGVzLk9QX0NIRUNLU0lHXG4gICk7XG59XG5jaGVjay50b0pTT04gPSAoKTogc3RyaW5nID0+IHtcbiAgcmV0dXJuICdwdWJLZXlIYXNoIG91dHB1dCc7XG59O1xuIl19
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/scripthash/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.output = exports.input = void 0;
|
4
|
-
const input = require("./input");
|
5
|
-
exports.input = input;
|
6
|
-
const output = require("./output");
|
7
|
-
exports.output = output;
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3NjcmlwdGhhc2gvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUNBQWlDO0FBR3hCLHNCQUFLO0FBRmQsbUNBQW1DO0FBRW5CLHdCQUFNIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgaW5wdXQgZnJvbSAnLi9pbnB1dCc7XG5pbXBvcnQgKiBhcyBvdXRwdXQgZnJvbSAnLi9vdXRwdXQnO1xuXG5leHBvcnQgeyBpbnB1dCwgb3V0cHV0IH07XG4iXX0=
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/templates/scripthash/input.ts"],"names":[],"mappings":";AASA,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,eAAe,CAAC,EAAE,OAAO,GAAG,OAAO,CA6BjG;yBA7Be,KAAK"}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// <scriptSig> {serialized scriptPubKey script}
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
const p2ms = require("../multisig");
|
7
|
-
const p2pk = require("../pubkey");
|
8
|
-
const p2pkh = require("../pubkeyhash");
|
9
|
-
const p2wpkho = require("../witnesspubkeyhash/output");
|
10
|
-
const p2wsho = require("../witnessscripthash/output");
|
11
|
-
function check(script, allowIncomplete) {
|
12
|
-
const chunks = __1.script.decompile(script);
|
13
|
-
if (chunks.length < 1)
|
14
|
-
return false;
|
15
|
-
const lastChunk = chunks[chunks.length - 1];
|
16
|
-
if (!Buffer.isBuffer(lastChunk))
|
17
|
-
return false;
|
18
|
-
const scriptSigChunks = __1.script.decompile(__1.script.compile(chunks.slice(0, -1)));
|
19
|
-
const redeemScriptChunks = __1.script.decompile(lastChunk);
|
20
|
-
// is redeemScript a valid script?
|
21
|
-
if (!redeemScriptChunks)
|
22
|
-
return false;
|
23
|
-
// is redeemScriptSig push only?
|
24
|
-
if (!__1.script.isPushOnly(scriptSigChunks))
|
25
|
-
return false;
|
26
|
-
// is witness?
|
27
|
-
if (chunks.length === 1) {
|
28
|
-
return p2wsho.check(redeemScriptChunks) || p2wpkho.check(redeemScriptChunks);
|
29
|
-
}
|
30
|
-
// match types
|
31
|
-
if (p2pkh.input.check(scriptSigChunks) && p2pkh.output.check(redeemScriptChunks))
|
32
|
-
return true;
|
33
|
-
if (p2ms.input.check(scriptSigChunks, allowIncomplete) && p2ms.output.check(redeemScriptChunks))
|
34
|
-
return true;
|
35
|
-
if (p2pk.input.check(scriptSigChunks) && p2pk.output.check(redeemScriptChunks))
|
36
|
-
return true;
|
37
|
-
return false;
|
38
|
-
}
|
39
|
-
exports.check = check;
|
40
|
-
check.toJSON = () => {
|
41
|
-
return 'scriptHash input';
|
42
|
-
};
|
43
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3NjcmlwdGhhc2gvaW5wdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtDQUErQzs7O0FBRS9DLDhCQUEyQztBQUMzQyxvQ0FBb0M7QUFDcEMsa0NBQWtDO0FBQ2xDLHVDQUF1QztBQUN2Qyx1REFBdUQ7QUFDdkQsc0RBQXNEO0FBRXRELFNBQWdCLEtBQUssQ0FBQyxNQUF1QyxFQUFFLGVBQXlCO0lBQ3RGLE1BQU0sTUFBTSxHQUFHLFVBQU8sQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFFLENBQUM7SUFDMUMsSUFBSSxNQUFNLENBQUMsTUFBTSxHQUFHLENBQUM7UUFBRSxPQUFPLEtBQUssQ0FBQztJQUVwQyxNQUFNLFNBQVMsR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQztJQUM1QyxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxTQUFTLENBQUM7UUFBRSxPQUFPLEtBQUssQ0FBQztJQUU5QyxNQUFNLGVBQWUsR0FBRyxVQUFPLENBQUMsU0FBUyxDQUFDLFVBQU8sQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFFLENBQUM7SUFDakYsTUFBTSxrQkFBa0IsR0F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gLy8gaXMgcmVkZWVtU2NyaXB0IGEgdmFsaWQgc2NyaXB0P1xuICBpZiAoIXJlZGVlbVNjcmlwdENodW5rcykgcmV0dXJuIGZhbHNlO1xuXG4gIC8vIGlzIHJlZGVlbVNjcmlwdFNpZyBwdXNoIG9ubHk/XG4gIGlmICghYnNjcmlwdC5pc1B1c2hPbmx5KHNjcmlwdFNpZ0NodW5rcykpIHJldHVybiBmYWxzZTtcblxuICAvLyBpcyB3aXRuZXNzP1xuICBpZiAoY2h1bmtzLmxlbmd0aCA9PT0gMSkge1xuICAgIHJldHVybiBwMndzaG8uY2hlY2socmVkZWVtU2NyaXB0Q2h1bmtzKSB8fCBwMndwa2hvLmNoZWNrKHJlZGVlbVNjcmlwdENodW5rcyk7XG4gIH1cblxuICAvLyBtYXRjaCB0eXBlc1xuICBpZiAocDJwa2guaW5wdXQuY2hlY2soc2NyaXB0U2lnQ2h1bmtzKSAmJiBwMnBraC5vdXRwdXQuY2hlY2socmVkZWVtU2NyaXB0Q2h1bmtzKSkgcmV0dXJuIHRydWU7XG5cbiAgaWYgKHAybXMuaW5wdXQuY2hlY2soc2NyaXB0U2lnQ2h1bmtzLCBhbGxvd0luY29tcGxldGUpICYmIHAybXMub3V0cHV0LmNoZWNrKHJlZGVlbVNjcmlwdENodW5rcykpIHJldHVybiB0cnVlO1xuXG4gIGlmIChwMnBrLmlucHV0LmNoZWNrKHNjcmlwdFNpZ0NodW5rcykgJiYgcDJway5vdXRwdXQuY2hlY2socmVkZWVtU2NyaXB0Q2h1bmtzKSkgcmV0dXJuIHRydWU7XG5cbiAgcmV0dXJuIGZhbHNlO1xufVxuY2hlY2sudG9KU09OID0gKCk6IHN0cmluZyA9PiB7XG4gIHJldHVybiAnc2NyaXB0SGFzaCBpbnB1dCc7XG59O1xuIl19
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/templates/scripthash/output.ts"],"names":[],"mappings":";AAKA,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAMtE;yBANe,KAAK"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// OP_HASH160 {scriptHash} OP_EQUAL
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
const __2 = require("../../");
|
7
|
-
function check(script) {
|
8
|
-
const buffer = __1.script.compile(script);
|
9
|
-
return (buffer.length === 23 && buffer[0] === __2.opcodes.OP_HASH160 && buffer[1] === 0x14 && buffer[22] === __2.opcodes.OP_EQUAL);
|
10
|
-
}
|
11
|
-
exports.check = check;
|
12
|
-
check.toJSON = () => {
|
13
|
-
return 'scriptHash output';
|
14
|
-
};
|
15
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0cHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3RlbXBsYXRlcy9zY3JpcHRoYXNoL291dHB1dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsbUNBQW1DOzs7QUFFbkMsOEJBQTJDO0FBQzNDLDhCQUFpQztBQUVqQyxTQUFnQixLQUFLLENBQUMsTUFBdUM7SUFDM0QsTUFBTSxNQUFNLEdBQUcsVUFBTyxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQztJQUV2QyxPQUFPLENBQ0wsTUFBTSxDQUFDLE1BQU0sS0FBSyxFQUFFLElBQUksTUFBTSxDQUFDLENBQUMsQ0FBQyxLQUFLLFdBQU8sQ0FBQyxVQUFVLElBQUksTUFBTSxDQUFDLENBQUMsQ0FBQyxLQUFLLElBQUksSUFBSSxNQUFNLENBQUMsRUFBRSxDQUFDLEtBQUssV0FBTyxDQUFDLFFBQVEsQ0FDbEgsQ0FBQztBQUNKLENBQUM7QUFORCxzQkFNQztBQUNELEtBQUssQ0FBQyxNQUFNLEdBQUcsR0FBVyxFQUFFO0lBQzFCLE9BQU8sbUJBQW1CLENBQUM7QUFDN0IsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLy8gT1BfSEFTSDE2MCB7c2NyaXB0SGFzaH0gT1BfRVFVQUxcblxuaW1wb3J0IHsgc2NyaXB0IGFzIGJzY3JpcHQgfSBmcm9tICcuLi8uLi8nO1xuaW1wb3J0IHsgb3Bjb2RlcyB9IGZyb20gJy4uLy4uLyc7XG5cbmV4cG9ydCBmdW5jdGlvbiBjaGVjayhzY3JpcHQ6IEJ1ZmZlciB8IEFycmF5PG51bWJlciB8IEJ1ZmZlcj4pOiBib29sZWFuIHtcbiAgY29uc3QgYnVmZmVyID0gYnNjcmlwdC5jb21waWxlKHNjcmlwdCk7XG5cbiAgcmV0dXJuIChcbiAgICBidWZmZXIubGVuZ3RoID09PSAyMyAmJiBidWZmZXJbMF0gPT09IG9wY29kZXMuT1BfSEFTSDE2MCAmJiBidWZmZXJbMV0gPT09IDB4MTQgJiYgYnVmZmVyWzIyXSA9PT0gb3Bjb2Rlcy5PUF9FUVVBTFxuICApO1xufVxuY2hlY2sudG9KU09OID0gKCk6IHN0cmluZyA9PiB7XG4gIHJldHVybiAnc2NyaXB0SGFzaCBvdXRwdXQnO1xufTtcbiJdfQ==
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/taproot/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.output = exports.input = void 0;
|
4
|
-
const input = require("./input");
|
5
|
-
exports.input = input;
|
6
|
-
const output = require("./output");
|
7
|
-
exports.output = output;
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3RhcHJvb3QvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUNBQWlDO0FBR3hCLHNCQUFLO0FBRmQsbUNBQW1DO0FBRW5CLHdCQUFNIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgaW5wdXQgZnJvbSAnLi9pbnB1dCc7XG5pbXBvcnQgKiBhcyBvdXRwdXQgZnJvbSAnLi9vdXRwdXQnO1xuXG5leHBvcnQgeyBpbnB1dCwgb3V0cHV0IH07XG4iXX0=
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/templates/taproot/input.ts"],"names":[],"mappings":";AAMA,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAS/C;yBATe,KAAK"}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// key path spend - {signature}
|
3
|
-
// script path spend - [...stack elements] {tapscript} {control block}
|
4
|
-
// https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.check = void 0;
|
7
|
-
const __1 = require("../../");
|
8
|
-
function check(chunks) {
|
9
|
-
try {
|
10
|
-
// check whether parsing the witness as a taproot witness fails
|
11
|
-
// this indicates whether `chunks` is a valid taproot input
|
12
|
-
__1.taproot.parseTaprootWitness(chunks);
|
13
|
-
return true;
|
14
|
-
}
|
15
|
-
catch {
|
16
|
-
return false;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
exports.check = check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AgLy8gY2hlY2sgd2hldGhlciBwYXJzaW5nIHRoZSB3aXRuZXNzIGFzIGEgdGFwcm9vdCB3aXRuZXNzIGZhaWxzXG4gICAgLy8gdGhpcyBpbmRpY2F0ZXMgd2hldGhlciBgY2h1bmtzYCBpcyBhIHZhbGlkIHRhcHJvb3QgaW5wdXRcbiAgICB0YXByb290LnBhcnNlVGFwcm9vdFdpdG5lc3MoY2h1bmtzKTtcbiAgICByZXR1cm4gdHJ1ZTtcbiAgfSBjYXRjaCB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG59XG5jaGVjay50b0pTT04gPSAoKTogc3RyaW5nID0+IHtcbiAgcmV0dXJuICd0YXByb290IGlucHV0Jztcbn07XG4iXX0=
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/templates/taproot/output.ts"],"names":[],"mappings":";AAKA,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAItE;yBAJe,KAAK"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// OP_1 {scriptHash}
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
const __2 = require("../../");
|
7
|
-
function check(script) {
|
8
|
-
const buffer = __1.script.compile(script);
|
9
|
-
return buffer.length === 34 && buffer[0] === __2.opcodes.OP_1 && buffer[1] === 0x20;
|
10
|
-
}
|
11
|
-
exports.check = check;
|
12
|
-
check.toJSON = () => {
|
13
|
-
return 'Taproot output';
|
14
|
-
};
|
15
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0cHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3RlbXBsYXRlcy90YXByb290L291dHB1dC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":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/taprootnofn/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.output = exports.input = void 0;
|
4
|
-
const input = require("./input");
|
5
|
-
exports.input = input;
|
6
|
-
const output = require("./output");
|
7
|
-
exports.output = output;
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3RhcHJvb3Rub2ZuL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGlDQUFpQztBQUd4QixzQkFBSztBQUZkLG1DQUFtQztBQUVuQix3QkFBTSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIGlucHV0IGZyb20gJy4vaW5wdXQnO1xuaW1wb3J0ICogYXMgb3V0cHV0IGZyb20gJy4vb3V0cHV0JztcblxuZXhwb3J0IHsgaW5wdXQsIG91dHB1dCB9O1xuIl19
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/templates/taprootnofn/input.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAQ/B,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,eAAe,CAAC,EAAE,OAAO,GAAG,OAAO,CAUhF;yBAVe,KAAK"}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// [signatures ...]
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
const __2 = require("../../");
|
7
|
-
function isPartialSignature(value) {
|
8
|
-
return value === __2.opcodes.OP_0 || __1.script.isCanonicalSchnorrSignature(value);
|
9
|
-
}
|
10
|
-
function check(script, allowIncomplete) {
|
11
|
-
const chunks = __1.script.decompile(script);
|
12
|
-
if (chunks.length < 1)
|
13
|
-
return false;
|
14
|
-
if (allowIncomplete) {
|
15
|
-
// Don't match completely unsigned to avoid colliding with multisig
|
16
|
-
return chunks.every(isPartialSignature) && chunks.some((chunk) => chunk !== __2.opcodes.OP_0);
|
17
|
-
}
|
18
|
-
return chunks.every(__1.script.isCanonicalSchnorrSignature);
|
19
|
-
}
|
20
|
-
exports.check = check;
|
21
|
-
check.toJSON = () => {
|
22
|
-
return 'taproot n-of-n input';
|
23
|
-
};
|
24
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3RhcHJvb3Rub2ZuL2lucHV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxtQkFBbUI7OztBQUduQiw4QkFBMkM7QUFDM0MsOEJBQWlDO0FBRWpDLFNBQVMsa0JBQWtCLENBQUMsS0FBc0I7SUFDaEQsT0FBTyxLQUFLLEtBQUssV0FBTyxDQUFDLElBQUksSUFBSSxVQUFPLENBQUMsMkJBQTJCLENBQUMsS0FBZSxDQUFDLENBQUM7QUFDeEYsQ0FBQztBQUVELFNBQWdCLEtBQUssQ0FBQyxNQUFzQixFQUFFLGVBQXlCO0lBQ3JFLE1BQU0sTUFBTSxHQUFHLFVBQU8sQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFVLENBQUM7SUFDbEQsSUFBSSxNQUFNLENBQUMs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GFzIFN0YWNrO1xuICBpZiAoY2h1bmtzLmxlbmd0aCA8IDEpIHJldHVybiBmYWxzZTtcblxuICBpZiAoYWxsb3dJbmNvbXBsZXRlKSB7XG4gICAgLy8gRG9uJ3QgbWF0Y2ggY29tcGxldGVseSB1bnNpZ25lZCB0byBhdm9pZCBjb2xsaWRpbmcgd2l0aCBtdWx0aXNpZ1xuICAgIHJldHVybiBjaHVua3MuZXZlcnkoaXNQYXJ0aWFsU2lnbmF0dXJlKSAmJiBjaHVua3Muc29tZSgoY2h1bmspID0+IGNodW5rICE9PSBvcGNvZGVzLk9QXzApO1xuICB9XG5cbiAgcmV0dXJuIChjaHVua3MgYXMgQnVmZmVyW10pLmV2ZXJ5KGJzY3JpcHQuaXNDYW5vbmljYWxTY2hub3JyU2lnbmF0dXJlKTtcbn1cbmNoZWNrLnRvSlNPTiA9ICgpOiBzdHJpbmcgPT4ge1xuICByZXR1cm4gJ3RhcHJvb3Qgbi1vZi1uIGlucHV0Jztcbn07XG4iXX0=
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/templates/taprootnofn/output.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAK/B,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,eAAe,CAAC,EAAE,OAAO,GAAG,OAAO,CAahF;yBAbe,KAAK"}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// [pubKeys[0:n-1] OP_CHECKSIGVERIFY] pubKeys[n-1] OP_CHECKSIG
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
const __2 = require("../../");
|
7
|
-
const noble_ecc_1 = require("../../noble_ecc");
|
8
|
-
function check(script, allowIncomplete) {
|
9
|
-
const chunks = __1.script.decompile(script);
|
10
|
-
if (chunks.length < 3)
|
11
|
-
return false;
|
12
|
-
const ops = chunks.filter((_, index) => index % 2 === 1);
|
13
|
-
if (ops[ops.length - 1] !== __2.opcodes.OP_CHECKSIG)
|
14
|
-
return false;
|
15
|
-
if (!ops.slice(0, -1).every((op) => op === __2.opcodes.OP_CHECKSIGVERIFY))
|
16
|
-
return false;
|
17
|
-
if (chunks.length / 2 > 16)
|
18
|
-
return false;
|
19
|
-
if (allowIncomplete)
|
20
|
-
return true;
|
21
|
-
const keys = chunks.filter((_, index) => index % 2 === 0);
|
22
|
-
return keys.every(noble_ecc_1.ecc.isXOnlyPoint);
|
23
|
-
}
|
24
|
-
exports.check = check;
|
25
|
-
check.toJSON = () => {
|
26
|
-
return 'taproot n-of-n output';
|
27
|
-
};
|
28
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0cHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3RlbXBsYXRlcy90YXByb290bm9mbi9vdXRwdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDhEQUE4RDs7O0FBRzlELDhCQUEyQztBQUMzQyw4QkFBaUM7QUFDakMsK0NBQXNDO0FBRXRDLFNBQWdCLEtBQUssQ0FBQyxNQUFzQixFQUFFLGVBQXlCO0lBQ3JFLE1BQU0sTUFBTSxHQUFHLFVBQU8sQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFVLENBQUM7SUFFbEQsSUFBSSxNQUFNLENBQUMsTUFBTSxHQUFHLENBQUM7UUFBRSxPQUFPLEtBQUssQ0FBQztJQUNwQyxNQUFNLEdBQUcsR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxFQUFFLEtBQUssRUFBRSxFQUFFLENBQUMsS0FBSyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztJQUN6RCxJQUFJLEdBQUcsQ0FBQyx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1wb3J0IHsgZWNjIH0gZnJvbSAnLi4vLi4vbm9ibGVfZWNjJztcblxuZXhwb3J0IGZ1bmN0aW9uIGNoZWNrKHNjcmlwdDogQnVmZmVyIHwgU3RhY2ssIGFsbG93SW5jb21wbGV0ZT86IGJvb2xlYW4pOiBib29sZWFuIHtcbiAgY29uc3QgY2h1bmtzID0gYnNjcmlwdC5kZWNvbXBpbGUoc2NyaXB0KSBhcyBTdGFjaztcblxuICBpZiAoY2h1bmtzLmxlbmd0aCA8IDMpIHJldHVybiBmYWxzZTtcbiAgY29uc3Qgb3BzID0gY2h1bmtzLmZpbHRlcigoXywgaW5kZXgpID0+IGluZGV4ICUgMiA9PT0gMSk7XG4gIGlmIChvcHNbb3BzLmxlbmd0aCAtIDFdICE9PSBvcGNvZGVzLk9QX0NIRUNLU0lHKSByZXR1cm4gZmFsc2U7XG4gIGlmICghb3BzLnNsaWNlKDAsIC0xKS5ldmVyeSgob3ApID0+IG9wID09PSBvcGNvZGVzLk9QX0NIRUNLU0lHVkVSSUZZKSkgcmV0dXJuIGZhbHNlO1xuXG4gIGlmIChjaHVua3MubGVuZ3RoIC8gMiA+IDE2KSByZXR1cm4gZmFsc2U7XG4gIGlmIChhbGxvd0luY29tcGxldGUpIHJldHVybiB0cnVlO1xuXG4gIGNvbnN0IGtleXMgPSBjaHVua3MuZmlsdGVyKChfLCBpbmRleCkgPT4gaW5kZXggJSAyID09PSAwKSBhcyBCdWZmZXJbXTtcbiAgcmV0dXJuIGtleXMuZXZlcnkoZWNjLmlzWE9ubHlQb2ludCk7XG59XG5jaGVjay50b0pTT04gPSAoKTogc3RyaW5nID0+IHtcbiAgcmV0dXJuICd0YXByb290IG4tb2YtbiBvdXRwdXQnO1xufTtcbiJdfQ==
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/witnesscommitment/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.output = void 0;
|
4
|
-
const output = require("./output");
|
5
|
-
exports.output = output;
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3dpdG5lc3Njb21taXRtZW50L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1DQUFtQztBQUUxQix3QkFBTSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIG91dHB1dCBmcm9tICcuL291dHB1dCc7XG5cbmV4cG9ydCB7IG91dHB1dCB9O1xuIl19
|
@@ -1,8 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
export declare function check(script: Buffer | Array<number | Buffer>): boolean;
|
3
|
-
export declare namespace check {
|
4
|
-
var toJSON: () => string;
|
5
|
-
}
|
6
|
-
export declare function encode(commitment: Buffer): Buffer;
|
7
|
-
export declare function decode(buffer: Buffer): Buffer;
|
8
|
-
//# sourceMappingURL=output.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/templates/witnesscommitment/output.ts"],"names":[],"mappings":";AAUA,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAMtE;yBANe,KAAK;;;AAYrB,wBAAgB,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAI7C"}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// OP_RETURN {aa21a9ed} {commitment}
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.decode = exports.encode = exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
const __2 = require("../../");
|
7
|
-
const types = require("bitcoinjs-lib/src/types");
|
8
|
-
const typeforce = require('typeforce');
|
9
|
-
const HEADER = Buffer.from('aa21a9ed', 'hex');
|
10
|
-
function check(script) {
|
11
|
-
const buffer = __1.script.compile(script);
|
12
|
-
return (buffer.length > 37 && buffer[0] === __2.opcodes.OP_RETURN && buffer[1] === 0x24 && buffer.slice(2, 6).equals(HEADER));
|
13
|
-
}
|
14
|
-
exports.check = check;
|
15
|
-
check.toJSON = () => {
|
16
|
-
return 'Witness commitment output';
|
17
|
-
};
|
18
|
-
function encode(commitment) {
|
19
|
-
typeforce(types.Hash256bit, commitment);
|
20
|
-
const buffer = Buffer.allocUnsafe(36);
|
21
|
-
HEADER.copy(buffer, 0);
|
22
|
-
commitment.copy(buffer, 4);
|
23
|
-
return __1.script.compile([__2.opcodes.OP_RETURN, buffer]);
|
24
|
-
}
|
25
|
-
exports.encode = encode;
|
26
|
-
function decode(buffer) {
|
27
|
-
typeforce(check, buffer);
|
28
|
-
return __1.script.decompile(buffer)[1].slice(4, 36);
|
29
|
-
}
|
30
|
-
exports.decode = decode;
|
31
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0cHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3RlbXBsYXRlcy93aXRuZXNzY29tbWl0bWVudC9vdXRwdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9DQUFvQzs7O0FBRXBDLDhCQUEyQztBQUMzQyw4QkFBaUM7QUFDakMsaURBQWlEO0FBRWpELE1BQU0sU0FBUyxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ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W1pdG1lbnQgb3V0cHV0Jztcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBlbmNvZGUoY29tbWl0bWVudDogQnVmZmVyKTogQnVmZmVyIHtcbiAgdHlwZWZvcmNlKHR5cGVzLkhhc2gyNTZiaXQsIGNvbW1pdG1lbnQpO1xuXG4gIGNvbnN0IGJ1ZmZlciA9IEJ1ZmZlci5hbGxvY1Vuc2FmZSgzNik7XG4gIEhFQURFUi5jb3B5KGJ1ZmZlciwgMCk7XG4gIGNvbW1pdG1lbnQuY29weShidWZmZXIsIDQpO1xuXG4gIHJldHVybiBic2NyaXB0LmNvbXBpbGUoW29wY29kZXMuT1BfUkVUVVJOLCBidWZmZXJdKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGRlY29kZShidWZmZXI6IEJ1ZmZlcik6IEJ1ZmZlciB7XG4gIHR5cGVmb3JjZShjaGVjaywgYnVmZmVyKTtcblxuICByZXR1cm4gKGJzY3JpcHQuZGVjb21waWxlKGJ1ZmZlcikhWzFdIGFzIEJ1ZmZlcikuc2xpY2UoNCwgMzYpO1xufVxuIl19
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/witnesspubkeyhash/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.output = exports.input = void 0;
|
4
|
-
const input = require("./input");
|
5
|
-
exports.input = input;
|
6
|
-
const output = require("./output");
|
7
|
-
exports.output = output;
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdGVtcGxhdGVzL3dpdG5lc3NwdWJrZXloYXNoL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGlDQUFpQztBQUd4QixzQkFBSztBQUZkLG1DQUFtQztBQUVuQix3QkFBTSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIGlucHV0IGZyb20gJy4vaW5wdXQnO1xuaW1wb3J0ICogYXMgb3V0cHV0IGZyb20gJy4vb3V0cHV0JztcblxuZXhwb3J0IHsgaW5wdXQsIG91dHB1dCB9O1xuIl19
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/templates/witnesspubkeyhash/input.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAO/B,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAQrD;yBARe,KAAK"}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// {signature} {pubKey}
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
function isCompressedCanonicalPubKey(pubKey) {
|
7
|
-
return __1.script.isCanonicalPubKey(pubKey) && pubKey.length === 33;
|
8
|
-
}
|
9
|
-
function check(script) {
|
10
|
-
const chunks = __1.script.decompile(script);
|
11
|
-
return (chunks.length === 2 &&
|
12
|
-
__1.script.isCanonicalScriptSignature(chunks[0]) &&
|
13
|
-
isCompressedCanonicalPubKey(chunks[1]));
|
14
|
-
}
|
15
|
-
exports.check = check;
|
16
|
-
check.toJSON = () => {
|
17
|
-
return 'witnessPubKeyHash input';
|
18
|
-
};
|
19
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuanMiLCJzb3VyY2V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HB1YktleSkgJiYgcHViS2V5Lmxlbmd0aCA9PT0gMzM7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjaGVjayhzY3JpcHQ6IEJ1ZmZlciB8IFN0YWNrKTogYm9vbGVhbiB7XG4gIGNvbnN0IGNodW5rcyA9IGJzY3JpcHQuZGVjb21waWxlKHNjcmlwdCkgYXMgU3RhY2s7XG5cbiAgcmV0dXJuIChcbiAgICBjaHVua3MubGVuZ3RoID09PSAyICYmXG4gICAgYnNjcmlwdC5pc0Nhbm9uaWNhbFNjcmlwdFNpZ25hdHVyZShjaHVua3NbMF0gYXMgQnVmZmVyKSAmJlxuICAgIGlzQ29tcHJlc3NlZENhbm9uaWNhbFB1YktleShjaHVua3NbMV0gYXMgQnVmZmVyKVxuICApO1xufVxuY2hlY2sudG9KU09OID0gKCk6IHN0cmluZyA9PiB7XG4gIHJldHVybiAnd2l0bmVzc1B1YktleUhhc2ggaW5wdXQnO1xufTtcbiJdfQ==
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/templates/witnesspubkeyhash/output.ts"],"names":[],"mappings":";AAKA,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAItE;yBAJe,KAAK"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
// OP_0 {pubKeyHash}
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.check = void 0;
|
5
|
-
const __1 = require("../../");
|
6
|
-
const __2 = require("../../");
|
7
|
-
function check(script) {
|
8
|
-
const buffer = __1.script.compile(script);
|
9
|
-
return buffer.length === 22 && buffer[0] === __2.opcodes.OP_0 && buffer[1] === 0x14;
|
10
|
-
}
|
11
|
-
exports.check = check;
|
12
|
-
check.toJSON = () => {
|
13
|
-
return 'Witness pubKeyHash output';
|
14
|
-
};
|
15
|
-
//# sourceM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