@bsv/sdk 1.4.22 → 1.4.24

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 (62) hide show
  1. package/dist/cjs/package.json +1 -1
  2. package/dist/cjs/src/auth/certificates/VerifiableCertificate.js +10 -0
  3. package/dist/cjs/src/auth/certificates/VerifiableCertificate.js.map +1 -1
  4. package/dist/cjs/src/auth/clients/AuthFetch.js.map +1 -1
  5. package/dist/cjs/src/transaction/broadcasters/Teranode.js +64 -0
  6. package/dist/cjs/src/transaction/broadcasters/Teranode.js.map +1 -0
  7. package/dist/cjs/src/transaction/broadcasters/index.js +3 -1
  8. package/dist/cjs/src/transaction/broadcasters/index.js.map +1 -1
  9. package/dist/cjs/src/transaction/http/BinaryFetchClient.js +94 -0
  10. package/dist/cjs/src/transaction/http/BinaryFetchClient.js.map +1 -0
  11. package/dist/cjs/src/transaction/http/NodejsHttpClient.js.map +1 -1
  12. package/dist/cjs/src/transaction/http/index.js +3 -1
  13. package/dist/cjs/src/transaction/http/index.js.map +1 -1
  14. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  15. package/dist/esm/src/auth/certificates/VerifiableCertificate.js +10 -0
  16. package/dist/esm/src/auth/certificates/VerifiableCertificate.js.map +1 -1
  17. package/dist/esm/src/auth/clients/AuthFetch.js.map +1 -1
  18. package/dist/esm/src/transaction/broadcasters/Teranode.js +62 -0
  19. package/dist/esm/src/transaction/broadcasters/Teranode.js.map +1 -0
  20. package/dist/esm/src/transaction/broadcasters/index.js +1 -0
  21. package/dist/esm/src/transaction/broadcasters/index.js.map +1 -1
  22. package/dist/esm/src/transaction/http/BinaryFetchClient.js +90 -0
  23. package/dist/esm/src/transaction/http/BinaryFetchClient.js.map +1 -0
  24. package/dist/esm/src/transaction/http/NodejsHttpClient.js.map +1 -1
  25. package/dist/esm/src/transaction/http/index.js +1 -0
  26. package/dist/esm/src/transaction/http/index.js.map +1 -1
  27. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  28. package/dist/types/src/auth/certificates/VerifiableCertificate.d.ts +9 -1
  29. package/dist/types/src/auth/certificates/VerifiableCertificate.d.ts.map +1 -1
  30. package/dist/types/src/auth/clients/AuthFetch.d.ts.map +1 -1
  31. package/dist/types/src/transaction/broadcasters/Teranode.d.ts +25 -0
  32. package/dist/types/src/transaction/broadcasters/Teranode.d.ts.map +1 -0
  33. package/dist/types/src/transaction/broadcasters/index.d.ts +1 -0
  34. package/dist/types/src/transaction/broadcasters/index.d.ts.map +1 -1
  35. package/dist/types/src/transaction/http/BinaryFetchClient.d.ts +50 -0
  36. package/dist/types/src/transaction/http/BinaryFetchClient.d.ts.map +1 -0
  37. package/dist/types/src/transaction/http/index.d.ts +1 -0
  38. package/dist/types/src/transaction/http/index.d.ts.map +1 -1
  39. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  40. package/dist/umd/bundle.js +1 -1
  41. package/docs/auth.md +120 -46
  42. package/docs/compat.md +48 -24
  43. package/docs/identity.md +14 -8
  44. package/docs/kvstore.md +9 -3
  45. package/docs/messages.md +4 -4
  46. package/docs/overlay-tools.md +69 -21
  47. package/docs/primitives.md +379 -235
  48. package/docs/registry.md +20 -14
  49. package/docs/script.md +87 -33
  50. package/docs/storage.md +17 -11
  51. package/docs/totp.md +11 -5
  52. package/docs/transaction.md +145 -67
  53. package/docs/wallet.md +169 -133
  54. package/package.json +1 -1
  55. package/src/auth/certificates/VerifiableCertificate.ts +24 -0
  56. package/src/auth/certificates/__tests/VerifiableCertificate.test.ts +28 -1
  57. package/src/auth/clients/AuthFetch.ts +2 -0
  58. package/src/transaction/broadcasters/Teranode.ts +77 -0
  59. package/src/transaction/broadcasters/index.ts +1 -0
  60. package/src/transaction/http/BinaryFetchClient.ts +141 -0
  61. package/src/transaction/http/NodejsHttpClient.ts +1 -1
  62. package/src/transaction/http/index.ts +1 -0
