@bsv/sdk 1.2.17 → 1.2.19

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.
Files changed (87) hide show
  1. package/dist/cjs/package.json +1 -1
  2. package/dist/cjs/src/primitives/BigNumber.js +85 -89
  3. package/dist/cjs/src/primitives/BigNumber.js.map +1 -1
  4. package/dist/cjs/src/primitives/PublicKey.js +5 -2
  5. package/dist/cjs/src/primitives/PublicKey.js.map +1 -1
  6. package/dist/cjs/src/primitives/Random.js +3 -2
  7. package/dist/cjs/src/primitives/Random.js.map +1 -1
  8. package/dist/cjs/src/primitives/utils.js +71 -62
  9. package/dist/cjs/src/primitives/utils.js.map +1 -1
  10. package/dist/cjs/src/totp/totp.js +0 -1
  11. package/dist/cjs/src/totp/totp.js.map +1 -1
  12. package/dist/cjs/src/transaction/Beef.js +26 -40
  13. package/dist/cjs/src/transaction/Beef.js.map +1 -1
  14. package/dist/cjs/src/transaction/BeefParty.js +1 -1
  15. package/dist/cjs/src/transaction/BeefTx.js +75 -73
  16. package/dist/cjs/src/transaction/BeefTx.js.map +1 -1
  17. package/dist/cjs/src/transaction/MerklePath.js +12 -1
  18. package/dist/cjs/src/transaction/MerklePath.js.map +1 -1
  19. package/dist/cjs/src/transaction/Transaction.js +70 -96
  20. package/dist/cjs/src/transaction/Transaction.js.map +1 -1
  21. package/dist/cjs/src/transaction/chaintrackers/WhatsOnChain.js +20 -2
  22. package/dist/cjs/src/transaction/chaintrackers/WhatsOnChain.js.map +1 -1
  23. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  24. package/dist/esm/src/primitives/BigNumber.js +85 -89
  25. package/dist/esm/src/primitives/BigNumber.js.map +1 -1
  26. package/dist/esm/src/primitives/PublicKey.js +5 -2
  27. package/dist/esm/src/primitives/PublicKey.js.map +1 -1
  28. package/dist/esm/src/primitives/Random.js +2 -2
  29. package/dist/esm/src/primitives/Random.js.map +1 -1
  30. package/dist/esm/src/primitives/utils.js +70 -61
  31. package/dist/esm/src/primitives/utils.js.map +1 -1
  32. package/dist/esm/src/totp/totp.js +0 -1
  33. package/dist/esm/src/totp/totp.js.map +1 -1
  34. package/dist/esm/src/transaction/Beef.js +25 -39
  35. package/dist/esm/src/transaction/Beef.js.map +1 -1
  36. package/dist/esm/src/transaction/BeefParty.js +1 -1
  37. package/dist/esm/src/transaction/BeefTx.js +76 -74
  38. package/dist/esm/src/transaction/BeefTx.js.map +1 -1
  39. package/dist/esm/src/transaction/MerklePath.js +12 -1
  40. package/dist/esm/src/transaction/MerklePath.js.map +1 -1
  41. package/dist/esm/src/transaction/Transaction.js +71 -97
  42. package/dist/esm/src/transaction/Transaction.js.map +1 -1
  43. package/dist/esm/src/transaction/chaintrackers/WhatsOnChain.js +20 -2
  44. package/dist/esm/src/transaction/chaintrackers/WhatsOnChain.js.map +1 -1
  45. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  46. package/dist/types/src/primitives/BigNumber.d.ts +24 -22
  47. package/dist/types/src/primitives/BigNumber.d.ts.map +1 -1
  48. package/dist/types/src/primitives/PublicKey.d.ts.map +1 -1
  49. package/dist/types/src/primitives/utils.d.ts +17 -17
  50. package/dist/types/src/primitives/utils.d.ts.map +1 -1
  51. package/dist/types/src/transaction/Beef.d.ts +9 -12
  52. package/dist/types/src/transaction/Beef.d.ts.map +1 -1
  53. package/dist/types/src/transaction/BeefParty.d.ts +1 -1
  54. package/dist/types/src/transaction/BeefTx.d.ts +5 -2
  55. package/dist/types/src/transaction/BeefTx.d.ts.map +1 -1
  56. package/dist/types/src/transaction/ChainTracker.d.ts +6 -0
  57. package/dist/types/src/transaction/ChainTracker.d.ts.map +1 -1
  58. package/dist/types/src/transaction/MerklePath.d.ts +1 -0
  59. package/dist/types/src/transaction/MerklePath.d.ts.map +1 -1
  60. package/dist/types/src/transaction/Transaction.d.ts +6 -0
  61. package/dist/types/src/transaction/Transaction.d.ts.map +1 -1
  62. package/dist/types/src/transaction/chaintrackers/WhatsOnChain.d.ts +2 -1
  63. package/dist/types/src/transaction/chaintrackers/WhatsOnChain.d.ts.map +1 -1
  64. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  65. package/dist/umd/bundle.js +1 -1
  66. package/docs/compat.md +13 -11
  67. package/docs/primitives.md +152 -188
  68. package/docs/transaction.md +78 -76
  69. package/package.json +1 -1
  70. package/src/primitives/BigNumber.ts +111 -111
  71. package/src/primitives/PublicKey.ts +5 -2
  72. package/src/primitives/Random.ts +2 -2
  73. package/src/primitives/utils.ts +92 -77
  74. package/src/totp/totp.ts +0 -1
  75. package/src/transaction/Beef.ts +20 -43
  76. package/src/transaction/BeefParty.ts +1 -1
  77. package/src/transaction/BeefTx.ts +89 -57
  78. package/src/transaction/ChainTracker.ts +6 -0
  79. package/src/transaction/MerklePath.ts +13 -1
  80. package/src/transaction/Transaction.ts +77 -100
  81. package/src/transaction/__tests/Beef.test.ts +9 -9
  82. package/src/transaction/__tests/MerklePath.test.ts +23 -2
  83. package/src/transaction/__tests/Transaction.benchmarks.test.ts +1 -1
  84. package/src/transaction/__tests/Transaction.test.ts +3 -3
  85. package/src/transaction/broadcasters/__tests/WhatsOnChainBroadcaster.test.ts +2 -2
  86. package/src/transaction/chaintrackers/WhatsOnChain.ts +20 -2
  87. package/src/transaction/chaintrackers/__tests/WhatsOnChainChainTracker.test.ts +32 -1
