@bsv/sdk 1.1.28 → 1.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/src/compat/ECIES.js +24 -5
- package/dist/cjs/src/compat/ECIES.js.map +1 -1
- package/dist/cjs/src/primitives/Schnorr.js +92 -0
- package/dist/cjs/src/primitives/Schnorr.js.map +1 -0
- package/dist/cjs/src/primitives/index.js +3 -1
- package/dist/cjs/src/primitives/index.js.map +1 -1
- package/dist/cjs/src/totp/totp.js +1 -1
- package/dist/cjs/src/totp/totp.js.map +1 -1
- package/dist/cjs/src/transaction/Beef.js +139 -118
- package/dist/cjs/src/transaction/Beef.js.map +1 -1
- package/dist/cjs/src/transaction/BeefParty.js +30 -26
- package/dist/cjs/src/transaction/BeefParty.js.map +1 -1
- package/dist/cjs/src/transaction/BeefTx.js +25 -15
- package/dist/cjs/src/transaction/BeefTx.js.map +1 -1
- package/dist/cjs/src/transaction/MerklePath.js.map +1 -1
- package/dist/cjs/src/transaction/Transaction.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/compat/ECIES.js +24 -5
- package/dist/esm/src/compat/ECIES.js.map +1 -1
- package/dist/esm/src/primitives/Schnorr.js +87 -0
- package/dist/esm/src/primitives/Schnorr.js.map +1 -0
- package/dist/esm/src/primitives/index.js +1 -0
- package/dist/esm/src/primitives/index.js.map +1 -1
- package/dist/esm/src/totp/totp.js +1 -1
- package/dist/esm/src/totp/totp.js.map +1 -1
- package/dist/esm/src/transaction/Beef.js +142 -121
- package/dist/esm/src/transaction/Beef.js.map +1 -1
- package/dist/esm/src/transaction/BeefParty.js +31 -27
- package/dist/esm/src/transaction/BeefParty.js.map +1 -1
- package/dist/esm/src/transaction/BeefTx.js +29 -19
- package/dist/esm/src/transaction/BeefTx.js.map +1 -1
- package/dist/esm/src/transaction/MerklePath.js.map +1 -1
- package/dist/esm/src/transaction/Transaction.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/compat/ECIES.d.ts.map +1 -1
- package/dist/types/src/primitives/Schnorr.d.ts +65 -0
- package/dist/types/src/primitives/Schnorr.d.ts.map +1 -0
- package/dist/types/src/primitives/index.d.ts +1 -0
- package/dist/types/src/primitives/index.d.ts.map +1 -1
- package/dist/types/src/transaction/Beef.d.ts +94 -94
- package/dist/types/src/transaction/Beef.d.ts.map +1 -1
- package/dist/types/src/transaction/BeefParty.d.ts +23 -23
- package/dist/types/src/transaction/BeefParty.d.ts.map +1 -1
- package/dist/types/src/transaction/BeefTx.d.ts +5 -5
- package/dist/types/src/transaction/BeefTx.d.ts.map +1 -1
- package/dist/types/src/transaction/MerklePath.d.ts.map +1 -1
- package/dist/types/src/transaction/Transaction.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/docs/primitives.md +120 -9
- package/package.json +1 -1
- package/src/compat/ECIES.ts +38 -17
- package/src/compat/__tests/ECIES.test.ts +23 -1
- package/src/primitives/Schnorr.ts +95 -0
- package/src/primitives/__tests/Schnorr.test.ts +272 -0
- package/src/primitives/index.ts +1 -0
- package/src/totp/totp.ts +1 -1
- package/src/transaction/Beef.ts +351 -375
- package/src/transaction/BeefParty.ts +54 -58
- package/src/transaction/BeefTx.ts +128 -143
- package/src/transaction/MerklePath.ts +11 -11
- package/src/transaction/Transaction.ts +32 -32
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import MerklePath from
|
|
2
|
-
import Transaction from
|
|
3
|
-
import ChainTracker from
|
|
4
|
-
import BeefTx from
|
|
5
|
-
import { Reader } from
|
|
1
|
+
import MerklePath from './MerklePath.js';
|
|
2
|
+
import Transaction from './Transaction.js';
|
|
3
|
+
import ChainTracker from './ChainTracker.js';
|
|
4
|
+
import BeefTx from './BeefTx.js';
|
|
5
|
+
import { Reader } from '../primitives/utils.js';
|
|
6
6
|
export declare const BEEF_MAGIC = 4022206465;
|
|
7
7
|
export declare const BEEF_MAGIC_V2 = 4022206466;
|
|
8
8
|
export declare const BEEF_MAGIC_TXID_ONLY_EXTENSION = 4022206465;
|
|
@@ -13,132 +13,132 @@ export declare class Beef {
|
|
|
13
13
|
version: BeefVersion;
|
|
14
14
|
constructor(version?: BeefVersion);
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
* BEEF_MAGIC is the original V1 version.
|
|
17
|
+
* BEEF_MAGIC_V2 includes support for txidOnly transactions in serialized beefs.
|
|
18
|
+
* @returns version magic value based on current contents and constructor version parameter.
|
|
19
|
+
*/
|
|
20
20
|
get magic(): number;
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
* @param txid of `beefTx` to find
|
|
23
|
+
* @returns `BeefTx` in `txs` with `txid`.
|
|
24
|
+
*/
|
|
25
25
|
findTxid(txid: string): BeefTx | undefined;
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
* Merge a MerklePath that is assumed to be fully valid.
|
|
28
|
+
* @param bump
|
|
29
|
+
* @returns index of merged bump
|
|
30
|
+
*/
|
|
31
31
|
mergeBump(bump: MerklePath): number;
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
* Merge a serialized transaction.
|
|
34
|
+
*
|
|
35
|
+
* Checks that a transaction with the same txid hasn't already been merged.
|
|
36
|
+
*
|
|
37
|
+
* Replaces existing transaction with same txid.
|
|
38
|
+
*
|
|
39
|
+
* @param rawTx
|
|
40
|
+
* @param bumpIndex Optional. If a number, must be valid index into bumps array.
|
|
41
|
+
* @returns txid of rawTx
|
|
42
|
+
*/
|
|
43
43
|
mergeRawTx(rawTx: number[], bumpIndex?: number): BeefTx;
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
* Merge a `Transaction` and any referenced `merklePath` and `sourceTransaction`, recursifely.
|
|
46
|
+
*
|
|
47
|
+
* Replaces existing transaction with same txid.
|
|
48
|
+
*
|
|
49
|
+
* Attempts to match an existing bump to the new transaction.
|
|
50
|
+
*
|
|
51
|
+
* @param tx
|
|
52
|
+
* @returns txid of tx
|
|
53
|
+
*/
|
|
54
54
|
mergeTransaction(tx: Transaction): BeefTx;
|
|
55
55
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
* Removes an existing transaction from the BEEF, given its TXID
|
|
57
|
+
* @param txid TXID of the transaction to remove
|
|
58
|
+
*/
|
|
59
59
|
removeExistingTxid(txid: string): void;
|
|
60
60
|
mergeTxidOnly(txid: string): BeefTx;
|
|
61
61
|
mergeBeefTx(btx: BeefTx): BeefTx;
|
|
62
62
|
mergeBeef(beef: number[] | Beef): void;
|
|
63
63
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
* Sorts `txs` and checks structural validity of beef.
|
|
65
|
+
*
|
|
66
|
+
* Does NOT verify merkle roots.
|
|
67
|
+
*
|
|
68
|
+
* Validity requirements:
|
|
69
|
+
* 1. No 'known' txids, unless `allowTxidOnly` is true.
|
|
70
|
+
* 2. All transactions have bumps or their inputs chain back to bumps (or are known).
|
|
71
|
+
* 3. Order of transactions satisfies dependencies before dependents.
|
|
72
|
+
* 4. No transactions with duplicate txids.
|
|
73
|
+
*
|
|
74
|
+
* @param allowTxidOnly optional. If true, transaction txid only is assumed valid
|
|
75
|
+
*/
|
|
76
76
|
isValid(allowTxidOnly?: boolean): boolean;
|
|
77
77
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
78
|
+
* Sorts `txs` and confirms validity of transaction data contained in beef
|
|
79
|
+
* by validating structure of this beef and confirming computed merkle roots
|
|
80
|
+
* using `chainTracker`.
|
|
81
|
+
*
|
|
82
|
+
* Validity requirements:
|
|
83
|
+
* 1. No 'known' txids, unless `allowTxidOnly` is true.
|
|
84
|
+
* 2. All transactions have bumps or their inputs chain back to bumps (or are known).
|
|
85
|
+
* 3. Order of transactions satisfies dependencies before dependents.
|
|
86
|
+
* 4. No transactions with duplicate txids.
|
|
87
|
+
*
|
|
88
|
+
* @param chainTracker Used to verify computed merkle path roots for all bump txids.
|
|
89
|
+
* @param allowTxidOnly optional. If true, transaction txid is assumed valid
|
|
90
|
+
*/
|
|
91
91
|
verify(chainTracker: ChainTracker, allowTxidOnly?: boolean): Promise<boolean>;
|
|
92
92
|
private verifyValid;
|
|
93
93
|
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
* Returns a binary array representing the serialized BEEF
|
|
95
|
+
* @returns A binary array representing the BEEF
|
|
96
|
+
*/
|
|
97
97
|
toBinary(): number[];
|
|
98
98
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
* Returns a hex string representing the serialized BEEF
|
|
100
|
+
* @returns A hex string representing the BEEF
|
|
101
|
+
*/
|
|
102
102
|
toHex(): string;
|
|
103
103
|
static fromReader(br: Reader): Beef;
|
|
104
104
|
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
* Constructs an instance of the Beef class based on the provided binary array
|
|
106
|
+
* @param bin The binary array from which to construct BEEF
|
|
107
|
+
* @returns An instance of the Beef class constructed from the binary data
|
|
108
|
+
*/
|
|
109
109
|
static fromBinary(bin: number[]): Beef;
|
|
110
110
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
* Constructs an instance of the Beef class based on the provided string
|
|
112
|
+
* @param s The string value from which to construct BEEF
|
|
113
|
+
* @param enc The encoding of the string value from which BEEF should be constructed
|
|
114
|
+
* @returns An instance of the Beef class constructed from the string
|
|
115
|
+
*/
|
|
116
116
|
static fromString(s: string, enc?: 'hex' | 'utf8' | 'base64'): Beef;
|
|
117
117
|
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
* Try to validate newTx.bumpIndex by looking for an existing bump
|
|
119
|
+
* that proves newTx.txid
|
|
120
|
+
*
|
|
121
|
+
* @param newTx A new `BeefTx` that has been added to this.txs
|
|
122
|
+
* @returns true if a bump was found, false otherwise
|
|
123
|
+
*/
|
|
124
124
|
private tryToValidateBumpIndex;
|
|
125
125
|
/**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
* Sort the `txs` by input txid dependency order.
|
|
127
|
+
* @returns array of input txids of unproven transactions that aren't included in txs.
|
|
128
|
+
*/
|
|
129
129
|
sortTxs(): string[];
|
|
130
130
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
* @returns a shallow copy of this beef
|
|
132
|
+
*/
|
|
133
133
|
clone(): Beef;
|
|
134
134
|
/**
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
* Ensure that all the txids in `knownTxids` are txidOnly
|
|
136
|
+
* @param knownTxids
|
|
137
|
+
*/
|
|
138
138
|
trimKnownTxids(knownTxids: string[]): void;
|
|
139
139
|
/**
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
* @returns Summary of `Beef` contents as multi-line string.
|
|
141
|
+
*/
|
|
142
142
|
toLogString(): string;
|
|
143
143
|
}
|
|
144
144
|
export default Beef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Beef.d.ts","sourceRoot":"","sources":["../../../../src/transaction/Beef.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Beef.d.ts","sourceRoot":"","sources":["../../../../src/transaction/Beef.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,MAAM,EAA0B,MAAM,wBAAwB,CAAA;AAEvE,eAAO,MAAM,UAAU,aAAa,CAAA;AACpC,eAAO,MAAM,aAAa,aAAa,CAAA;AACvC,eAAO,MAAM,8BAA8B,aAAa,CAAA;AAExD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAA;AAyCjD,qBAAa,IAAI;IACf,KAAK,EAAE,UAAU,EAAE,CAAK;IACxB,GAAG,EAAE,MAAM,EAAE,CAAK;IAClB,OAAO,EAAE,WAAW,CAAY;gBAEnB,OAAO,CAAC,EAAE,WAAW;IAIlC;;;;SAIK;IACL,IAAI,KAAK,IAAK,MAAM,CASnB;IAED;;;SAGK;IACL,QAAQ,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI3C;;;;SAIK;IACL,SAAS,CAAE,IAAI,EAAE,UAAU,GAAG,MAAM;IA6CpC;;;;;;;;;;SAUK;IACL,UAAU,CAAE,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM;IAQxD;;;;;;;;;SASK;IACL,gBAAgB,CAAE,EAAE,EAAE,WAAW,GAAG,MAAM;IAiB1C;;;SAGK;IACL,kBAAkB,CAAE,IAAI,EAAE,MAAM;IAKhC,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAYpC,WAAW,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAQjC,SAAS,CAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI;IAQhC;;;;;;;;;;;;SAYK;IACL,OAAO,CAAE,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO;IAI1C;;;;;;;;;;;;;SAaK;IACC,MAAM,CAAE,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpF,OAAO,CAAC,WAAW;IA8CnB;;;SAGK;IACL,QAAQ,IAAK,MAAM,EAAE;IAiBrB;;;SAGK;IACL,KAAK,IAAK,MAAM;IAIhB,MAAM,CAAC,UAAU,CAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAiBpC;;;;SAIK;IACL,MAAM,CAAC,UAAU,CAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI;IAKvC;;;;;SAKK;IACL,MAAM,CAAC,UAAU,CAAE,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI;IAOpE;;;;;;SAMK;IACL,OAAO,CAAC,sBAAsB;IAc9B;;;SAGK;IACL,OAAO,IAAK,MAAM,EAAE;IAgEpB;;SAEK;IACL,KAAK,IAAK,IAAI;IAOd;;;SAGK;IACL,cAAc,CAAE,UAAU,EAAE,MAAM,EAAE;IAYpC;;SAEK;IACL,WAAW,IAAK,MAAM;CA0BvB;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Beef } from
|
|
1
|
+
import { Beef } from './Beef.js';
|
|
2
2
|
/**
|
|
3
3
|
* Extends `Beef` that is used to exchange transaction validity data with more than one external party.
|
|
4
4
|
*
|
|
@@ -22,40 +22,40 @@ import { Beef } from "./Beef.js";
|
|
|
22
22
|
*/
|
|
23
23
|
export declare class BeefParty extends Beef {
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
* keys are party identifiers.
|
|
26
|
+
* values are records of txids with truthy value for which the party already has validity proof.
|
|
27
|
+
*/
|
|
28
28
|
knownTo: Record<string, Record<string, boolean>>;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
*
|
|
31
|
+
* @param parties Optional array of initial unique party identifiers.
|
|
32
|
+
*/
|
|
33
33
|
constructor(parties?: string[]);
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
* @param party
|
|
36
|
+
* @returns `true` if `party` has already beed added to this `BeefParty`.
|
|
37
|
+
*/
|
|
38
38
|
isParty(party: string): boolean;
|
|
39
39
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
* Adds a new unique party identifier to this `BeefParty`.
|
|
41
|
+
* @param party
|
|
42
|
+
*/
|
|
43
43
|
addParty(party: string): void;
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
* @param party
|
|
46
|
+
* @returns Array of txids "known" to `party`.
|
|
47
|
+
*/
|
|
48
48
|
getKnownTxidsForParty(party: string): string[];
|
|
49
49
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
* @param party
|
|
51
|
+
* @returns trimmed beef of unknown transactions and proofs for `party`
|
|
52
|
+
*/
|
|
53
53
|
getTrimmedBeefForParty(party: string): Beef;
|
|
54
54
|
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
* Make note of additional txids "known" to `party`.
|
|
56
|
+
* @param party unique identifier, added if new.
|
|
57
|
+
* @param knownTxids
|
|
58
|
+
*/
|
|
59
59
|
addKnownTxidsForParty(party: string, knownTxids: string[]): void;
|
|
60
60
|
}
|
|
61
61
|
export default BeefParty;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BeefParty.d.ts","sourceRoot":"","sources":["../../../../src/transaction/BeefParty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"BeefParty.d.ts","sourceRoot":"","sources":["../../../../src/transaction/BeefParty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,SAAU,SAAQ,IAAI;IACjC;;;SAGK;IACL,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAK;IAErD;;;SAGK;gBACQ,OAAO,CAAC,EAAE,MAAM,EAAE;IAO/B;;;SAGK;IACL,OAAO,CAAE,KAAK,EAAE,MAAM;IAKtB;;;SAGK;IACL,QAAQ,CAAE,KAAK,EAAE,MAAM;IAKvB;;;SAGK;IACL,qBAAqB,CAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;IAM/C;;;SAGK;IACL,sBAAsB,CAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAO5C;;;;SAIK;IACL,qBAAqB,CAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;CAQ3D;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Reader, Writer } from
|
|
2
|
-
import Transaction from
|
|
1
|
+
import { Reader, Writer } from '../primitives/utils.js';
|
|
2
|
+
import Transaction from './Transaction.js';
|
|
3
3
|
/**
|
|
4
4
|
* A single bitcoin transaction associated with a `Beef` validity proof set.
|
|
5
5
|
*
|
|
@@ -24,9 +24,9 @@ export default class BeefTx {
|
|
|
24
24
|
get tx(): Transaction;
|
|
25
25
|
get rawTx(): number[];
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
* @param tx If string, must be a valid txid. If `number[]` must be a valid serialized transaction.
|
|
28
|
+
* @param bumpIndex If transaction already has a proof in the beef to which it will be added.
|
|
29
|
+
*/
|
|
30
30
|
constructor(tx: Transaction | number[] | string, bumpIndex?: number);
|
|
31
31
|
private updateInputTxids;
|
|
32
32
|
toWriter(writer: Writer, magic: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BeefTx.d.ts","sourceRoot":"","sources":["../../../../src/transaction/BeefTx.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAkB,MAAM,wBAAwB,CAAA;AACvE,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAG1C;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;
|
|
1
|
+
{"version":3,"file":"BeefTx.d.ts","sourceRoot":"","sources":["../../../../src/transaction/BeefTx.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAkB,MAAM,wBAAwB,CAAA;AACvE,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAG1C;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,CAAC,EAAE,WAAW,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,EAAE,CAAK;IACzB,MAAM,EAAE,MAAM,CAAI;IAElB,IAAI,SAAS,IAAK,MAAM,GAAG,SAAS,CAA2B;IAE/D,IAAI,SAAS,CAAE,CAAC,EAAE,MAAM,GAAG,SAAS,EAGnC;IAED,IAAI,QAAQ,IAAK,OAAO,CAEvB;IAED,IAAI,UAAU,IAAK,OAAO,CAEzB;IAED,IAAI,IAAI,WAKP;IAED,IAAI,EAAE,gBAIL;IAED,IAAI,KAAK,aAIR;IAED;;;SAGK;gBACQ,EAAE,EAAE,WAAW,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;IAcpE,OAAO,CAAC,gBAAgB;IAUxB,QAAQ,CAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAgC9C,MAAM,CAAC,UAAU,CAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;CA8BtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MerklePath.d.ts","sourceRoot":"","sources":["../../../../src/transaction/MerklePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0B,MAAM,wBAAwB,CAAA;AAEvE,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC;QAChB,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,OAAO,CAAA;QACd,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB,CAAC,CAAC,CAAA;IAEH;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"MerklePath.d.ts","sourceRoot":"","sources":["../../../../src/transaction/MerklePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0B,MAAM,wBAAwB,CAAA;AAEvE,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EA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;IACH,OAAO,CAAE,KAAK,EAAE,UAAU,GAAG,IAAI;IA+BjC;;;;OAIG;IACH,IAAI;CA+CL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../../src/transaction/Transaction.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAGtD,OAAO,EAAE,MAAM,EAA0B,MAAM,wBAAwB,CAAA;AAEvE,OAAO,QAAQ,MAAM,eAAe,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACnF,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAExC,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,gBAAgB,EAAE,CAAA;IAC1B,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,OAAO,CAAC,UAAU,CAAC,CAAU;IAE7B;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"Transaction.d.ts","sourceRoot":"","sources":["../../../../src/transaction/Transaction.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAGtD,OAAO,EAAE,MAAM,EAA0B,MAAM,wBAAwB,CAAA;AAEvE,OAAO,QAAQ,MAAM,eAAe,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,i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