utxo-lib 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. package/dist/src/address.d.ts.map +1 -1
  2. package/dist/src/address.js +1 -11
  3. package/dist/src/addressFormat.d.ts +1 -1
  4. package/dist/src/addressFormat.d.ts.map +1 -1
  5. package/dist/src/addressFormat.js +1 -1
  6. package/dist/src/bitgo/Musig2.d.ts +17 -115
  7. package/dist/src/bitgo/Musig2.d.ts.map +1 -1
  8. package/dist/src/bitgo/Musig2.js +101 -283
  9. package/dist/src/bitgo/UtxoPsbt.d.ts +49 -173
  10. package/dist/src/bitgo/UtxoPsbt.d.ts.map +1 -1
  11. package/dist/src/bitgo/UtxoPsbt.js +112 -634
  12. package/dist/src/bitgo/bbc/DashPsbt.d.ts +12 -0
  13. package/dist/src/bitgo/bbc/DashPsbt.d.ts.map +1 -0
  14. package/dist/src/bitgo/bbc/DashPsbt.js +27 -0
  15. package/dist/src/bitgo/bbc/DashTransaction.d.ts +39 -0
  16. package/dist/src/bitgo/bbc/DashTransaction.d.ts.map +1 -0
  17. package/dist/src/bitgo/bbc/DashTransaction.js +109 -0
  18. package/dist/src/bitgo/bbc/DashTransactionBuilder.d.ts +14 -0
  19. package/dist/src/bitgo/bbc/DashTransactionBuilder.d.ts.map +1 -0
  20. package/dist/src/bitgo/bbc/DashTransactionBuilder.js +28 -0
  21. package/dist/src/bitgo/bbc/index.d.ts +4 -0
  22. package/dist/src/bitgo/bbc/index.d.ts.map +1 -0
  23. package/dist/src/bitgo/{litecoin → bbc}/index.js +4 -4
  24. package/dist/src/bitgo/bitcoincash/address.js +2 -2
  25. package/dist/src/bitgo/index.d.ts +0 -10
  26. package/dist/src/bitgo/index.d.ts.map +1 -1
  27. package/dist/src/bitgo/index.js +2 -5
  28. package/dist/src/bitgo/outputScripts.d.ts +1 -3
  29. package/dist/src/bitgo/outputScripts.d.ts.map +1 -1
  30. package/dist/src/bitgo/outputScripts.js +10 -18
  31. package/dist/src/bitgo/parseInput.d.ts +20 -49
  32. package/dist/src/bitgo/parseInput.d.ts.map +1 -1
  33. package/dist/src/bitgo/parseInput.js +24 -108
  34. package/dist/src/bitgo/psbt/fromHalfSigned.d.ts.map +1 -1
  35. package/dist/src/bitgo/psbt/fromHalfSigned.js +6 -9
  36. package/dist/src/bitgo/signature.d.ts +3 -3
  37. package/dist/src/bitgo/signature.d.ts.map +1 -1
  38. package/dist/src/bitgo/signature.js +16 -48
  39. package/dist/src/bitgo/transaction.d.ts +3 -18
  40. package/dist/src/bitgo/transaction.d.ts.map +1 -1
  41. package/dist/src/bitgo/transaction.js +15 -28
  42. package/dist/src/bitgo/types.d.ts +0 -2
  43. package/dist/src/bitgo/types.d.ts.map +1 -1
  44. package/dist/src/bitgo/types.js +1 -1
  45. package/dist/src/bitgo/wallet/Psbt.d.ts +12 -90
  46. package/dist/src/bitgo/wallet/Psbt.d.ts.map +1 -1
  47. package/dist/src/bitgo/wallet/Psbt.js +71 -221
  48. package/dist/src/bitgo/wallet/Unspent.d.ts +0 -28
  49. package/dist/src/bitgo/wallet/Unspent.d.ts.map +1 -1
  50. package/dist/src/bitgo/wallet/Unspent.js +68 -173
  51. package/dist/src/bitgo/wallet/chains.d.ts +2 -2
  52. package/dist/src/bitgo/wallet/chains.d.ts.map +1 -1
  53. package/dist/src/bitgo/wallet/chains.js +1 -1
  54. package/dist/src/bitgo/zcash/ZcashPsbt.d.ts.map +1 -1
  55. package/dist/src/bitgo/zcash/ZcashPsbt.js +3 -4
  56. package/dist/src/networks.d.ts +2 -1
  57. package/dist/src/networks.d.ts.map +1 -1
  58. package/dist/src/networks.js +29 -22
  59. package/dist/src/noble_ecc.d.ts.map +1 -1
  60. package/dist/src/noble_ecc.js +2 -6
  61. package/dist/src/payments/p2tr.d.ts.map +1 -1
  62. package/dist/src/payments/p2tr.js +9 -15
  63. package/dist/src/taproot.d.ts +0 -16
  64. package/dist/src/taproot.d.ts.map +1 -1
  65. package/dist/src/taproot.js +2 -44
  66. package/dist/src/testutil/index.d.ts +0 -2
  67. package/dist/src/testutil/index.d.ts.map +1 -1
  68. package/dist/src/testutil/index.js +1 -3
  69. package/dist/src/testutil/mock.d.ts +1 -1
  70. package/dist/src/testutil/mock.d.ts.map +1 -1
  71. package/dist/src/testutil/mock.js +4 -12
  72. package/package.json +4 -6
  73. package/dist/src/bitgo/PsbtUtil.d.ts +0 -54
  74. package/dist/src/bitgo/PsbtUtil.d.ts.map +0 -1
  75. package/dist/src/bitgo/PsbtUtil.js +0 -79
  76. package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts +0 -10
  77. package/dist/src/bitgo/litecoin/LitecoinPsbt.d.ts.map +0 -1
  78. package/dist/src/bitgo/litecoin/LitecoinPsbt.js +0 -17
  79. package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts +0 -16
  80. package/dist/src/bitgo/litecoin/LitecoinTransaction.d.ts.map +0 -1
  81. package/dist/src/bitgo/litecoin/LitecoinTransaction.js +0 -46
  82. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts +0 -10
  83. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.d.ts.map +0 -1
  84. package/dist/src/bitgo/litecoin/LitecoinTransactionBuilder.js +0 -15
  85. package/dist/src/bitgo/litecoin/index.d.ts +0 -4
  86. package/dist/src/bitgo/litecoin/index.d.ts.map +0 -1
  87. package/dist/src/testutil/psbt.d.ts +0 -71
  88. package/dist/src/testutil/psbt.d.ts.map +0 -1
  89. package/dist/src/testutil/psbt.js +0 -147
  90. package/dist/src/testutil/transaction.d.ts +0 -61
  91. package/dist/src/testutil/transaction.d.ts.map +0 -1
  92. package/dist/src/testutil/transaction.js +0 -107