@@ -30,6 +30,10 @@ export interface AdmittanceInstructions {
30
30
  }
31
31
  ```
32
32
 
33
+ <details>
34
+
35
+ <summary>Interface AdmittanceInstructions Details</summary>
36
+
33
37
  #### Property coinsRemoved
34
38
 
35
39
  The indices of all inputs from the provided transaction which reference previously-admitted outputs,
@@ -55,6 +59,8 @@ The indices of all admissible outputs into the managed topic from the provided t
55
59
  outputsToAdmit: number[]
56
60
  ```
57
61
 
62
+ </details>
63
+
58
64
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
59
65
 
60
66
  ---
@@ -69,6 +75,10 @@ export interface LookupQuestion {
69
75
  }
70
76
  ```
71
77
 
78
+ <details>
79
+
80
+ <summary>Interface LookupQuestion Details</summary>
81
+
72
82
  #### Property query
73
83
 
74
84
  The query which will be forwarded to the Lookup Service.
@@ -86,6 +96,8 @@ The identifier for a Lookup Service which the person asking the question wishes
86
96
  service: string
87
97
  ```
88
98
 
99
+ </details>
100
+
89
101
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
90
102
 
91
103
  ---
@@ -103,7 +115,11 @@ export interface LookupResolverConfig {
103
115
  }
104
116
  ```
105
117
 
106
- See also: [OverlayLookupFacilitator](./overlay-tools.md#interface-overlaylookupfacilitator)
118
+ See also: [OverlayLookupFacilitator](#interface-overlaylookupfacilitator)
119
+
120
+ <details>
121
+
122
+ <summary>Interface LookupResolverConfig Details</summary>
107
123
 
108
124
  #### Property additionalHosts
109
125
 
@@ -120,7 +136,7 @@ The facilitator used to make requests to Overlay Services hosts.
120
136
  ```ts
121
137
  facilitator?: OverlayLookupFacilitator
122
138
  ```
123
- See also: [OverlayLookupFacilitator](./overlay-tools.md#interface-overlaylookupfacilitator)
139
+ See also: [OverlayLookupFacilitator](#interface-overlaylookupfacilitator)
124
140
 
125
141
  #### Property hostOverrides
126
142
 
@@ -149,6 +165,8 @@ The list of SLAP trackers queried to resolve Overlay Services hosts for a given
149
165
  slapTrackers?: string[]
150
166
  ```
151
167
 
168
+ </details>
169
+
152
170
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
153
171
 
154
172
  ---
@@ -162,7 +180,7 @@ export interface OverlayBroadcastFacilitator {
162
180
  }
163
181
  ```
164
182
 
165
- See also: [STEAK](./overlay-tools.md#type-steak), [TaggedBEEF](./overlay-tools.md#interface-taggedbeef)
183
+ See also: [STEAK](#type-steak), [TaggedBEEF](#interface-taggedbeef)
166
184
 
167
185
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
168
186
 
@@ -177,7 +195,11 @@ export interface OverlayLookupFacilitator {
177
195
  }
178
196
  ```
179
197
 
