utxo-lib 1.0.9 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +19 -16
- package/dist/src/address.d.ts.map +1 -1
- package/dist/src/address.js +11 -1
- package/dist/src/addressFormat.d.ts +1 -1
- package/dist/src/addressFormat.d.ts.map +1 -1
- package/dist/src/addressFormat.js +1 -1
- package/dist/src/bitgo/Musig2.d.ts +115 -17
- package/dist/src/bitgo/Musig2.d.ts.map +1 -1
- package/dist/src/bitgo/Musig2.js +283 -100
- package/dist/src/bitgo/PsbtUtil.d.ts +59 -0
- package/dist/src/bitgo/PsbtUtil.d.ts.map +1 -0
- package/dist/src/bitgo/PsbtUtil.js +91 -0
- package/dist/src/bitgo/UtxoPsbt.d.ts +180 -47
- package/dist/src/bitgo/UtxoPsbt.d.ts.map +1 -1
- package/dist/src/bitgo/UtxoPsbt.js +651 -107
- package/dist/src/bitgo/bitcoincash/address.js +2 -2
- package/dist/src/bitgo/index.d.ts +11 -0
- package/dist/src/bitgo/index.d.ts.map +1 -1
- package/dist/src/bitgo/index.js +6 -2
- package/dist/src/bitgo/legacysafe/index.d.ts +15 -0
- package/dist/src/bitgo/legacysafe/index.d.ts.map +1 -0
- package/dist/src/bitgo/legacysafe/index.js +61 -0
- package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts +10 -0
- package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts.map +1 -0
- package/dist/src/bitgo/litecoin/LitecoinPsbt.js +17 -0
- package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts +16 -0
- package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts.map +1 -0
- package/dist/src/bitgo/litecoin/LitecoinTransaction.js +46 -0
- package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts +10 -0
- package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts.map +1 -0
- package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.js +15 -0
- package/dist/src/bitgo/litecoin/index.d.ts +4 -0
- package/dist/src/bitgo/litecoin/index.d.ts.map +1 -0
- package/dist/src/bitgo/litecoin/index.js +16 -0
- package/dist/src/bitgo/outputScripts.d.ts +3 -1
- package/dist/src/bitgo/outputScripts.d.ts.map +1 -1
- package/dist/src/bitgo/outputScripts.js +18 -10
- package/dist/src/bitgo/parseInput.d.ts +49 -20
- package/dist/src/bitgo/parseInput.d.ts.map +1 -1
- package/dist/src/bitgo/parseInput.js +109 -25
- package/dist/src/bitgo/psbt/fromHalfSigned.d.ts.map +1 -1
- package/dist/src/bitgo/psbt/fromHalfSigned.js +9 -6
- package/dist/src/bitgo/signature.d.ts +3 -3
- package/dist/src/bitgo/signature.d.ts.map +1 -1
- package/dist/src/bitgo/signature.js +48 -16
- package/dist/src/bitgo/transaction.d.ts +18 -3
- package/dist/src/bitgo/transaction.d.ts.map +1 -1
- package/dist/src/bitgo/transaction.js +28 -15
- package/dist/src/bitgo/types.d.ts +2 -0
- package/dist/src/bitgo/types.d.ts.map +1 -1
- package/dist/src/bitgo/types.js +1 -1
- package/dist/src/bitgo/wallet/Psbt.d.ts +104 -12
- package/dist/src/bitgo/wallet/Psbt.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/Psbt.js +285 -70
- package/dist/src/bitgo/wallet/Unspent.d.ts +28 -0
- package/dist/src/bitgo/wallet/Unspent.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/Unspent.js +172 -68
- package/dist/src/bitgo/wallet/WalletOutput.d.ts +17 -1
- package/dist/src/bitgo/wallet/WalletOutput.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/WalletOutput.js +64 -23
- package/dist/src/bitgo/wallet/chains.d.ts +2 -2
- package/dist/src/bitgo/wallet/chains.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/chains.js +1 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.d.ts +0 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.d.ts.map +1 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.js +6 -14
- package/dist/src/musig.d.ts +0 -1
- package/dist/src/musig.d.ts.map +1 -1
- package/dist/src/musig.js +15 -29
- package/dist/src/networks.d.ts +1 -2
- package/dist/src/networks.d.ts.map +1 -1
- package/dist/src/networks.js +22 -29
- package/dist/src/noble_ecc.d.ts.map +1 -1
- package/dist/src/noble_ecc.js +7 -3
- package/dist/src/payments/p2tr.d.ts.map +1 -1
- package/dist/src/payments/p2tr.js +15 -9
- package/dist/src/taproot.d.ts +16 -0
- package/dist/src/taproot.d.ts.map +1 -1
- package/dist/src/taproot.js +44 -2
- package/dist/src/testutil/index.d.ts +2 -0
- package/dist/src/testutil/index.d.ts.map +1 -1
- package/dist/src/testutil/index.js +3 -1
- package/dist/src/testutil/keys.d.ts +3 -0
- package/dist/src/testutil/keys.d.ts.map +1 -1
- package/dist/src/testutil/keys.js +17 -2
- package/dist/src/testutil/mock.d.ts +1 -1
- package/dist/src/testutil/mock.d.ts.map +1 -1
- package/dist/src/testutil/mock.js +12 -4
- package/dist/src/testutil/psbt.d.ts +89 -0
- package/dist/src/testutil/psbt.d.ts.map +1 -0
- package/dist/src/testutil/psbt.js +150 -0
- package/dist/src/testutil/transaction.d.ts +70 -0
- package/dist/src/testutil/transaction.d.ts.map +1 -0
- package/dist/src/testutil/transaction.js +107 -0
- package/package.json +6 -6
@@ -7,6 +7,7 @@ const outputScripts_1 = require("./outputScripts");
|
|
7
7
|
const networks_1 = require("../networks");
|
8
8
|
const noble_ecc_1 = require("../noble_ecc");
|
9
9
|
const parseInput_1 = require("./parseInput");
|
10
|
+
const taproot_1 = require("../taproot");
|
10
11
|
/**
|
11
12
|
* @deprecated - use {@see verifySignaturesWithPublicKeys} instead
|
12
13
|
* Get signature verifications for multsig transaction
|
@@ -14,7 +15,7 @@ const parseInput_1 = require("./parseInput");
|
|
14
15
|
* @param inputIndex
|
15
16
|
* @param amount - must be set for segwit transactions and BIP143 transactions
|
16
17
|
* @param verificationSettings
|
17
|
-
* @param prevOutputs - must be set for p2tr transactions
|
18
|
+
* @param prevOutputs - must be set for p2tr and p2trMusig2 transactions
|
18
19
|
* @returns SignatureVerification[] - in order of parsed non-empty signatures
|
19
20
|
*/
|
20
21
|
function getSignatureVerifications(transaction, inputIndex, amount, verificationSettings = {}, prevOutputs) {
|
@@ -32,12 +33,36 @@ function getSignatureVerifications(transaction, inputIndex, amount, verification
|
|
32
33
|
return [];
|
33
34
|
}
|
34
35
|
const parsedScript = parseInput_1.parseSignatureScript2Of3(input);
|
36
|
+
if (parsedScript.scriptType === 'taprootKeyPathSpend' || parsedScript.scriptType === 'taprootScriptPathSpend') {
|
37
|
+
if (parsedScript.scriptType === 'taprootKeyPathSpend' &&
|
38
|
+
(verificationSettings.signatureIndex || verificationSettings.publicKey)) {
|
39
|
+
throw new Error(`signatureIndex and publicKey parameters not supported for taprootKeyPathSpend`);
|
40
|
+
}
|
41
|
+
if (verificationSettings.signatureIndex !== undefined) {
|
42
|
+
throw new Error(`signatureIndex parameter not supported for taprootScriptPathSpend`);
|
43
|
+
}
|
44
|
+
if (!prevOutputs) {
|
45
|
+
throw new Error(`prevOutputs not set`);
|
46
|
+
}
|
47
|
+
if (prevOutputs.length !== transaction.ins.length) {
|
48
|
+
throw new Error(`prevOutputs length ${prevOutputs.length}, expected ${transaction.ins.length}`);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
let publicKeys;
|
52
|
+
if (parsedScript.scriptType === 'taprootKeyPathSpend') {
|
53
|
+
if (!prevOutputs) {
|
54
|
+
throw new Error(`prevOutputs not set`);
|
55
|
+
}
|
56
|
+
publicKeys = [taproot_1.getTaprootOutputKey(prevOutputs[inputIndex].script)];
|
57
|
+
}
|
58
|
+
else {
|
59
|
+
publicKeys = parsedScript.publicKeys.filter((buf) => verificationSettings.publicKey === undefined ||
|
60
|
+
verificationSettings.publicKey.equals(buf) ||
|
61
|
+
verificationSettings.publicKey.slice(1).equals(buf));
|
62
|
+
}
|
35
63
|
const signatures = parsedScript.signatures
|
36
64
|
.filter((s) => s && s.length)
|
37
65
|
.filter((s, i) => verificationSettings.signatureIndex === undefined || verificationSettings.signatureIndex === i);
|
38
|
-
const publicKeys = parsedScript.publicKeys.filter((buf) => verificationSettings.publicKey === undefined ||
|
39
|
-
verificationSettings.publicKey.equals(buf) ||
|
40
|
-
verificationSettings.publicKey.slice(1).equals(buf));
|
41
66
|
return signatures.map((signatureBuffer) => {
|
42
67
|
if (signatureBuffer === 0 || signatureBuffer.length === 0) {
|
43
68
|
return { signedBy: undefined, signature: undefined };
|
@@ -47,19 +72,10 @@ function getSignatureVerifications(transaction, inputIndex, amount, verification
|
|
47
72
|
hashType = signatureBuffer[signatureBuffer.length - 1];
|
48
73
|
signatureBuffer = signatureBuffer.slice(0, -1);
|
49
74
|
}
|
50
|
-
if (parsedScript.scriptType === '
|
51
|
-
if (verificationSettings.signatureIndex !== undefined) {
|
52
|
-
throw new Error(`signatureIndex parameter not supported for p2tr`);
|
53
|
-
}
|
75
|
+
if (parsedScript.scriptType === 'taprootScriptPathSpend') {
|
54
76
|
if (!prevOutputs) {
|
55
77
|
throw new Error(`prevOutputs not set`);
|
56
78
|
}
|
57
|
-
if (prevOutputs.length !== transaction.ins.length) {
|
58
|
-
throw new Error(`prevOutputs length ${prevOutputs.length}, expected ${transaction.ins.length}`);
|
59
|
-
}
|
60
|
-
if (!('controlBlock' in parsedScript)) {
|
61
|
-
throw new Error('expected controlBlock');
|
62
|
-
}
|
63
79
|
const { controlBlock, pubScript } = parsedScript;
|
64
80
|
const leafHash = bitcoinjs_lib_1.taproot.getTapleafHash(noble_ecc_1.ecc, controlBlock, pubScript);
|
65
81
|
const signatureHash = transaction.hashForWitnessV1(inputIndex, prevOutputs.map(({ script }) => script), prevOutputs.map(({ value }) => value), hashType, leafHash);
|
@@ -72,6 +88,16 @@ function getSignatureVerifications(transaction, inputIndex, amount, verification
|
|
72
88
|
}
|
73
89
|
throw new Error(`illegal state: signed by multiple public keys`);
|
74
90
|
}
|
91
|
+
else if (parsedScript.scriptType === 'taprootKeyPathSpend') {
|
92
|
+
if (!prevOutputs) {
|
93
|
+
throw new Error(`prevOutputs not set`);
|
94
|
+
}
|
95
|
+
const signatureHash = transaction.hashForWitnessV1(inputIndex, prevOutputs.map(({ script }) => script), prevOutputs.map(({ value }) => value), hashType);
|
96
|
+
const result = noble_ecc_1.ecc.verifySchnorr(signatureHash, publicKeys[0], signatureBuffer);
|
97
|
+
return result
|
98
|
+
? { signedBy: publicKeys[0], signature: signatureBuffer }
|
99
|
+
: { signedBy: undefined, signature: undefined };
|
100
|
+
}
|
75
101
|
else {
|
76
102
|
// slice the last byte from the signature hash input because it's the hash type
|
77
103
|
const { signature, hashType } = bitcoinjs_lib_1.ScriptSignature.decode(signatureBuffer);
|
@@ -176,7 +202,13 @@ function getDefaultSigHash(network, scriptType) {
|
|
176
202
|
case networks_1.networks.ecash:
|
177
203
|
return bitcoinjs_lib_1.Transaction.SIGHASH_ALL | UtxoTransaction_1.UtxoTransaction.SIGHASH_FORKID;
|
178
204
|
default:
|
179
|
-
|
205
|
+
switch (scriptType) {
|
206
|
+
case 'p2tr':
|
207
|
+
case 'p2trMusig2':
|
208
|
+
return bitcoinjs_lib_1.Transaction.SIGHASH_DEFAULT;
|
209
|
+
default:
|
210
|
+
return bitcoinjs_lib_1.Transaction.SIGHASH_ALL;
|
211
|
+
}
|
180
212
|
}
|
181
213
|
}
|
182
214
|
exports.getDefaultSigHash = getDefaultSigHash;
|
@@ -219,4 +251,4 @@ function signInput2Of3(txBuilder, vin, scriptType, pubkeys, keyPair, cosigner, a
|
|
219
251
|
});
|
220
252
|
}
|
221
253
|
exports.signInput2Of3 = signInput2Of3;
|
222
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2lnbmF0dXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2JpdGdvL3NpZ25hdHVyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxpREFBZ0Y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dG5lc3NTY3JpcHQ7XG5cbiAgY29uc3QgcHJldk91dFNjcmlwdFR5cGUgPSBzY3JpcHRUeXBlMk9mM0FzUHJldk91dFR5cGUoc2NyaXB0VHlwZSk7XG4gIGlmIChzY3JpcHRUeXBlID09PSAncDJ0cicpIHtcbiAgICAoeyB3aXRuZXNzU2NyaXB0LCBjb250cm9sQmxvY2sgfSA9IGNyZWF0ZVNwZW5kU2NyaXB0UDJ0cihwdWJrZXlzLCBba2V5UGFpci5wdWJsaWNLZXksIGNvc2lnbmVyXSkpO1xuICB9IGVsc2Uge1xuICAgICh7IHJlZGVlbVNjcmlwdCwgd2l0bmVzc1NjcmlwdCB9ID0gY3JlYXRlT3V0cHV0U2NyaXB0Mm9mMyhwdWJrZXlzLCBzY3JpcHRUeXBlKSk7XG4gIH1cblxuICBrZXlQYWlyLm5ldHdvcmsgPSB0eEJ1aWxkZXIubmV0d29yaztcblxuICB0eEJ1aWxkZXIuc2lnbih7XG4gICAgdmluLFxuICAgIHByZXZPdXRTY3JpcHRUeXBlLFxuICAgIGtleVBhaXIsXG4gICAgaGFzaFR5cGU6IGdldERlZmF1bHRTaWdIYXNoKHR4QnVpbGRlci5uZXR3b3JrIGFzIE5ldHdvcmssIHNjcmlwdFR5cGUpLFxuICAgIHJlZGVlbVNjcmlwdCxcbiAgICB3aXRuZXNzU2NyaXB0LFxuICAgIHdpdG5lc3NWYWx1ZTogYW1vdW50LFxuICAgIGNvbnRyb2xCbG9jayxcbiAgfSk7XG59XG4iXX0=
|
@@ -4,14 +4,29 @@ import { Network } from '../networks';
|
|
4
4
|
import { UtxoPsbt, PsbtOpts } from './UtxoPsbt';
|
5
5
|
import { UtxoTransaction } from './UtxoTransaction';
|
6
6
|
import { UtxoTransactionBuilder } from './UtxoTransactionBuilder';
|
7
|
-
export declare function createTransactionFromBuffer
|
7
|
+
export declare function createTransactionFromBuffer(buf: Buffer, network: Network, params: {
|
8
8
|
version?: number;
|
9
|
+
amountType: 'bigint';
|
10
|
+
}): UtxoTransaction<bigint>;
|
11
|
+
export declare function createTransactionFromBuffer<TNumber extends number | bigint>(buf: Buffer, network: Network, params?: {
|
12
|
+
version?: number;
|
13
|
+
amountType?: 'number' | 'bigint';
|
14
|
+
}): UtxoTransaction<TNumber>;
|
15
|
+
/** @deprecated - use createTransactionFromBuffer instead */
|
16
|
+
export declare function createTransactionFromHex(hex: string, network: Network, p: {
|
17
|
+
amountType: 'bigint';
|
18
|
+
}): UtxoTransaction<bigint>;
|
19
|
+
/** @deprecated - use createTransactionFromBuffer instead */
|
20
|
+
export declare function createTransactionFromHex(hex: string, network: Network, p: {
|
21
|
+
amountType: 'number';
|
22
|
+
}): UtxoTransaction;
|
23
|
+
/** @deprecated - use createTransactionFromBuffer instead */
|
24
|
+
export declare function createTransactionFromHex<TNumber extends number | bigint = number>(hex: string, network: Network, p?: {
|
9
25
|
amountType?: 'number' | 'bigint';
|
10
|
-
}
|
26
|
+
} | 'number' | 'bigint'): UtxoTransaction<TNumber>;
|
11
27
|
export declare function createPsbtFromBuffer(buf: Buffer, network: Network, bip32PathsAbsolute?: boolean): UtxoPsbt;
|
12
28
|
export declare function createPsbtFromHex(hex: string, network: Network, bip32PathsAbsolute?: boolean): UtxoPsbt;
|
13
29
|
export declare function createPsbtFromTransaction(tx: UtxoTransaction<bigint>, prevOuts: TxOutput<bigint>[]): UtxoPsbt;
|
14
|
-
export declare function createTransactionFromHex<TNumber extends number | bigint = number>(hex: string, network: Network, amountType?: 'number' | 'bigint'): UtxoTransaction<TNumber>;
|
15
30
|
export declare function getDefaultTransactionVersion(network: Network): number;
|
16
31
|
export declare function setTransactionBuilderDefaults<TNumber extends number | bigint>(txb: UtxoTransactionBuilder<TNumber>, network: Network, { version }?: {
|
17
32
|
version?: number;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/bitgo/transaction.ts"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot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IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GACrC,sBAAsB,CAAC,OAAO,CAAC,CA8BjC;AAED,wBAAgB,uCAAuC,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,EACrF,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,EAC5B,WAAW,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,GAChC,sBAAsB,CAAC,OAAO,CAAC,CA8BjC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.createTransactionBuilderFromTransaction = exports.createTransactionBuilderForNetwork = exports.createPsbtForNetwork = exports.setPsbtDefaults = exports.setTransactionBuilderDefaults = exports.getDefaultTransactionVersion = exports.
|
3
|
+
exports.createTransactionBuilderFromTransaction = exports.createTransactionBuilderForNetwork = exports.createPsbtForNetwork = exports.setPsbtDefaults = exports.setTransactionBuilderDefaults = exports.getDefaultTransactionVersion = exports.createPsbtFromTransaction = exports.createPsbtFromHex = exports.createPsbtFromBuffer = exports.createTransactionFromHex = exports.createTransactionFromBuffer = void 0;
|
4
4
|
const networks_1 = require("../networks");
|
5
5
|
const UtxoPsbt_1 = require("./UtxoPsbt");
|
6
6
|
const UtxoTransaction_1 = require("./UtxoTransaction");
|
@@ -11,6 +11,7 @@ const DashTransactionBuilder_1 = require("./dash/DashTransactionBuilder");
|
|
11
11
|
const ZcashPsbt_1 = require("./zcash/ZcashPsbt");
|
12
12
|
const ZcashTransactionBuilder_1 = require("./zcash/ZcashTransactionBuilder");
|
13
13
|
const ZcashTransaction_1 = require("./zcash/ZcashTransaction");
|
14
|
+
const litecoin_1 = require("./litecoin");
|
14
15
|
function createTransactionFromBuffer(buf, network, { version, amountType } = {}, deprecatedAmountType) {
|
15
16
|
if (amountType) {
|
16
17
|
if (deprecatedAmountType && amountType !== deprecatedAmountType) {
|
@@ -32,8 +33,9 @@ function createTransactionFromBuffer(buf, network, { version, amountType } = {},
|
|
32
33
|
case networks_1.networks.bitcoingold:
|
33
34
|
case networks_1.networks.dogecoin:
|
34
35
|
case networks_1.networks.ecash:
|
35
|
-
case networks_1.networks.litecoin:
|
36
36
|
return UtxoTransaction_1.UtxoTransaction.fromBuffer(buf, false, amountType, network);
|
37
|
+
case networks_1.networks.litecoin:
|
38
|
+
return litecoin_1.LitecoinTransaction.fromBuffer(buf, false, amountType, network);
|
37
39
|
case networks_1.networks.dash:
|
38
40
|
return DashTransaction_1.DashTransaction.fromBuffer(buf, false, amountType, network);
|
39
41
|
case networks_1.networks.zcash:
|
@@ -43,6 +45,13 @@ function createTransactionFromBuffer(buf, network, { version, amountType } = {},
|
|
43
45
|
throw new Error(`invalid network`);
|
44
46
|
}
|
45
47
|
exports.createTransactionFromBuffer = createTransactionFromBuffer;
|
48
|
+
function createTransactionFromHex(hex, network, p) {
|
49
|
+
if (typeof p === 'string') {
|
50
|
+
p = { amountType: p };
|
51
|
+
}
|
52
|
+
return createTransactionFromBuffer(Buffer.from(hex, 'hex'), network, p);
|
53
|
+
}
|
54
|
+
exports.createTransactionFromHex = createTransactionFromHex;
|
46
55
|
function createPsbtFromBuffer(buf, network, bip32PathsAbsolute = false) {
|
47
56
|
switch (networks_1.getMainnet(network)) {
|
48
57
|
case networks_1.networks.bitcoin:
|
@@ -51,8 +60,9 @@ function createPsbtFromBuffer(buf, network, bip32PathsAbsolute = false) {
|
|
51
60
|
case networks_1.networks.bitcoingold:
|
52
61
|
case networks_1.networks.dogecoin:
|
53
62
|
case networks_1.networks.ecash:
|
54
|
-
case networks_1.networks.litecoin:
|
55
63
|
return UtxoPsbt_1.UtxoPsbt.fromBuffer(buf, { network, bip32PathsAbsolute });
|
64
|
+
case networks_1.networks.litecoin:
|
65
|
+
return litecoin_1.LitecoinPsbt.fromBuffer(buf, { network, bip32PathsAbsolute });
|
56
66
|
case networks_1.networks.dash:
|
57
67
|
return DashPsbt_1.DashPsbt.fromBuffer(buf, { network, bip32PathsAbsolute });
|
58
68
|
case networks_1.networks.zcash:
|
@@ -74,8 +84,9 @@ function createPsbtFromTransaction(tx, prevOuts) {
|
|
74
84
|
case networks_1.networks.bitcoingold:
|
75
85
|
case networks_1.networks.dogecoin:
|
76
86
|
case networks_1.networks.ecash:
|
77
|
-
case networks_1.networks.litecoin:
|
78
87
|
return UtxoPsbt_1.UtxoPsbt.fromTransaction(tx, prevOuts);
|
88
|
+
case networks_1.networks.litecoin:
|
89
|
+
return litecoin_1.LitecoinPsbt.fromTransaction(tx, prevOuts);
|
79
90
|
case networks_1.networks.dash:
|
80
91
|
return DashPsbt_1.DashPsbt.fromTransaction(tx, prevOuts);
|
81
92
|
case networks_1.networks.zcash:
|
@@ -85,11 +96,6 @@ function createPsbtFromTransaction(tx, prevOuts) {
|
|
85
96
|
throw new Error(`invalid network`);
|
86
97
|
}
|
87
98
|
exports.createPsbtFromTransaction = createPsbtFromTransaction;
|
88
|
-
/* istanbul ignore next */
|
89
|
-
function createTransactionFromHex(hex, network, amountType = 'number') {
|
90
|
-
return createTransactionFromBuffer(Buffer.from(hex, 'hex'), network, { amountType });
|
91
|
-
}
|
92
|
-
exports.createTransactionFromHex = createTransactionFromHex;
|
93
99
|
function getDefaultTransactionVersion(network) {
|
94
100
|
switch (networks_1.getMainnet(network)) {
|
95
101
|
case networks_1.networks.bitcoincash:
|
@@ -163,11 +169,14 @@ function createPsbtForNetwork(psbtOpts, { version } = {}) {
|
|
163
169
|
case networks_1.networks.bitcoinsv:
|
164
170
|
case networks_1.networks.bitcoingold:
|
165
171
|
case networks_1.networks.dogecoin:
|
166
|
-
case networks_1.networks.ecash:
|
167
|
-
case networks_1.networks.litecoin: {
|
172
|
+
case networks_1.networks.ecash: {
|
168
173
|
psbt = UtxoPsbt_1.UtxoPsbt.createPsbt(psbtOpts);
|
169
174
|
break;
|
170
175
|
}
|
176
|
+
case networks_1.networks.litecoin: {
|
177
|
+
psbt = litecoin_1.LitecoinPsbt.createPsbt(psbtOpts);
|
178
|
+
break;
|
179
|
+
}
|
171
180
|
case networks_1.networks.dash: {
|
172
181
|
psbt = DashPsbt_1.DashPsbt.createPsbt(psbtOpts);
|
173
182
|
break;
|
@@ -191,11 +200,14 @@ function createTransactionBuilderForNetwork(network, { version } = {}) {
|
|
191
200
|
case networks_1.networks.bitcoinsv:
|
192
201
|
case networks_1.networks.bitcoingold:
|
193
202
|
case networks_1.networks.dogecoin:
|
194
|
-
case networks_1.networks.ecash:
|
195
|
-
case networks_1.networks.litecoin: {
|
203
|
+
case networks_1.networks.ecash: {
|
196
204
|
txb = new UtxoTransactionBuilder_1.UtxoTransactionBuilder(network);
|
197
205
|
break;
|
198
206
|
}
|
207
|
+
case networks_1.networks.litecoin: {
|
208
|
+
txb = new litecoin_1.LitecoinTransactionBuilder(network);
|
209
|
+
break;
|
210
|
+
}
|
199
211
|
case networks_1.networks.dash:
|
200
212
|
txb = new DashTransactionBuilder_1.DashTransactionBuilder(network);
|
201
213
|
break;
|
@@ -218,8 +230,9 @@ function createTransactionBuilderFromTransaction(tx, prevOutputs) {
|
|
218
230
|
case networks_1.networks.bitcoingold:
|
219
231
|
case networks_1.networks.dogecoin:
|
220
232
|
case networks_1.networks.ecash:
|
221
|
-
case networks_1.networks.litecoin:
|
222
233
|
return UtxoTransactionBuilder_1.UtxoTransactionBuilder.fromTransaction(tx, undefined, prevOutputs);
|
234
|
+
case networks_1.networks.litecoin:
|
235
|
+
return litecoin_1.LitecoinTransactionBuilder.fromTransaction(tx, undefined, prevOutputs);
|
223
236
|
case networks_1.networks.dash:
|
224
237
|
return DashTransactionBuilder_1.DashTransactionBuilder.fromTransaction(tx, undefined, prevOutputs);
|
225
238
|
case networks_1.networks.zcash:
|
@@ -228,4 +241,4 @@ function createTransactionBuilderFromTransaction(tx, prevOutputs) {
|
|
228
241
|
throw new Error(`invalid network`);
|
229
242
|
}
|
230
243
|
exports.createTransactionBuilderFromTransaction = createTransactionBuilderFromTransaction;
|
231
|
-
//# sourceMappingURL=data:application/json;base64,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hY3Rpb248VE51bWJlcj4sXG4gICAgICAgIHVuZGVmaW5lZCxcbiAgICAgICAgcHJldk91dHB1dHMgYXMgVHhPdXRwdXQ8VE51bWJlcj5bXVxuICAgICAgKTtcbiAgICBjYXNlIG5ldHdvcmtzLmRhc2g6XG4gICAgICByZXR1cm4gRGFzaFRyYW5zYWN0aW9uQnVpbGRlci5mcm9tVHJhbnNhY3Rpb248VE51bWJlcj4oXG4gICAgICAgIHR4IGFzIERhc2hUcmFuc2FjdGlvbjxUTnVtYmVyPixcbiAgICAgICAgdW5kZWZpbmVkLFxuICAgICAgICBwcmV2T3V0cHV0cyBhcyBUeE91dHB1dDxUTnVtYmVyPltdXG4gICAgICApO1xuICAgIGNhc2UgbmV0d29ya3MuemNhc2g6XG4gICAgICByZXR1cm4gWmNhc2hUcmFuc2FjdGlvbkJ1aWxkZXIuZnJvbVRyYW5zYWN0aW9uPFROdW1iZXI+KFxuICAgICAgICB0eCBhcyBaY2FzaFRyYW5zYWN0aW9uPFROdW1iZXI+LFxuICAgICAgICB1bmRlZmluZWQsXG4gICAgICAgIHByZXZPdXRwdXRzIGFzIFR4T3V0cHV0PFROdW1iZXI+W11cbiAgICAgICk7XG4gIH1cblxuICB0aHJvdyBuZXcgRXJyb3IoYGludmFsaWQgbmV0d29ya2ApO1xufVxuIl19
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/bitgo/types.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE9B,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAEpD;AAED,oBAAY,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAElC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAEtD"}
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/bitgo/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,oBAAY,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE9B,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAEpD;AAED,oBAAY,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAElC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAEtD"}
|
package/dist/src/bitgo/types.js
CHANGED
@@ -9,4 +9,4 @@ function isTriple(arr) {
|
|
9
9
|
return arr.length === 3;
|
10
10
|
}
|
11
11
|
exports.isTriple = isTriple;
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYml0Z28vdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBS0EsU0FBZ0IsT0FBTyxDQUFJLEdBQVE7SUFDakMsT0FBTyxHQUFHLENBQUMsTUFBTSxLQUFLLENBQUMsQ0FBQztBQUMxQixDQUFDO0FBRkQsMEJBRUM7QUFJRCxTQUFnQixRQUFRLENBQUksR0FBUTtJQUNsQyxPQUFPLEdBQUcsQ0FBQyxNQUFNLEtBQUssQ0FBQyxDQUFDO0FBQzFCLENBQUM7QUFGRCw0QkFFQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFRhcExlYWZTY3JpcHQgfSBmcm9tICdiaXAxNzQvc3JjL2xpYi9pbnRlcmZhY2VzJztcbmV4cG9ydCB7IFRhcExlYWZTY3JpcHQgfTtcblxuZXhwb3J0IHR5cGUgVHVwbGU8VD4gPSBbVCwgVF07XG5cbmV4cG9ydCBmdW5jdGlvbiBpc1R1cGxlPFQ+KGFycjogVFtdKTogYXJyIGlzIFR1cGxlPFQ+IHtcbiAgcmV0dXJuIGFyci5sZW5ndGggPT09IDI7XG59XG5cbmV4cG9ydCB0eXBlIFRyaXBsZTxUPiA9IFtULCBULCBUXTtcblxuZXhwb3J0IGZ1bmN0aW9uIGlzVHJpcGxlPFQ+KGFycjogVFtdKTogYXJyIGlzIFRyaXBsZTxUPiB7XG4gIHJldHVybiBhcnIubGVuZ3RoID09PSAzO1xufVxuIl19
|