@@ -0,0 +1,12 @@
1
+ /// <reference types="node" />
2
+ import { DashTransaction } from './BabacoinTransaction';
3
+ import { PsbtOpts, UtxoPsbt } from '../UtxoPsbt';
4
+ import { Network } from '../../networks';
5
+ import { Psbt as PsbtBase } from 'bip174';
6
+ export declare class DashPsbt extends UtxoPsbt<DashTransaction<bigint>> {
7
+ protected static transactionFromBuffer(buffer: Buffer, network: Network): DashTransaction<bigint>;
8
+ static createPsbt(opts: PsbtOpts, data?: PsbtBase): DashPsbt;
9
+ setType(type: number): DashPsbt;
10
+ setExtraPayload(extraPayload?: Buffer): DashPsbt;
11
+ }
12
+ //# sourceMappingURL=DashPsbt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashPsbt.d.ts","sourceRoot":"","sources":["../../../../src/bitgo/bbc/DashPsbt.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAG1C,qBAAa,QAAS,SAAQ,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC7D,SAAS,CAAC,MAAM,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC;IAIjG,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ;IAO5D,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ;IAM/B,eAAe,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ;CAKjD"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DashPsbt = void 0;
4
+ const DashTransaction_1 = require("./DashTransaction");
5
+ const UtxoPsbt_1 = require("../UtxoPsbt");
6
+ const bip174_1 = require("bip174");
7
+ const bitcoinjs_lib_1 = require("bitcoinjs-lib");
8
+ class DashPsbt extends UtxoPsbt_1.UtxoPsbt {
9
+ static transactionFromBuffer(buffer, network) {
10
+ return DashTransaction_1.DashTransaction.fromBuffer(buffer, false, 'bigint', network);
11
+ }
12
+ static createPsbt(opts, data) {
13
+ return new DashPsbt(opts, data || new bip174_1.Psbt(new bitcoinjs_lib_1.PsbtTransaction({ tx: new DashTransaction_1.DashTransaction(opts.network) })));
14
+ }
15
+ setType(type) {
16
+ this.checkForSignatures('type');
17
+ this.tx.type = type;
18
+ return this;
19
+ }
20
+ setExtraPayload(extraPayload) {
21
+ this.checkForSignatures('extraPayload');
22
+ this.tx.extraPayload = extraPayload;
23
+ return this;
24
+ }
25
+ }
26
+ exports.DashPsbt = DashPsbt;
27
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGFzaFBzYnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYml0Z28vYmJjL0Rhc2hQc2J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHVEQUFvRDtBQUNwRCwwQ0FBaUQ7QUFFakQsbUNBQTBDO0FBQzFDLGlEQUFnRDtBQUVoRCxNQUFhLFFBQVMsU0FBUSxtQkFBaUM7SUFDbkQsTUFBTSxDQUFDLHFCQUFxQixDQUFDLE1BQWMsRUFBRSxPQUFnQjtRQUNyRSxPQUFPLGlDQUFlLENBQUMsVUFBVSxDQUFTLE1BQU0sRUFBRSxLQUFLLEVBQUUsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQzlFLENBQUM7SUFFRCxNQUFNLENBQUMsVUFBVSxDQUFDLElBQWMsRUFBRSxJQUFlO1FBQy9DLE9BQU8sSUFBSSxRQUFRLENBQ2pCLElBQUksRUFDSixJQUFJLElBQUksSUFBSSxhQUFRLENBQUMsSUFBSSwrQkFBZSxDQUFDLEVBQUUsRUFBRSxFQUFFLElBQUksaUNBQWUsQ0FBUyxJQUFJLENBQUMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQz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4oYnVmZmVyLCBmYWxzZSwgJ2JpZ2ludCcsIG5ldHdvcmspO1xuICB9XG5cbiAgc3RhdGljIGNyZWF0ZVBzYnQob3B0czogUHNidE9wdHMsIGRhdGE/OiBQc2J0QmFzZSk6IERhc2hQc2J0IHtcbiAgICByZXR1cm4gbmV3IERhc2hQc2J0KFxuICAgICAgb3B0cyxcbiAgICAgIGRhdGEgfHwgbmV3IFBzYnRCYXNlKG5ldyBQc2J0VHJhbnNhY3Rpb24oeyB0eDogbmV3IERhc2hUcmFuc2FjdGlvbjxiaWdpbnQ+KG9wdHMubmV0d29yaykgfSkpXG4gICAgKTtcbiAgfVxuXG4gIHNldFR5cGUodHlwZTogbnVtYmVyKTogRGFzaFBzYnQge1xuICAgIHRoaXMuY2hlY2tGb3JTaWduYXR1cmVzKCd0eXBlJyk7XG4gICAgdGhpcy50eC50eXBlID0gdHlwZTtcbiAgICByZXR1cm4gdGhpcztcbiAgfVxuXG4gIHNldEV4dHJhUGF5bG9hZChleHRyYVBheWxvYWQ/OiBCdWZmZXIpOiBEYXNoUHNidCB7XG4gICAgdGhpcy5jaGVja0ZvclNpZ25hdHVyZXMoJ2V4dHJhUGF5bG9hZCcpO1xuICAgIHRoaXMudHguZXh0cmFQYXlsb2FkID0gZXh0cmFQYXlsb2FkO1xuICAgIHJldHVybiB0aGlzO1xuICB9XG59XG4iXX0=
@@ -0,0 +1,39 @@
1
+ /// <reference types="node" />
2
+ import { Transaction } from 'bitcoinjs-lib';
3
+ import { UtxoTransaction } from '../UtxoTransaction';
4
+ import { Network } from '../../networks';
5
+ export declare class DashTransaction<TNumber extends number | bigint = number> extends UtxoTransaction<TNumber> {
6
+ static DASH_NORMAL: number;
7
+ static DASH_PROVIDER_REGISTER: number;
8
+ static DASH_PROVIDER_UPDATE_SERVICE: number;
9
+ static DASH_PROVIDER_UPDATE_REGISTRAR: number;
10
+ static DASH_PROVIDER_UPDATE_REVOKE: number;
11
+ static DASH_COINBASE: number;
12
+ static DASH_QUORUM_COMMITMENT: number;
13
+ type: number;
14
+ extraPayload?: Buffer;
15
+ constructor(network: Network, tx?: Transaction<bigint | number>, amountType?: 'bigint' | 'number');
16
+ protected static newTransaction<TNumber extends number | bigint = number>(network: Network, transaction?: DashTransaction<number | bigint>, amountType?: 'number' | 'bigint'): DashTransaction<TNumber>;
17
+ static fromBuffer<TNumber extends number | bigint = number>(buffer: Buffer, noStrict: boolean, amountType: "number" | "bigint" | undefined, network: Network): DashTransaction<TNumber>;
18
+ clone<TN2 extends bigint | number = TNumber>(amountType?: 'number' | 'bigint'): DashTransaction<TN2>;
19
+ byteLength(_ALLOW_WITNESS?: boolean): number;
20
+ /**
21
+ * Helper to override `__toBuffer()` of bitcoinjs.Transaction.
22
+ * Since the method is private, we use a hack in the constructor to make it work.
23
+ *
24
+ * TODO: remove `private` modifier in bitcoinjs `__toBuffer()` or find some other solution
25
+ *
26
+ * @param buffer - optional target buffer
27
+ * @param initialOffset - can only be undefined or 0. Other values are only used for serialization in blocks.
28
+ * @param _ALLOW_WITNESS - ignored
29
+ */
30
+ private toBufferWithExtraPayload;
31
+ getHash(forWitness?: boolean): Buffer;
32
+ /**
33
+ * Build a hash for all or none of the transaction inputs depending on the hashtype
34
+ * @param hashType
35
+ * @returns Buffer
36
+ */
37
+ getPrevoutHash(hashType: number): Buffer;
38
+ }
39
+ //# sourceMappingURL=DashTransaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashTransaction.d.ts","sourceRoot":"","sources":["../../../../src/bitgo/bbc/DashTransaction.ts"],"names":[],"mappings":";AACA,OAAO,EAAqB,WAAW,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAgB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAS,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEhD,qBAAa,eAAe,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAAE,SAAQ,eAAe,CAAC,OAAO,CAAC;IACrG,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@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DashTransaction = void 0;
4
+ const bufferutils_1 = require("bitcoinjs-lib/src/bufferutils");
5
+ const bitcoinjs_lib_1 = require("bitcoinjs-lib");
6
+ const UtxoTransaction_1 = require("../UtxoTransaction");
7
+ const networks_1 = require("../../networks");
8
+ class DashTransaction extends UtxoTransaction_1.UtxoTransaction {
9
+ constructor(network, tx, amountType) {
10
+ super(network, tx, amountType);
11
+ this.type = 0;
12
+ if (!networks_1.isBbc(network)) {
13
+ throw new Error(`invalid network`);
14
+ }
15
+ if (tx) {
16
+ this.version = tx.version;
17
+ if (tx instanceof DashTransaction) {
18
+ this.type = tx.type;
19
+ this.extraPayload = tx.extraPayload;
20
+ }
21
+ }
22
+ // since `__toBuffer` is private we have to do a little hack here
23
+ this.__toBuffer = this.toBufferWithExtraPayload;
24
+ }
25
+ static newTransaction(network, transaction, amountType) {
26
+ return new DashTransaction(network, transaction, amountType);
27
+ }
28
+ static fromBuffer(buffer, noStrict, amountType = 'number', network) {
29
+ const tx = new DashTransaction(network, super.fromBuffer(buffer, true, amountType, network));
30
+ tx.type = tx.version >> 16;
31
+ tx.version = tx.version & 0xffff;
32
+ if (tx.byteLength() !== buffer.length) {
33
+ const bufferReader = new bufferutils_1.BufferReader(buffer, tx.byteLength());
34
+ tx.extraPayload = bufferReader.readVarSlice();
35
+ }
36
+ return tx;
37
+ }
38
+ clone(amountType) {
39
+ return new DashTransaction(this.network, this, amountType);
40
+ }
41
+ byteLength(_ALLOW_WITNESS) {
42
+ return super.byteLength(_ALLOW_WITNESS) + (this.extraPayload ? UtxoTransaction_1.varSliceSize(this.extraPayload) : 0);
43
+ }
44
+ /**
45
+ * Helper to override `__toBuffer()` of bitcoinjs.Transaction.
46
+ * Since the method is private, we use a hack in the constructor to make it work.
47
+ *
48
+ * TODO: remove `private` modifier in bitcoinjs `__toBuffer()` or find some other solution
49
+ *
50
+ * @param buffer - optional target buffer
51
+ * @param initialOffset - can only be undefined or 0. Other values are only used for serialization in blocks.
52
+ * @param _ALLOW_WITNESS - ignored
53
+ */
54
+ toBufferWithExtraPayload(buffer, initialOffset, _ALLOW_WITNESS = false) {
55
+ // We can ignore the `_ALLOW_WITNESS` parameter here since it has no effect.
56
+ if (!buffer) {
57
+ buffer = Buffer.allocUnsafe(this.byteLength(false));
58
+ }
59
+ if (initialOffset !== undefined && initialOffset !== 0) {
60
+ throw new Error(`not supported`);
61
+ }
62
+ // Start out with regular bitcoin byte sequence.
63
+ // This buffer will have excess size because it uses `byteLength()` to allocate.
64
+ const baseBuffer = bitcoinjs_lib_1.Transaction.prototype.__toBuffer.call(this);
65
+ baseBuffer.copy(buffer);
66
+ // overwrite leading version bytes (uint16 version, uint16 type)
67
+ const bufferWriter = new bufferutils_1.BufferWriter(buffer, 0);
68
+ bufferWriter.writeUInt32((this.version & 0xffff) | (this.type << 16));
69
+ // Seek to end of original byte sequence and add extraPayload.
70
+ // We must use the byteLength as calculated by the bitcoinjs implementation since
71
+ // `baseBuffer` has an excess size.
72
+ if (this.extraPayload) {
73
+ bufferWriter.offset = bitcoinjs_lib_1.Transaction.prototype.byteLength.call(this);
74
+ bufferWriter.writeVarSlice(this.extraPayload);
75
+ }
76
+ return buffer;
77
+ }
78
+ getHash(forWitness) {
79
+ if (forWitness) {
80
+ throw new Error(`invalid argument`);
81
+ }
82
+ return bitcoinjs_lib_1.crypto.hash256(this.toBuffer());
83
+ }
84
+ /**
85
+ * Build a hash for all or none of the transaction inputs depending on the hashtype
86
+ * @param hashType
87
+ * @returns Buffer
88
+ */
89
+ getPrevoutHash(hashType) {
90
+ if (!(hashType & UtxoTransaction_1.UtxoTransaction.SIGHASH_ANYONECANPAY)) {
91
+ const bufferWriter = new bufferutils_1.BufferWriter(Buffer.allocUnsafe(36 * this.ins.length));
92
+ this.ins.forEach(function (txIn) {
93
+ bufferWriter.writeSlice(txIn.hash);
94
+ bufferWriter.writeUInt32(txIn.index);
95
+ });
96
+ return bitcoinjs_lib_1.crypto.hash256(bufferWriter.buffer);
97
+ }
98
+ return Buffer.alloc(32, 0);
99
+ }
100
+ }
101
+ exports.DashTransaction = DashTransaction;
102
+ DashTransaction.DASH_NORMAL = 0;
103
+ DashTransaction.DASH_PROVIDER_REGISTER = 1;
104
+ DashTransaction.DASH_PROVIDER_UPDATE_SERVICE = 2;
105
+ DashTransaction.DASH_PROVIDER_UPDATE_REGISTRAR = 3;
106
+ DashTransaction.DASH_PROVIDER_UPDATE_REVOKE = 4;
107
+ DashTransaction.DASH_COINBASE = 5;
108
+ DashTransaction.DASH_QUORUM_COMMITMENT = 6;
109
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGFzaFRyYW5zYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL2JiYy9EYXNoVHJhbnNhY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0RBQTJFO0FBQzNFLGlEQUErRDtBQUUvRCx3REFBbUU7QUFDbkUsNkNBQWdEO0FBRWhELE1BQWEsZUFBMEQsU0FBUSxpQ0FBd0I7SUFZckcsWUFBWSxPQUFnQixFQUFFLEVBQWlDLEVBQUUsVUFBZ0M7UUFDL0YsS0FBSyxDQUFDLE9BQU8sRUFBRSxFQUFFLEVBQUUsVUFBVSxDQUFDLENBQUM7UUFKMUIsU0FBSSxHQUFHLENBQUMsQ0FBQztRQU1kLElBQUksQ0FBQyxnQkFBSyxDQUFDLE9BQU8sQ0FBQyxFQUFFO1lBQ25CLE1BQU0sSUFBSSxLQUFLLENBQUMsaUJBQWlCLENBQUMsQ0FBQztTQUNwQztRQUVELElBQUksRUFBRSxFQUFFO1lBQ04sSUFBSSxDQUFDLE9BQU8sR0FBRyxFQUFFLENBQUMsT0FBTyxDQUFDO1lBRTFCLElBQUksRUFBRSxZQUFZLGVBQWUsRUFBR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4gICAgcmV0dXJuIGJjcnlwdG8uaGFzaDI1Nih0aGlzLnRvQnVmZmVyKCkpO1xuICB9XG5cbiAgLyoqXG4gICAqIEJ1aWxkIGEgaGFzaCBmb3IgYWxsIG9yIG5vbmUgb2YgdGhlIHRyYW5zYWN0aW9uIGlucHV0cyBkZXBlbmRpbmcgb24gdGhlIGhhc2h0eXBlXG4gICAqIEBwYXJhbSBoYXNoVHlwZVxuICAgKiBAcmV0dXJucyBCdWZmZXJcbiAgICovXG4gIGdldFByZXZvdXRIYXNoKGhhc2hUeXBlOiBudW1iZXIpOiBCdWZmZXIge1xuICAgIGlmICghKGhhc2hUeXBlICYgVXR4b1RyYW5zYWN0aW9uLlNJR0hBU0hfQU5ZT05FQ0FOUEFZKSkge1xuICAgICAgY29uc3QgYnVmZmVyV3JpdGVyID0gbmV3IEJ1ZmZlcldyaXRlcihCdWZmZXIuYWxsb2NVbnNhZmUoMzYgKiB0aGlzLmlucy5sZW5ndGgpKTtcblxuICAgICAgdGhpcy5pbnMuZm9yRWFjaChmdW5jdGlvbiAodHhJbikge1xuICAgICAgICBidWZmZXJXcml0ZXIud3JpdGVTbGljZSh0eEluLmhhc2gpO1xuICAgICAgICBidWZmZXJXcml0ZXIud3JpdGVVSW50MzIodHhJbi5pbmRleCk7XG4gICAgICB9KTtcblxuICAgICAgcmV0dXJuIGJjcnlwdG8uaGFzaDI1NihidWZmZXJXcml0ZXIuYnVmZmVyKTtcbiAgICB9XG5cbiAgICByZXR1cm4gQnVmZmVyLmFsbG9jKDMyLCAwKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,14 @@
1
+ /// <reference types="node" />
2
+ import * as bitcoinjs from 'bitcoinjs-lib';
3
+ import { Network } from '../../networks';
4
+ import { UtxoTransactionBuilder } from '../UtxoTransactionBuilder';
5
+ import { DashTransaction } from './BabacoinTransaction';
6
+ import { UtxoTransaction } from '../UtxoTransaction';
7
+ export declare class DashTransactionBuilder<TNumber extends number | bigint = number> extends UtxoTransactionBuilder<TNumber, DashTransaction<TNumber>> {
8
+ constructor(network: Network, tx?: UtxoTransaction<TNumber>);
9
+ protected static newTransactionBuilder<TNumber extends number | bigint>(network: Network, tx: UtxoTransaction<TNumber>): DashTransactionBuilder<TNumber>;
10
+ protected createInitialTransaction(network: Network, tx?: bitcoinjs.Transaction<TNumber>): DashTransaction<TNumber>;
11
+ setType(type: number): void;
12
+ setExtraPayload(extraPayload?: Buffer): void;
13
+ }
14
+ //# sourceMappingURL=DashTransactionBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DashTransactionBuilder.d.ts","sourceRoot":"","sources":["../../../../src/bitgo/bbc/DashTransactionBuilder.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,SAAS,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,sBAAsB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAAE,SAAQ,sBAAsB,CAC1G,OAAO,EACP,eAAe,CAAC,OAAO,CAAC,CACzB;gBACa,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC;IAQ3D,SAAS,CAAC,MAAM,CAAC,qBAAqB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,EACpE,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,GAC3B,sBAAsB,CAAC,OAAO,CAAC;IAIlC,SAAS,CAAC,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC;IAInH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI3B,eAAe,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI;CAG7C"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DashTransactionBuilder = void 0;
4
+ const UtxoTransactionBuilder_1 = require("../UtxoTransactionBuilder");
5
+ const DashTransaction_1 = require("./DashTransaction");
6
+ class DashTransactionBuilder extends UtxoTransactionBuilder_1.UtxoTransactionBuilder {
7
+ constructor(network, tx) {
8
+ super(network, tx);
9
+ if (tx instanceof DashTransaction_1.DashTransaction) {
10
+ this.setType(tx.type);
11
+ this.setExtraPayload(tx.extraPayload);
12
+ }
13
+ }
14
+ static newTransactionBuilder(network, tx) {
15
+ return new DashTransactionBuilder(network, tx);
16
+ }
17
+ createInitialTransaction(network, tx) {
18
+ return new DashTransaction_1.DashTransaction(network, tx);
19
+ }
20
+ setType(type) {
21
+ this.tx.type = type;
22
+ }
23
+ setExtraPayload(extraPayload) {
24
+ this.tx.extraPayload = extraPayload;
25
+ }
26
+ }
27
+ exports.DashTransactionBuilder = DashTransactionBuilder;
28
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGFzaFRyYW5zYWN0aW9uQnVpbGRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9iaXRnby9iYmMvRGFzaFRyYW5zYWN0aW9uQnVpbGRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxzRUFBbUU7QUFDbkUsdURBQW9EO0FBR3BELE1BQWEsc0JBQWlFLFNBQVEsK0NBR3JGO0lBQ0MsWUFBWSxPQUFnQixFQUFFLEVBQTZCO1FBQ3pELEtBQUssQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDbkIsSUFBSSxFQUFFLFlBQVksaUNBQWUsRUFBRTtZ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nVtYmVyKTogdm9pZCB7XG4gICAgdGhpcy50eC50eXBlID0gdHlwZTtcbiAgfVxuXG4gIHNldEV4dHJhUGF5bG9hZChleHRyYVBheWxvYWQ/OiBCdWZmZXIpOiB2b2lkIHtcbiAgICB0aGlzLnR4LmV4dHJhUGF5bG9hZCA9IGV4dHJhUGF5bG9hZDtcbiAgfVxufVxuIl19
@@ -0,0 +1,4 @@
1
+ export * from './BabacoinPsbt';
2
+ export * from './BabacoinTransaction';
3
+ export * from './BabacoinTransactionBuilder';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bitgo/bbc/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC"}
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./LitecoinPsbt"), exports);
14
- __exportStar(require("./LitecoinTransaction"), exports);
15
- __exportStar(require("./LitecoinTransactionBuilder"), exports);
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYml0Z28vbGl0ZWNvaW4vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsaURBQStCO0FBQy9CLHdEQUFzQztBQUN0QywrREFBNkMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL0xpdGVjb2luUHNidCc7XG5leHBvcnQgKiBmcm9tICcuL0xpdGVjb2luVHJhbnNhY3Rpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9MaXRlY29pblRyYW5zYWN0aW9uQnVpbGRlcic7XG4iXX0=
13
+ __exportStar(require("./DashPsbt"), exports);
14
+ __exportStar(require("./DashTransaction"), exports);
15
+ __exportStar(require("./DashTransactionBuilder"), exports);
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYml0Z28vYmJjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7OztBQUFBLDZDQUEyQjtBQUMzQixvREFBa0M7QUFDbEMsMkRBQXlDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9EYXNoUHNidCc7XG5leHBvcnQgKiBmcm9tICcuL0Rhc2hUcmFuc2FjdGlvbic7XG5leHBvcnQgKiBmcm9tICcuL0Rhc2hUcmFuc2FjdGlvbkJ1aWxkZXInO1xuIl19
@@ -47,7 +47,7 @@ function getPrefix(network) {
47
47
  case networks_1.networks.ecash:
48
48
  return 'ecash';
49
49
  case networks_1.networks.ecashTest:
50
- return 'ectest';
50
+ return 'ecashtest';
51
51
  default:
52
52
  throw new Error(`unsupported prefix for ${networks_1.getNetworkName(network)}`);
53
53
  }