@@ -1,6 +1,6 @@
1
1
  # API
2
2
 
3
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
3
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4
4
 
5
5
  ## Interfaces
6
6
 
@@ -15,7 +15,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
15
15
  | [FetchOptions](#interface-fetchoptions) | [WhatsOnChainConfig](#interface-whatsonchainconfig) |
16
16
  | [HttpClient](#interface-httpclient) | |
17
17
 
18
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
18
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
19
19
 
20
20
  ---
21
21
 
@@ -91,7 +91,7 @@ See also: [HttpClient](#interface-httpclient)
91
91
 
92
92
  </details>
93
93
 
94
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
94
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
95
95
 
96
96
  ---
97
97
  ### Interface: BroadcastFailure
@@ -108,7 +108,7 @@ export interface BroadcastFailure {
108
108
  }
109
109
  ```
110
110
 
111
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
111
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
112
112
 
113
113
  ---
114
114
  ### Interface: BroadcastResponse
@@ -124,7 +124,7 @@ export interface BroadcastResponse {
124
124
  }
125
125
  ```
126
126
 
127
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
127
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
128
128
 
129
129
  ---
130
130
  ### Interface: Broadcaster
@@ -141,7 +141,7 @@ export interface Broadcaster {
141
141
 
142
142
  See also: [BroadcastFailure](#interface-broadcastfailure), [BroadcastResponse](#interface-broadcastresponse), [Transaction](#class-transaction)
143
143
 
144
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
144
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
145
145
 
146
146
  ---
147
147
  ### Interface: ChainTracker
@@ -160,16 +160,20 @@ const chainTracker = {
160
160
  isValidRootForHeight: async (root, height) => {
161
161
  // Implementation to check if the Merkle root is valid for the specified block height.
162
162
  }
163
+ currentHeight: async () => {
164
+ // Implementation to get the current block height.
165
+ }
163
166
  };
164
167
  ```
165
168
 
166
169
  ```ts
167
170
  export default interface ChainTracker {
168
171
  isValidRootForHeight: (root: string, height: number) => Promise<boolean>;
172
+ currentHeight: () => Promise<number>;
169
173
  }
170
174
  ```
171
175
 
172
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
176
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
173
177
 
174
178
  ---
175
179
  ### Interface: FeeModel
@@ -185,7 +189,7 @@ export default interface FeeModel {
185
189
 
186
190
  See also: [Transaction](#class-transaction)
187
191
 
188
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
192
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
189
193
 
190
194
  ---
191
195
  ### Interface: FetchOptions
@@ -231,7 +235,7 @@ method?: string
231
235
 
232
236
  </details>
233
237
 
234
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
238
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
235
239
 
236
240
  ---
237
241
  ### Interface: HttpClient
@@ -261,7 +265,7 @@ See also: [HttpClientRequestOptions](#interface-httpclientrequestoptions), [Http
261
265
 
262
266
  </details>
263
267
 
264
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
268
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
265
269
 
266
270
  ---
267
271
  ### Interface: HttpClientRequestOptions
@@ -306,7 +310,7 @@ method?: string
306
310
 
307
311
  </details>
308
312
 
309
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
313
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
310
314
 
311
315
  ---
312
316
  ### Interface: HttpsNodejs
@@ -321,7 +325,7 @@ export interface HttpsNodejs {
321
325
 
322
326
  See also: [HttpClientRequestOptions](#interface-httpclientrequestoptions), [NodejsHttpClientRequest](#interface-nodejshttpclientrequest)
323
327
 
324
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
328
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
325
329
 
326
330
  ---
327
331
  ### Interface: MerklePathLeaf
@@ -335,7 +339,7 @@ export interface MerklePathLeaf {
335
339
  }
336
340
  ```
337
341
 
338
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
342
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
339
343
 
340
344
  ---
341
345
  ### Interface: NodejsHttpClientRequest
@@ -350,7 +354,7 @@ export interface NodejsHttpClientRequest {
350
354
  }
351
355
  ```
352
356
 
353
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
357
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
354
358
 
355
359
  ---
356
360
  ### Interface: TransactionInput
@@ -392,7 +396,7 @@ export default interface TransactionInput {
392
396
 
393
397
  See also: [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [sign](#variable-sign)
394
398
 
395
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
399
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
396
400
 
397
401
  ---
398
402
  ### Interface: TransactionOutput
@@ -422,7 +426,7 @@ export default interface TransactionOutput {
422
426
 
423
427
  See also: [LockingScript](#class-lockingscript)
424
428
 
425
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
429
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
426
430
 
427
431
  ---
428
432
  ### Interface: WhatsOnChainConfig
@@ -461,7 +465,7 @@ See also: [HttpClient](#interface-httpclient)
461
465
 
462
466
  </details>
463
467
 
464
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
468
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
465
469
 
466
470
  ---
467
471
  ## Classes
@@ -479,7 +483,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
479
483
  | [Transaction](#class-transaction) |
480
484
  | [WhatsOnChain](#class-whatsonchain) |
481
485
 
482
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
486
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
483
487
 
484
488
  ---
485
489
 
@@ -579,7 +583,7 @@ Argument Details
579
583
 
580
584
  </details>
581
585
 
582
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
586
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
583
587
 
584
588
  ---
585
589
  ### Class: Beef
@@ -588,10 +592,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
588
592
  export class Beef {
589
593
  bumps: MerklePath[] = [];
590
594
  txs: BeefTx[] = [];
591
- version: BeefVersion = undefined;
595
+ version: number = BEEF_V2;
592
596
  atomicTxid: string | undefined = undefined;
593
- constructor(version?: BeefVersion)
594
- get magic(): number
597
+ constructor(version: number = BEEF_V2)
595
598
  findTxid(txid: string): BeefTx | undefined
596
599
  makeTxidOnly(txid: string): BeefTx | undefined
597
600
  findBump(txid: string): MerklePath | undefined
@@ -612,7 +615,7 @@ export class Beef {
612
615
  toHex(): string
613
616
  static fromReader(br: Reader): Beef
614
617
  static fromBinary(bin: number[]): Beef
615
- static fromString(s: string, enc?: "hex" | "utf8" | "base64"): Beef
618
+ static fromString(s: string, enc: "hex" | "utf8" | "base64" = "hex"): Beef
616
619
  sortTxs(): {
617
620
  missingInputs: string[];
618
621
  notValid: string[];
@@ -628,7 +631,7 @@ export class Beef {
628
631
  }
629
632
  ```
630
633
 
631
- See also: [BeefTx](#class-beeftx), [BeefVersion](#type-beefversion), [ChainTracker](#interface-chaintracker), [MerklePath](#class-merklepath), [Reader](#class-reader), [Transaction](#class-transaction), [Writer](#class-writer), [toHex](#variable-tohex), [verify](#variable-verify)
634
+ See also: [BEEF_V2](#variable-beef_v2), [BeefTx](#class-beeftx), [ChainTracker](#interface-chaintracker), [MerklePath](#class-merklepath), [Reader](#class-reader), [Transaction](#class-transaction), [Writer](#class-writer), [toHex](#variable-tohex), [verify](#variable-verify)
632
635
 
633
636
  <details>
634
637
 
@@ -745,7 +748,7 @@ Argument Details
745
748
  Constructs an instance of the Beef class based on the provided string
746
749
 
747
750
  ```ts
748
- static fromString(s: string, enc?: "hex" | "utf8" | "base64"): Beef
751
+ static fromString(s: string, enc: "hex" | "utf8" | "base64" = "hex"): Beef
749
752
  ```
750
753
  See also: [Beef](#class-beef)
751
754
 
@@ -989,7 +992,7 @@ Argument Details
989
992
 
990
993
  </details>
991
994
 
992
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
995
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
993
996
 
994
997
  ---
995
998
  ### Class: BeefParty
@@ -1102,7 +1105,7 @@ isParty(party: string)
1102
1105
 
1103
1106
  Returns
1104
1107
 
1105
- `true` if `party` has already beed added to this `BeefParty`.
1108
+ `true` if `party` has already been added to this `BeefParty`.
1106
1109
 
1107
1110
  #### Method mergeBeefFromParty
1108
1111
 
@@ -1119,7 +1122,7 @@ See also: [Beef](#class-beef)
1119
1122
 
1120
1123
  </details>
1121
1124
 
1122
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
1125
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1123
1126
 
1124
1127
  ---
1125
1128
  ### Class: BeefTx
@@ -1148,8 +1151,11 @@ export default class BeefTx {
1148
1151
  get tx()
1149
1152
  get rawTx()
1150
1153
  constructor(tx: Transaction | number[] | string, bumpIndex?: number)
1151
- toWriter(writer: Writer, magic: number): void
1152
- static fromReader(br: Reader, magic: number): BeefTx
1154
+ static fromTx(tx: Transaction, bumpIndex?: number): BeefTx
1155
+ static fromRawTx(rawTx: number[], bumpIndex?: number): BeefTx
1156
+ static fromTxid(txid: string, bumpIndex?: number): BeefTx
1157
+ toWriter(writer: Writer, version: number): void
1158
+ static fromReader(br: Reader, version: number): BeefTx
1153
1159
  }
1154
1160
  ```
1155
1161
 
@@ -1185,7 +1191,7 @@ isValid?: boolean = undefined
1185
1191
 
1186
1192
  </details>
1187
1193
 
1188
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
1194
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1189
1195
 
1190
1196
  ---
1191
1197
  ### Class: FetchHttpClient
@@ -1201,7 +1207,7 @@ export class FetchHttpClient implements HttpClient {
1201
1207
 
1202
1208
  See also: [Fetch](#type-fetch), [HttpClient](#interface-httpclient), [HttpClientRequestOptions](#interface-httpclientrequestoptions), [HttpClientResponse](#type-httpclientresponse)
1203
1209
 
1204
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
1210
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1205
1211
 
1206
1212
  ---
1207
1213
  ### Class: MerklePath
@@ -1413,7 +1419,7 @@ Argument Details
1413
1419
 
1414
1420
  </details>
1415
1421
 
1416
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
1422
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1417
1423
 
1418
1424
  ---
1419
1425
  ### Class: NodejsHttpClient
@@ -1429,7 +1435,7 @@ export class NodejsHttpClient implements HttpClient {
1429
1435
 
1430
1436
  See also: [HttpClient](#interface-httpclient), [HttpClientRequestOptions](#interface-httpclientrequestoptions), [HttpClientResponse](#type-httpclientresponse), [HttpsNodejs](#interface-httpsnodejs)
1431
1437
 
1432
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
1438
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1433
1439
 
1434
1440
  ---
1435
1441
  ### Class: SatoshisPerKilobyte
@@ -1483,7 +1489,7 @@ Argument Details
1483
1489
 
1484
1490
  </details>
1485
1491
 
1486
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
1492
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1487
1493
 
1488
1494
  ---
1489
1495
  ### Class: Transaction
@@ -2061,7 +2067,7 @@ tx.verify(new WhatsOnChain(), new SatoshisPerKilobyte(1))
2061
2067
 
2062
2068
  </details>
2063
2069
 
2064
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2070
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2065
2071
 
2066
2072
  ---
2067
2073
  ### Class: WhatsOnChain
@@ -2074,6 +2080,7 @@ export default class WhatsOnChain implements ChainTracker {
2074
2080
  readonly apiKey: string;
2075
2081
  constructor(network: "main" | "test" | "stn" = "main", config: WhatsOnChainConfig = {})
2076
2082
  async isValidRootForHeight(root: string, height: number): Promise<boolean>
2083
+ async currentHeight(): Promise<number>
2077
2084
  }
2078
2085
  ```
2079
2086
 
@@ -2101,7 +2108,7 @@ Argument Details
2101
2108
 
2102
2109
  </details>
2103
2110
 
2104
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2111
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2105
2112
 
2106
2113
  ---
2107
2114
  ## Functions
@@ -2114,7 +2121,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
2114
2121
  | [isBroadcastFailure](#function-isbroadcastfailure) |
2115
2122
  | [isBroadcastResponse](#function-isbroadcastresponse) |
2116
2123
 
2117
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2124
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2118
2125
 
2119
2126
  ---
2120
2127
 
@@ -2126,7 +2133,7 @@ export function defaultBroadcaster(isTestnet: boolean = false, config: ArcConfig
2126
2133
 
2127
2134
  See also: [ArcConfig](#interface-arcconfig), [Broadcaster](#interface-broadcaster)
2128
2135
 
2129
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2136
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2130
2137
 
2131
2138
  ---
2132
2139
  ### Function: defaultChainTracker
@@ -2137,7 +2144,7 @@ export function defaultChainTracker(): ChainTracker
2137
2144
 
2138
2145
  See also: [ChainTracker](#interface-chaintracker)
2139
2146
 
2140
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2147
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2141
2148
 
2142
2149
  ---
2143
2150
  ### Function: defaultHttpClient
@@ -2152,7 +2159,7 @@ export function defaultHttpClient(): HttpClient
2152
2159
 
2153
2160
  See also: [HttpClient](#interface-httpclient)
2154
2161
 
2155
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2162
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2156
2163
 
2157
2164
  ---
2158
2165
  ### Function: isBroadcastFailure
@@ -2165,7 +2172,7 @@ export function isBroadcastFailure(r: BroadcastResponse | BroadcastFailure): r i
2165
2172
 
2166
2173
  See also: [BroadcastFailure](#interface-broadcastfailure), [BroadcastResponse](#interface-broadcastresponse)
2167
2174
 
2168
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2175
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2169
2176
 
2170
2177
  ---
2171
2178
  ### Function: isBroadcastResponse
@@ -2178,30 +2185,20 @@ export function isBroadcastResponse(r: BroadcastResponse | BroadcastFailure): r
2178
2185
 
2179
2186
  See also: [BroadcastFailure](#interface-broadcastfailure), [BroadcastResponse](#interface-broadcastresponse)
2180
2187
 
2181
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2188
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2182
2189
 
2183
2190
  ---
2184
2191
  ## Types
2185
2192
 
2186
2193
  | |
2187
2194
  | --- |
2188
- | [BeefVersion](#type-beefversion) |
2189
2195
  | [Fetch](#type-fetch) |
2190
2196
  | [HttpClientResponse](#type-httpclientresponse) |
2191
2197
 
2192
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2198
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2193
2199
 
2194
2200
  ---
2195
2201
 
2196
- ### Type: BeefVersion
2197
-
2198
- ```ts
2199
- export type BeefVersion = undefined | "V1" | "V2"
2200
- ```
2201
-
2202
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2203
-
2204
- ---
2205
2202
  ### Type: Fetch
2206
2203
 
2207
2204
  fetch function interface limited to options needed by ts-sdk
@@ -2214,7 +2211,7 @@ export type Fetch = (url: string, options: FetchOptions) => Promise<Response>
2214
2211
 
2215
2212
  See also: [FetchOptions](#interface-fetchoptions)
2216
2213
 
2217
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2214
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2218
2215
 
2219
2216
  ---
2220
2217
  ### Type: HttpClientResponse
@@ -2235,7 +2232,22 @@ export type HttpClientResponse<T = any> = {
2235
2232
  }
2236
2233
  ```
2237
2234
 
2238
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2235
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2236
+
2237
+ ---
2238
+ ## Enums
2239
+
2240
+ ### Enum: TX_DATA_FORMAT
2241
+
2242
+ ```ts
2243
+ export enum TX_DATA_FORMAT {
2244
+ RAWTX = 0,
2245
+ RAWTX_AND_BUMP_INDEX = 1,
2246
+ TXID_ONLY = 2
2247
+ }
2248
+ ```
2249
+
2250
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2239
2251
 
2240
2252
  ---
2241
2253
  ## Variables
@@ -2243,11 +2255,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
2243
2255
  | |
2244
2256
  | --- |
2245
2257
  | [ATOMIC_BEEF](#variable-atomic_beef) |
2246
- | [BEEF_MAGIC](#variable-beef_magic) |
2247
- | [BEEF_MAGIC_TXID_ONLY_EXTENSION](#variable-beef_magic_txid_only_extension) |
2248
- | [BEEF_MAGIC_V2](#variable-beef_magic_v2) |
2258
+ | [BEEF_V1](#variable-beef_v1) |
2259
+ | [BEEF_V2](#variable-beef_v2) |
2249
2260
 
2250
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2261
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2251
2262
 
2252
2263
  ---
2253
2264
 
@@ -2257,33 +2268,24 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
2257
2268
  ATOMIC_BEEF = 16843009
2258
2269
  ```
2259
2270
 
2260
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2261
-
2262
- ---
2263
- ### Variable: BEEF_MAGIC
2264
-
2265
- ```ts
2266
- BEEF_MAGIC = 4022206465
2267
- ```
2268
-
2269
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2271
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2270
2272
 
2271
2273
  ---
2272
- ### Variable: BEEF_MAGIC_TXID_ONLY_EXTENSION
2274
+ ### Variable: BEEF_V1
2273
2275
 
2274
2276
  ```ts
2275
- BEEF_MAGIC_TXID_ONLY_EXTENSION = 4022206465
2277
+ BEEF_V1 = 4022206465
2276
2278
  ```
2277
2279
 
2278
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2280
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2279
2281
 
2280
2282
  ---
2281
- ### Variable: BEEF_MAGIC_V2
2283
+ ### Variable: BEEF_V2
2282
2284
 
2283
2285
  ```ts
2284
- BEEF_MAGIC_V2 = 4022206466
2286
+ BEEF_V2 = 4022206466
2285
2287
  ```
2286
2288
 
2287
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2289
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2288
2290
 
2289
2291
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsv/sdk",
3
- "version": "1.2.17",
3
+ "version": "1.2.19",
4
4
  "type": "module",
5
5
  "description": "BSV Blockchain Software Development Kit",
6
6
  "main": "dist/cjs/mod.js",