utxo-lib 1.0.5 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ export declare const chainCodesP2shP2wsh: readonly [10, 11];
18
18
  export declare const chainCodesP2wsh: readonly [20, 21];
19
19
  export declare const chainCodesP2tr: readonly [30, 31];
20
20
  export declare const chainCodesP2trMusig2: readonly [40, 41];
21
- export declare const chainCodes: (0 | 30 | 1 | 10 | 31 | 11 | 20 | 21 | 40 | 41)[];
21
+ export declare const chainCodes: (0 | 1 | 31 | 20 | 10 | 11 | 21 | 30 | 40 | 41)[];
22
22
  export declare type ChainCode = typeof chainCodes[number];
23
23
  export declare function isChainCode(n: unknown): n is ChainCode;
24
24
  /**
@@ -1,6 +1,6 @@
1
1
  import { ECPairAPI, ECPairInterface } from 'ecpair';
2
2
  import { BIP32API, BIP32Interface } from 'bip32';
3
- import { MuSig } from '@brandonblack/musig';
3
+ import { MuSig } from '@brandonblack/musig/lib';
4
4
  declare const ecc: {
5
5
  isPoint: (p: Uint8Array) => boolean;
6
6
  isPrivate: (d: Uint8Array) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"noble_ecc.d.ts","sourceRoot":"","sources":["../../src/noble_ecc.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAiB,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAgB,cAAc,EAAE,MAAM,OAAO,CAAC;AAI/D,OAAO,EAAE,KAAK,EAAgB,MAAM,qBAAqB,CAAC;AAqC1D,QAAA,MAAM,GAAG;iBACM,UAAU,KAAG,OAAO;mBAClB,UAAU,KAAG,OAAO;sBACjB,UAAU,KAAG,OAAO;4BAEd,UAAU,SAAS,UAAU,KAAG;QAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;QAAC,WAAW,EAAE,UAAU,CAAA;KAAE,GAAG,IAAI;0BAOnF,UAAU,uCAAyB,UAAU,GAAG,IAAI;uBAGvD,UAAU,uCAAyB,UAAU;uBAI7C,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D,UAAU,uCAAyB,UAAU;uBAI7C,UAAU,SAAS,UAAU,uCAAyB,UAAU,GAAG,IAAI;kBAG5E,UAAU,KAAK,UAAU,uCAAyB,UAAU,GAAG,IAAI;wBAO7D,UAAU,SAAS,UAAU,uCAAyB,UAAU,GAAG,IAAI;oBAG3E,UAAU,SAAS,UAAU,KAAG,UAAU,GAAG,IAAI;uBAS9C,UAAU,KAAG,UAAU;cAEhC,UAAU,KAAK,UAAU,iCAAmB,UAAU;qBAI/C,UAAU,KAAK,UAAU,MAAK,UAAU,KAA4B,UAAU;gBAInF,UAAU,KAAK,UAAU,aAAa,UAAU,mCAAqB,OAAO;uBAIrE,UAAU,KAAK,UAAU,aAAa,UAAU,KAAG,OAAO;CAG9E,CAAC;AAkEF,QAAA,MAAM,MAAM,EAAE,SAA8B,CAAC;AAC7C,QAAA,MAAM,KAAK,EAAE,QAA4B,CAAC;AAC1C,QAAA,MAAM,KAAK,EAAE,KAA4B,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC"}
@@ -9,7 +9,7 @@ const bip32_1 = require("bip32");
9
9
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
10
  // @ts-ignore base_crypto is exported as a subPath export, ignoring since compiler complains about importing like this
11
11
  const baseCrypto = require("@brandonblack/musig/lib/base_crypto");
12
- const musig_1 = require("@brandonblack/musig");
12
+ const lib_1 = require("@brandonblack/musig/lib");
13
13
  necc.utils.sha256Sync = (...messages) => {
14
14
  const sha256 = createHash('sha256');
15
15
  for (const message of messages)
@@ -163,6 +163,6 @@ const ECPair = ecpair_1.ECPairFactory(ecc);
163
163
  exports.ECPair = ECPair;
164
164
  const bip32 = bip32_1.BIP32Factory(ecc);
165
165
  exports.bip32 = bip32;
166
- const musig = musig_1.MuSigFactory(crypto);
166
+ const musig = lib_1.MuSigFactory(crypto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AgfSxcbiAgZ2V0UHVibGljS2V5KHM6IFVpbnQ4QXJyYXksIGNvbXByZXNzOiBib29sZWFuKTogVWludDhBcnJheSB8IG51bGwge1xuICAgIHRyeSB7XG4gICAgICByZXR1cm4gbmVjYy5nZXRQdWJsaWNLZXkocywgY29tcHJlc3MpO1xuICAgIH0gY2F0Y2gge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICB9LFxuICB0YWdnZWRIYXNoOiBuZWNjLnV0aWxzLnRhZ2dlZEhhc2hTeW5jLFxuICBzaGEyNTYoLi4ubWVzc2FnZXM6IFVpbnQ4QXJyYXlbXSk6IFVpbnQ4QXJyYXkge1xuICAgIGNvbnN0IHNoYTI1NiA9IGNyZWF0ZUhhc2goJ3NoYTI1NicpO1xuICAgIGZvciAoY29uc3QgbWVzc2FnZSBvZiBtZXNzYWdlcykgc2hhMjU2LnVwZGF0ZShtZXNzYWdlKTtcbiAgICByZXR1cm4gc2hhMjU2LmRpZ2VzdCgpO1xuICB9LFxufTtcblxuY29uc3QgRUNQYWlyOiBFQ1BhaXJBUEkgPSBFQ1BhaXJGYWN0b3J5KGVjYyk7XG5jb25zdCBiaXAzMjogQklQMzJBUEkgPSBCSVAzMkZhY3RvcnkoZWNjKTtcbmNvbnN0IG11c2lnOiBNdVNpZyA9IE11U2lnRmFjdG9yeShjcnlwdG8pO1xuXG5leHBvcnQgeyBlY2MsIEVDUGFpciwgRUNQYWlyQVBJLCBFQ1BhaXJJbnRlcmZhY2UsIGJpcDMyLCBCSVAzMkFQSSwgQklQMzJJbnRlcmZhY2UsIG11c2lnLCBNdVNpZyB9O1xuIl19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utxo-lib",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Client-side Bitcoin JavaScript library",
5
5
  "main": "./dist/src/index.js",
6
6
  "engines": {
@@ -1,12 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,27 +0,0 @@
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGFzaFBzYnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYml0Z28vYmJjL0Rhc2hQc2J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHVEQUFvRDtBQUNwRCwwQ0FBaUQ7QUFFakQsbUNBQTBDO0FBQzFDLGlEQUFnRDtBQUVoRCxNQUFhLFFBQVMsU0FBUSxtQkFBaUM7SUFDbkQsTUFBTSxDQUFDLHFCQUFxQixDQUFDLE1BQWMsRUFBRSxPQUFnQjtRQUNyRSxPQUFPLGlDQUFlLENBQUMsVUFBVSxDQUFTLE1BQU0sRUFBRSxLQUFLLEVBQUUsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQzlFLENBQUM7SUFFRCxNQUFNLENBQUMsVUFBVSxDQUFDLElBQWMsRUFBRSxJQUFlO1FBQy9DLE9BQU8sSUFBSSxRQUFRLENBQ2pCLElBQUksRUFDSixJQUFJLElBQUksSUFBSSxhQUFRLENBQUMsSUFBSSwrQkFBZSxDQUFDLEVBQUUsRU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bnNhY3Rpb248YmlnaW50PiB7XG4gICAgcmV0dXJuIERhc2hUcmFuc2FjdGlvbi5mcm9tQnVmZmVyPGJpZ2ludD4oYnVmZmVyLCBmYWxzZSwgJ2JpZ2ludCcsIG5ldHdvcmspO1xuICB9XG5cbiAgc3RhdGljIGNyZWF0ZVBzYnQob3B0czogUHNidE9wdHMsIGRhdGE/OiBQc2J0QmFzZSk6IERhc2hQc2J0IHtcbiAgICByZXR1cm4gbmV3IERhc2hQc2J0KFxuICAgICAgb3B0cyxcbiAgICAgIGRhdGEgfHwgbmV3IFBzYnRCYXNlKG5ldyBQc2J0VHJhbnNhY3Rpb24oeyB0eDogbmV3IERhc2hUcmFuc2FjdGlvbjxiaWdpbnQ+KG9wdHMubmV0d29yaykgfSkpXG4gICAgKTtcbiAgfVxuXG4gIHNldFR5cGUodHlwZTogbnVtYmVyKTogRGFzaFBzYnQge1xuICAgIHRoaXMuY2hlY2tGb3JTaWduYXR1cmVzKCd0eXBlJyk7XG4gICAgdGhpcy50eC50eXBlID0gdHlwZTtcbiAgICByZXR1cm4gdGhpcztcbiAgfVxuXG4gIHNldEV4dHJhUGF5bG9hZChleHRyYVBheWxvYWQ/OiBCdWZmZXIpOiBEYXNoUHNidCB7XG4gICAgdGhpcy5jaGVja0ZvclNpZ25hdHVyZXMoJ2V4dHJhUGF5bG9hZCcpO1xuICAgIHRoaXMudHguZXh0cmFQYXlsb2FkID0gZXh0cmFQYXlsb2FkO1xuICAgIHJldHVybiB0aGlzO1xuICB9XG59XG4iXX0=
@@ -1,39 +0,0 @@
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
@@ -1 +0,0 @@
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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,EAAE,MAAM,GAAG,MAAM;CAczC"}
@@ -1,109 +0,0 @@
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGFzaFRyYW5zYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL2JiYy9EYXNoVHJhbnNhY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0RBQTJFO0FBQzNFLGlEQUErRDtBQUUvRCx3REFBbUU7QUFDbkUsNkNBQWdEO0FBRWhELE1BQWEsZUFBMEQsU0FBUSxpQ0FBd0I7SUFZckcsWUFBWSxPQUFnQixFQUFFLEVBQWlDLEVBQUUsVUFBZ0M7UUFDL0YsS0FBSyxDQUFDLE9BQU8sRUFBRSxFQUFFLEVBQUUsVUFBVSxDQUFDLENBQUM7UUFKMUIsU0FBSSxHQUFHLENBQUMsQ0FBQztRQU1kLElBQUksQ0FBQyxnQkFBSyxDQUFDLE9BQU8sQ0FBQyxFQUFFO1lBQ25CLE1BQU0sSUFBSSxLQUFLLENBQUMsaUJBQWlCLENBQUMsQ0FBQztTQUNwQztRQUVELElBQUksRUFBRSxFQUFFO1lBQ04sSUFBSSxDQUFDLE9BQU8sR0FBRyxFQUFFLENBQUMsT0FBTyxDQUFDO1lBRTFCLElBQUksRUFBRSxZQUFZLGVBQWUsRUFBRTtnQkFDakMsSUFBSSxDQUFDLElBQUksR0FBRyxFQUFFLENBQUMsSUFBSSxDQUFDO2dCQUNw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cbiAgLyoqXG4gICAqIEJ1aWxkIGEgaGFzaCBmb3IgYWxsIG9yIG5vbmUgb2YgdGhlIHRyYW5zYWN0aW9uIGlucHV0cyBkZXBlbmRpbmcgb24gdGhlIGhhc2h0eXBlXG4gICAqIEBwYXJhbSBoYXNoVHlwZVxuICAgKiBAcmV0dXJucyBCdWZmZXJcbiAgICovXG4gIGdldFByZXZvdXRIYXNoKGhhc2hUeXBlOiBudW1iZXIpOiBCdWZmZXIge1xuICAgIGlmICghKGhhc2hUeXBlICYgVXR4b1RyYW5zYWN0aW9uLlNJR0hBU0hfQU5ZT05FQ0FOUEFZKSkge1xuICAgICAgY29uc3QgYnVmZmVyV3JpdGVyID0gbmV3IEJ1ZmZlcldyaXRlcihCdWZmZXIuYWxsb2NVbnNhZmUoMzYgKiB0aGlzLmlucy5sZW5ndGgpKTtcblxuICAgICAgdGhpcy5pbnMuZm9yRWFjaChmdW5jdGlvbiAodHhJbikge1xuICAgICAgICBidWZmZXJXcml0ZXIud3JpdGVTbGljZSh0eEluLmhhc2gpO1xuICAgICAgICBidWZmZXJXcml0ZXIud3JpdGVVSW50MzIodHhJbi5pbmRleCk7XG4gICAgICB9KTtcblxuICAgICAgcmV0dXJuIGJjcnlwdG8uaGFzaDI1NihidWZmZXJXcml0ZXIuYnVmZmVyKTtcbiAgICB9XG5cbiAgICByZXR1cm4gQnVmZmVyLmFsbG9jKDMyLCAwKTtcbiAgfVxufVxuIl19
@@ -1,14 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,28 +0,0 @@
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGFzaFRyYW5zYWN0aW9uQnVpbGRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9iaXRnby9iYmMvRGFzaFRyYW5zYWN0aW9uQnVpbGRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxzRUFBbUU7QUFDbkUsdURBQW9EO0FBR3BELE1BQWEsc0JBQWlFLFNBQVEsK0NBR3JGO0lBQ0MsWUFBWSxPQUFnQixFQUFFLEVBQTZCO1FBQ3pELEtBQUssQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDbkIsSUFBSSxFQUFFLFlBQVksaUNBQWUsRUFBRTtZQUNqQyxJQUFJLENBQUMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsQ0FBQztZQUN0QixJQUFJLENBQUMsZUFBZSxDQUFDLEVBQUUsQ0FB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pOiB2b2lkIHtcbiAgICB0aGlzLnR4LmV4dHJhUGF5bG9hZCA9IGV4dHJhUGF5bG9hZDtcbiAgfVxufVxuIl19
@@ -1,4 +0,0 @@
1
- export * from './BabacoinPsbt';
2
- export * from './BabacoinTransaction';
3
- export * from './BabacoinTransactionBuilder';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./DashPsbt"), exports);
14
- __exportStar(require("./DashTransaction"), exports);
15
- __exportStar(require("./DashTransactionBuilder"), exports);
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYml0Z28vYmJjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7OztBQUFBLDZDQUEyQjtBQUMzQixvREFBa0M7QUFDbEMsMkRBQXlDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9EYXNoUHNidCc7XG5leHBvcnQgKiBmcm9tICcuL0Rhc2hUcmFuc2FjdGlvbic7XG5leHBvcnQgKiBmcm9tICcuL0Rhc2hUcmFuc2FjdGlvbkJ1aWxkZXInO1xuIl19