@@ -148,4 +148,4 @@ function toOutputScriptWithFormat(address, format, network) {
148
148
  throw new Error(`invalid format`);
149
149
  }
150
150
  exports.toOutputScriptWithFormat = toOutputScriptWithFormat;
151
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkcmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9iaXRnby9iaXRjb2luY2FzaC9hZGRyZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBOzs7Ozs7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091dHB1dFNjcmlwdChhZGRyZXNzLCBuZXR3b3JrIGFzIGJpdGNvaW5qcy5OZXR3b3JrKTtcbiAgfVxuXG4gIHRocm93IG5ldyBFcnJvcihgaW52YWxpZCBmb3JtYXRgKTtcbn1cbiJdfQ==
@@ -1,9 +1,7 @@
1
- export { PsbtInput, PsbtOutput } from 'bip174/src/lib/interfaces';
2
1
  export * as bcashAddress from './bitcoincash';
3
2
  export * as keyutil from './keyutil';
4
3
  export * as nonStandardHalfSigned from './nonStandardHalfSigned';
5
4
  export * as outputScripts from './outputScripts';
6
- export * as musig2 from './Musig2';
7
5
  export * from './dash';
8
6
  export * from './parseInput';
9
7
  export * from './signature';
@@ -16,12 +14,4 @@ export * from './UtxoTransactionBuilder';
16
14
  export * from './wallet';