180
- See also: [LookupAnswer](./overlay-tools.md#type-lookupanswer), [LookupQuestion](./overlay-tools.md#interface-lookupquestion)
198
+ See also: [LookupAnswer](#type-lookupanswer), [LookupQuestion](#interface-lookupquestion)
199
+
200
+ <details>
201
+
202
+ <summary>Interface OverlayLookupFacilitator Details</summary>
181
203
 
182
204
  #### Property lookup
183
205
 
@@ -186,7 +208,9 @@ Returns a lookup answer for a lookup question
186
208
  ```ts
187
209
  lookup: (url: string, question: LookupQuestion, timeout?: number) => Promise<LookupAnswer>
188
210
  ```
189
- See also: [LookupAnswer](./overlay-tools.md#type-lookupanswer), [LookupQuestion](./overlay-tools.md#interface-lookupquestion)
211
+ See also: [LookupAnswer](#type-lookupanswer), [LookupQuestion](#interface-lookupquestion)
212
+
213
+ </details>
190
214
 
191
215
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
192
216
 
@@ -206,7 +230,11 @@ export interface SHIPBroadcasterConfig {
206
230
  }
207
231
  ```
208
232
 
209
- See also: [LookupResolver](./overlay-tools.md#class-lookupresolver), [OverlayBroadcastFacilitator](./overlay-tools.md#interface-overlaybroadcastfacilitator)
233
+ See also: [LookupResolver](#class-lookupresolver), [OverlayBroadcastFacilitator](#interface-overlaybroadcastfacilitator)
234
+
235
+ <details>
236
+
237
+ <summary>Interface SHIPBroadcasterConfig Details</summary>
210
238
 
211
239
  #### Property facilitator
212
240
 
@@ -215,7 +243,7 @@ The facilitator used to make requests to Overlay Services hosts.
215
243
  ```ts
216
244
  facilitator?: OverlayBroadcastFacilitator
217
245
  ```
218
- See also: [OverlayBroadcastFacilitator](./overlay-tools.md#interface-overlaybroadcastfacilitator)
246
+ See also: [OverlayBroadcastFacilitator](#interface-overlaybroadcastfacilitator)
219
247
 
220
248
  #### Property networkPreset
221
249
 
@@ -259,7 +287,9 @@ The resolver used to locate suitable hosts with SHIP
259
287
  ```ts
260
288
  resolver?: LookupResolver
261
289
  ```
262
- See also: [LookupResolver](./overlay-tools.md#class-lookupresolver)
290
+ See also: [LookupResolver](#class-lookupresolver)
291
+
292
+ </details>
263
293
 
264
294
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
265
295
 
@@ -303,7 +333,7 @@ export class HTTPSOverlayBroadcastFacilitator implements OverlayBroadcastFacilit
303
333
  }
304
334
  ```
305
335
 
306
- See also: [OverlayBroadcastFacilitator](./overlay-tools.md#interface-overlaybroadcastfacilitator), [STEAK](./overlay-tools.md#type-steak), [TaggedBEEF](./overlay-tools.md#interface-taggedbeef)
336
+ See also: [OverlayBroadcastFacilitator](#interface-overlaybroadcastfacilitator), [STEAK](#type-steak), [TaggedBEEF](#interface-taggedbeef)
307
337
 
308
338
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
309
339
 
@@ -319,7 +349,7 @@ export class HTTPSOverlayLookupFacilitator implements OverlayLookupFacilitator {
319
349
  }
320
350
  ```
321
351
 
322
- See also: [LookupAnswer](./overlay-tools.md#type-lookupanswer), [LookupQuestion](./overlay-tools.md#interface-lookupquestion), [OverlayLookupFacilitator](./overlay-tools.md#interface-overlaylookupfacilitator)
352
+ See also: [LookupAnswer](#type-lookupanswer), [LookupQuestion](#interface-lookupquestion), [OverlayLookupFacilitator](#interface-overlaylookupfacilitator)
323
353
 
324
354
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
325
355
 
@@ -335,7 +365,11 @@ export default class LookupResolver {
335
365
  }
336
366
  ```
337
367
 
338
- See also: [LookupAnswer](./overlay-tools.md#type-lookupanswer), [LookupQuestion](./overlay-tools.md#interface-lookupquestion), [LookupResolverConfig](./overlay-tools.md#interface-lookupresolverconfig)
368
+ See also: [LookupAnswer](#type-lookupanswer), [LookupQuestion](#interface-lookupquestion), [LookupResolverConfig](#interface-lookupresolverconfig)
369
+
370
+ <details>
371
+
372
+ <summary>Class LookupResolver Details</summary>
339
373
 
340
374
  #### Method query
341
375
 
@@ -344,7 +378,9 @@ Given a LookupQuestion, returns a LookupAnswer. Aggregates across multiple servi
344
378
  ```ts
345
379
  async query(question: LookupQuestion, timeout?: number): Promise<LookupAnswer>
346
380
  ```
347
- See also: [LookupAnswer](./overlay-tools.md#type-lookupanswer), [LookupQuestion](./overlay-tools.md#interface-lookupquestion)
381
+ See also: [LookupAnswer](#type-lookupanswer), [LookupQuestion](#interface-lookupquestion)
382
+
383
+ </details>
348
384
 
349
385
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
350
386
 
@@ -371,7 +407,11 @@ export default class OverlayAdminTokenTemplate implements ScriptTemplate {
371
407
  }
372
408
  ```
373
409
 
374
- See also: [LockingScript](./script.md#class-lockingscript), [PushDrop](./script.md#class-pushdrop), [ScriptTemplate](./script.md#interface-scripttemplate), [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [WalletInterface](./wallet.md#interface-walletinterface), [sign](./compat.md#variable-sign)
410
+ See also: [LockingScript](#class-lockingscript), [PushDrop](#class-pushdrop), [ScriptTemplate](#interface-scripttemplate), [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [WalletInterface](#interface-walletinterface), [sign](#variable-sign)
411
+
412
+ <details>
413
+
414
+ <summary>Class OverlayAdminTokenTemplate Details</summary>
375
415
 
376
416
  #### Constructor
377
417
 
@@ -380,7 +420,7 @@ Constructs a new Overlay Admin template instance
380
420
  ```ts
381
421
  constructor(wallet: WalletInterface)
382
422
  ```
383
- See also: [WalletInterface](./wallet.md#interface-walletinterface)
423
+ See also: [WalletInterface](#interface-walletinterface)
384
424
 
385
425
  Argument Details
386
426
 
@@ -399,7 +439,7 @@ static decode(script: LockingScript): {
399
439
  topicOrService: string;
400
440
  }
401
441
  ```
402
- See also: [LockingScript](./script.md#class-lockingscript)
442
+ See also: [LockingScript](#class-lockingscript)
403
443
 
404
444
  Returns
405
445
 
@@ -417,7 +457,7 @@ Creates a new advertisement locking script
417
457
  ```ts
418
458
  async lock(protocol: "SHIP" | "SLAP", domain: string, topicOrService: string): Promise<LockingScript>
419
459
  ```
420
- See also: [LockingScript](./script.md#class-lockingscript)
460
+ See also: [LockingScript](#class-lockingscript)
421
461
 
422
462
  Returns
423
463
 
@@ -442,7 +482,7 @@ unlock(protocol: "SHIP" | "SLAP"): {
442
482
  estimateLength: (tx: Transaction, inputIndex: number) => Promise<number>;
443
483
  }
444
484
  ```
445
- See also: [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [sign](./compat.md#variable-sign)
485
+ See also: [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [sign](#variable-sign)
446
486
 
447
487
  Returns
448
488
 
@@ -453,6 +493,8 @@ Argument Details
453
493
  + **protocol**
454
494
  + SHIP or SLAP, depending on the token to unlock
455
495
 
496
+ </details>
497
+
456
498
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
457
499
 
458
500
  ---
@@ -467,7 +509,11 @@ export default class TopicBroadcaster implements Broadcaster {
467
509
  }
468
510
  ```
469
511
 
470
- See also: [BroadcastFailure](./transaction.md#interface-broadcastfailure), [BroadcastResponse](./transaction.md#interface-broadcastresponse), [Broadcaster](./transaction.md#interface-broadcaster), [SHIPBroadcasterConfig](./overlay-tools.md#interface-shipbroadcasterconfig), [Transaction](./transaction.md#class-transaction)
512
+ See also: [BroadcastFailure](#interface-broadcastfailure), [BroadcastResponse](#interface-broadcastresponse), [Broadcaster](#interface-broadcaster), [SHIPBroadcasterConfig](#interface-shipbroadcasterconfig), [Transaction](#class-transaction)
513
+
514
+ <details>
515
+
516
+ <summary>Class TopicBroadcaster Details</summary>
471
517
 
472
518
  #### Constructor
473
519
 
@@ -476,7 +522,7 @@ Constructs an instance of the SHIP broadcaster.
476
522
  ```ts
477
523
  constructor(topics: string[], config: SHIPBroadcasterConfig = {})
478
524
  ```
479
- See also: [SHIPBroadcasterConfig](./overlay-tools.md#interface-shipbroadcasterconfig)
525
+ See also: [SHIPBroadcasterConfig](#interface-shipbroadcasterconfig)
480
526
 
481
527
  Argument Details
482
528
 
@@ -492,7 +538,7 @@ Broadcasts a transaction to Overlay Services via SHIP.
492
538
  ```ts
493
539
  async broadcast(tx: Transaction): Promise<BroadcastResponse | BroadcastFailure>
494
540
  ```
495
- See also: [BroadcastFailure](./transaction.md#interface-broadcastfailure), [BroadcastResponse](./transaction.md#interface-broadcastresponse), [Transaction](./transaction.md#class-transaction)
541
+ See also: [BroadcastFailure](#interface-broadcastfailure), [BroadcastResponse](#interface-broadcastresponse), [Transaction](#class-transaction)
496
542
 
497
543
  Returns
498
544
 
@@ -503,6 +549,8 @@ Argument Details
503
549
  + **tx**
504
550
  + The transaction to be sent.
505
551
 
552
+ </details>
553
+
506
554
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
507
555
 
508
556
  ---
@@ -548,7 +596,7 @@ Submitted Transaction Execution AcKnowledgment
548
596
  export type STEAK = Record<string, AdmittanceInstructions>
549
597
  ```
550
598
 
551
- See also: [AdmittanceInstructions](./overlay-tools.md#interface-admittanceinstructions)
599
+ See also: [AdmittanceInstructions](#interface-admittanceinstructions)
552
600
 
553
601
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
554
602