17
15
  export * from './zcash';
18
16
  export * from './tnumber';
19
- export * from './litecoin';
20
- export * from './PsbtUtil';
21
- import { PsbtInput } from 'bip174/src/lib/interfaces';
22
- /**
23
- * alias for PsbtInput type to avoid direct bip174 library dependency by users of the util functions
24
- * @deprecated use PsbtInput instead
25
- */
26
- export declare type PsbtInputType = PsbtInput;
27
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bitgo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,qBAAqB,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD;;;GAGG;AACH,oBAAY,aAAa,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bitgo/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,qBAAqB,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
@@ -10,12 +10,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.musig2 = exports.outputScripts = exports.nonStandardHalfSigned = exports.keyutil = exports.bcashAddress = void 0;
13
+ exports.outputScripts = exports.nonStandardHalfSigned = exports.keyutil = exports.bcashAddress = void 0;
14
14
  exports.bcashAddress = require("./bitcoincash");
15
15
  exports.keyutil = require("./keyutil");
16
16
  exports.nonStandardHalfSigned = require("./nonStandardHalfSigned");
17
17
  exports.outputScripts = require("./outputScripts");
18
- exports.musig2 = require("./Musig2");
19
18
  __exportStar(require("./dash"), exports);
20
19
  __exportStar(require("./parseInput"), exports);
21
20
  __exportStar(require("./signature"), exports);
@@ -28,6 +27,4 @@ __exportStar(require("./UtxoTransactionBuilder"), exports);
28
27
  __exportStar(require("./wallet"), exports);
29
28
  __exportStar(require("./zcash"), exports);
30
29
  __exportStar(require("./tnumber"), exports);
31
- __exportStar(require("./litecoin"), exports);
32
- __exportStar(require("./PsbtUtil"), exports);
33
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYml0Z28vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQUVBLGdEQUE4QztBQUM5Qyx1Q0FBcUM7QUFDckMsbUVBQWlFO0FBQ2pFLG1EQUFpRDtBQUNqRCxxQ0FBbUM7QUFDbkMseUNBQXVCO0FBQ3ZCLCtDQUE2QjtBQUM3Qiw4Q0FBNEI7QUFDNUIsZ0RBQThCO0FBQzlCLDBDQUF3QjtBQUN4Qiw0Q0FBMEI7QUFDMUIsNkNBQTJCO0FBQzNCLG9EQUFrQztBQUNsQywyREFBeUM7QUFDekMsMkNBQXlCO0FBQ3pCLDBDQUF3QjtBQUN4Qiw0Q0FBMEI7QUFDMUIsNkNBQTJCO0FBQzNCLDZDQUEyQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IFBzYnRJbnB1dCwgUHNidE91dHB1dCB9IGZyb20gJ2JpcDE3NC9zcmMvbGliL2ludGVyZmFjZXMnO1xuXG5leHBvcnQgKiBhcyBiY2FzaEFkZHJlc3MgZnJvbSAnLi9iaXRjb2luY2FzaCc7XG5leHBvcnQgKiBhcyBrZXl1dGlsIGZyb20g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nJvbSAnLi9VdHhvUHNidCc7XG5leHBvcnQgKiBmcm9tICcuL1V0eG9UcmFuc2FjdGlvbic7XG5leHBvcnQgKiBmcm9tICcuL1V0eG9UcmFuc2FjdGlvbkJ1aWxkZXInO1xuZXhwb3J0ICogZnJvbSAnLi93YWxsZXQnO1xuZXhwb3J0ICogZnJvbSAnLi96Y2FzaCc7XG5leHBvcnQgKiBmcm9tICcuL3RudW1iZXInO1xuIl19
@@ -6,7 +6,7 @@ export { scriptTypeForChain } from './wallet/chains';
6
6
  export declare const scriptTypeP2shP2pk = "p2shP2pk";
7
7
  export declare type ScriptTypeP2shP2pk = typeof scriptTypeP2shP2pk;
8
8
  export declare const scriptTypes2Of3: readonly ["p2sh", "p2shP2wsh", "p2wsh", "p2tr", "p2trMusig2"];
9
- export declare type ScriptType2Of3 = (typeof scriptTypes2Of3)[number];
9
+ export declare type ScriptType2Of3 = typeof scriptTypes2Of3[number];
10
10
  export declare function isScriptType2Of3(t: string): t is ScriptType2Of3;
11
11
  export declare type ScriptType = ScriptTypeP2shP2pk | ScriptType2Of3;
12
12
  /**
@@ -65,8 +65,6 @@ export declare function checkXOnlyPublicKey(b: Buffer): Buffer;
65
65
  * Validates size of the pub key for 32 bytes and returns the same iff true.
66
66
  */
67
67
  export declare function checkPlainPublicKey(b: Buffer): Buffer;
68
- export declare function checkTapMerkleRoot(b: Buffer): Buffer;
69
- export declare function checkTxHash(b: Buffer): Buffer;
70
68
  export declare function createPaymentP2tr(pubkeys: Triple<Buffer>, redeemIndex?: number | {
71
69
  signer: Buffer;
72
70
  cosigner: Buffer;
@@ -1 +1 @@
1
- {"version":3,"file":"outputScripts.d.ts","sourceRoot":"","sources":["../../../src/bitgo/outputScripts.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,SAAS,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,OAAO,EAA0D,MAAM,IAAI,CAAC;AAErF,OAAO,EAAY,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC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