@bsv/sdk 1.6.14 → 1.6.15

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.
@@ -31,19 +31,18 @@ Creates an instance of the localKVStore.
31
31
  ```ts
32
32
  constructor(wallet: WalletInterface = new WalletClient(), context = "kvstore default", encrypt = true, originator?: string, acceptDelayedBroadcast = false)
33
33
  ```
34
-
35
34
  See also: [WalletClient](./wallet.md#class-walletclient), [WalletInterface](./wallet.md#interface-walletinterface), [encrypt](./messages.md#variable-encrypt)
36
35
 
37
36
  Argument Details
38
37
 
39
- - **wallet**
40
- - The wallet interface to use. Defaults to a new WalletClient instance.
41
- - **context**
42
- - The context (basket) for namespacing keys. Defaults to 'kvstore default'.
43
- - **encrypt**
44
- - Whether to encrypt values. Defaults to true.
45
- - **originator**
46
- - — An originator to use with PushDrop and the wallet, if provided.
38
+ + **wallet**
39
+ + The wallet interface to use. Defaults to a new WalletClient instance.
40
+ + **context**
41
+ + The context (basket) for namespacing keys. Defaults to 'kvstore default'.
42
+ + **encrypt**
43
+ + Whether to encrypt values. Defaults to true.
44
+ + **originator**
45
+ + — An originator to use with PushDrop and the wallet, if provided.
47
46
 
48
47
  Throws
49
48
 
@@ -64,10 +63,10 @@ the defaultValue if the key is not found, or undefined if no defaultValue is pro
64
63
 
65
64
  Argument Details
66
65
 
67
- - **key**
68
- - The key to retrieve the value for.
69
- - **defaultValue**
70
- - The value to return if the key is not found.
66
+ + **key**
67
+ + The key to retrieve the value for.
68
+ + **defaultValue**
69
+ + The value to return if the key is not found.
71
70
 
72
71
  Throws
73
72
 
@@ -93,8 +92,8 @@ A promise that resolves to the txids of the removal transactions if successful.
93
92
 
94
93
  Argument Details
95
94
 
96
- - **key**
97
- - The key to remove.
95
+ + **key**
96
+ + The key to remove.
98
97
 
99
98
  #### Method set
100
99
 
@@ -111,7 +110,6 @@ to the same key from missing earlier changes.
111
110
  ```ts
112
111
  async set(key: string, value: string): Promise<OutpointString>
113
112
  ```
114
-
115
113
  See also: [OutpointString](./wallet.md#type-outpointstring)
116
114
 
117
115
  Returns
@@ -120,15 +118,14 @@ A promise that resolves to the outpoint string (txid.vout) of the new or updated
120
118
 
121
119
  Argument Details
122
120
 
123
- - **key**
124
- - The key to set or update.
125
- - **value**
126
- - The value to associate with the key.
121
+ + **key**
122
+ + The key to set or update.
123
+ + **value**
124
+ + The value to associate with the key.
127
125
 
128
126
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
129
127
 
130
128
  ---
131
-
132
129
  ## Functions
133
130
 
134
131
  ## Types
@@ -136,3 +133,4 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
136
133
  ## Enums
137
134
 
138
135
  ## Variables
136
+
@@ -52,7 +52,6 @@ See also: [PrivateKey](./primitives.md#class-privatekey), [PublicKey](./primitiv
52
52
  Links: [API](#api), [Classes](#classes), [Functions](#functions), [Variables](#variables)
53
53
 
54
54
  ---
55
-
56
55
  ### Variable: encrypt
57
56
 
58
57
  ```ts
@@ -82,7 +81,6 @@ See also: [PrivateKey](./primitives.md#class-privatekey), [PublicKey](./primitiv
82
81
  Links: [API](#api), [Classes](#classes), [Functions](#functions), [Variables](#variables)
83
82
 
84
83
  ---
85
-
86
84
  ### Variable: sign
87
85
 
88
86
  ```ts
@@ -116,7 +114,6 @@ See also: [Curve](./primitives.md#class-curve), [PrivateKey](./primitives.md#cla
116
114
  Links: [API](#api), [Classes](#classes), [Functions](#functions), [Variables](#variables)
117
115
 
118
116
  ---
119
-
120
117
  ### Variable: verify
121
118
 
122
119
  ```ts
@@ -58,7 +58,6 @@ outputsToAdmit: number[]
58
58
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
59
59
 
60
60
  ---
61
-
62
61
  ### Interface: LookupQuestion
63
62
 
64
63
  The question asked to the Overlay Services Engine when a consumer of state wishes to look up information.
@@ -90,7 +89,6 @@ service: string
90
89
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
91
90
 
92
91
  ---
93
-
94
92
  ### Interface: LookupResolverConfig
95
93
 
96
94
  Configuration options for the Lookup resolver.
@@ -122,7 +120,6 @@ The facilitator used to make requests to Overlay Services hosts.
122
120
  ```ts
123
121
  facilitator?: OverlayLookupFacilitator
124
122
  ```
125
-
126
123
  See also: [OverlayLookupFacilitator](./overlay-tools.md#interface-overlaylookupfacilitator)
127
124
 
128
125
  #### Property hostOverrides
@@ -136,7 +133,6 @@ hostOverrides?: Record<string, string[]>
136
133
  #### Property networkPreset
137
134
 
138
135
  The network preset to use, unless other options override it.
139
-
140
136
  - mainnet: use mainnet SLAP trackers and HTTPS facilitator
141
137
  - testnet: use testnet SLAP trackers and HTTPS facilitator
142
138
  - local: directly query from localhost:8080 and a facilitator that permits plain HTTP
@@ -156,7 +152,6 @@ slapTrackers?: string[]
156
152
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
157
153
 
158
154
  ---
159
-
160
155
  ### Interface: OverlayBroadcastFacilitator
161
156
 
162
157
  Facilitates transaction broadcasts that return STEAK.
@@ -172,7 +167,6 @@ See also: [STEAK](./overlay-tools.md#type-steak), [TaggedBEEF](./overlay-tools.m
172
167
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
173
168
 
174
169
  ---
175
-
176
170
  ### Interface: OverlayLookupFacilitator
177
171
 
178
172
  Facilitates lookups to URLs that return answers.
@@ -192,13 +186,11 @@ Returns a lookup answer for a lookup question
192
186
  ```ts
193
187
  lookup: (url: string, question: LookupQuestion, timeout?: number) => Promise<LookupAnswer>
194
188
  ```
195
-
196
189
  See also: [LookupAnswer](./overlay-tools.md#type-lookupanswer), [LookupQuestion](./overlay-tools.md#interface-lookupquestion)
197
190
 
198
191
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
199
192
 
200
193
  ---
201
-
202
194
  ### Interface: SHIPBroadcasterConfig
203
195
 
204
196
  Configuration options for the SHIP broadcaster.
@@ -223,13 +215,11 @@ The facilitator used to make requests to Overlay Services hosts.
223
215
  ```ts
224
216
  facilitator?: OverlayBroadcastFacilitator
225
217
  ```
226
-
227
218
  See also: [OverlayBroadcastFacilitator](./overlay-tools.md#interface-overlaybroadcastfacilitator)
228
219
 
229
220
  #### Property networkPreset
230
221
 
231
222
  The network preset to use, unless other options override it.
232
-
233
223
  - mainnet: use mainnet resolver and HTTPS facilitator
234
224
  - testnet: use testnet resolver and HTTPS facilitator
235
225
  - local: directly send to localhost:8080 and a facilitator that permits plain HTTP
@@ -269,13 +259,11 @@ The resolver used to locate suitable hosts with SHIP
269
259
  ```ts
270
260
  resolver?: LookupResolver
271
261
  ```
272
-
273
262
  See also: [LookupResolver](./overlay-tools.md#class-lookupresolver)
274
263
 
275
264
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
276
265
 
277
266
  ---
278
-
279
267
  ### Interface: TaggedBEEF
280
268
 
281
269
  Tagged BEEF
@@ -291,7 +279,6 @@ export interface TaggedBEEF {
291
279
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
292
280
 
293
281
  ---
294
-
295
282
  ## Classes
296
283
 
297
284
  | |
@@ -322,7 +309,6 @@ See also: [OverlayBroadcastFacilitator](./overlay-tools.md#interface-overlaybroa
322
309
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
323
310
 
324
311
  ---
325
-
326
312
  ### Class: HTTPSOverlayLookupFacilitator
327
313
 
328
314
  ```ts
@@ -339,7 +325,6 @@ See also: [LookupAnswer](./overlay-tools.md#type-lookupanswer), [LookupQuestion]
339
325
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
340
326
 
341
327
  ---
342
-
343
328
  ### Class: LookupResolver
344
329
 
345
330
  Represents an SHIP transaction broadcaster.
@@ -360,13 +345,11 @@ Given a LookupQuestion, returns a LookupAnswer. Aggregates across multiple servi
360
345
  ```ts
361
346
  async query(question: LookupQuestion, timeout?: number): Promise<LookupAnswer>
362
347
  ```
363
-
364
348
  See also: [LookupAnswer](./overlay-tools.md#type-lookupanswer), [LookupQuestion](./overlay-tools.md#interface-lookupquestion)
365
349
 
366
350
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
367
351
 
368
352
  ---
369
-
370
353
  ### Class: OverlayAdminTokenTemplate
371
354
 
372
355
  Script template enabling the creation, unlocking, and decoding of SHIP and SLAP advertisements.
@@ -398,13 +381,12 @@ Constructs a new Overlay Admin template instance
398
381
  ```ts
399
382
  constructor(wallet: WalletInterface)
400
383
  ```
401
-
402
384
  See also: [WalletInterface](./wallet.md#interface-walletinterface)
403
385
 
404
386
  Argument Details
405
387
 
406
- - **wallet**
407
- - Wallet to use for locking and unlocking
388
+ + **wallet**
389
+ + Wallet to use for locking and unlocking
408
390
 
409
391
  #### Method decode
410
392
 
@@ -418,7 +400,6 @@ static decode(script: LockingScript): {
418
400
  topicOrService: string;
419
401
  }
420
402
  ```
421
-
422
403
  See also: [LockingScript](./script.md#class-lockingscript)
423
404
 
424
405
  Returns
@@ -427,8 +408,8 @@ Decoded SHIP or SLAP advertisement
427
408
 
428
409
  Argument Details
429
410
 
430
- - **script**
431
- - Locking script comprising a SHIP or SLAP token to decode
411
+ + **script**
412
+ + Locking script comprising a SHIP or SLAP token to decode
432
413
 
433
414
  #### Method lock
434
415
 
@@ -437,7 +418,6 @@ Creates a new advertisement locking script
437
418
  ```ts
438
419
  async lock(protocol: "SHIP" | "SLAP", domain: string, topicOrService: string): Promise<LockingScript>
439
420
  ```
440
-
441
421
  See also: [LockingScript](./script.md#class-lockingscript)
442
422
 
443
423
  Returns
@@ -446,12 +426,12 @@ Locking script comprising the advertisement token
446
426
 
447
427
  Argument Details
448
428
 
449
- - **protocol**
450
- - SHIP or SLAP
451
- - **domain**
452
- - Domain where the topic or service is available
453
- - **topicOrService**
454
- - Topic or service to advertise
429
+ + **protocol**
430
+ + SHIP or SLAP
431
+ + **domain**
432
+ + Domain where the topic or service is available
433
+ + **topicOrService**
434
+ + Topic or service to advertise
455
435
 
456
436
  #### Method unlock
457
437
 
@@ -463,7 +443,6 @@ unlock(protocol: "SHIP" | "SLAP"): {
463
443
  estimateLength: (tx: Transaction, inputIndex: number) => Promise<number>;
464
444
  }
465
445
  ```
466
-
467
446
  See also: [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [sign](./compat.md#variable-sign)
468
447
 
469
448
  Returns
@@ -472,13 +451,12 @@ Script unlocker capable of unlocking the advertisement token
472
451
 
473
452
  Argument Details
474
453
 
475
- - **protocol**
476
- - SHIP or SLAP, depending on the token to unlock
454
+ + **protocol**
455
+ + SHIP or SLAP, depending on the token to unlock
477
456
 
478
457
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
479
458
 
480
459
  ---
481
-
482
460
  ### Class: TopicBroadcaster
483
461
 
484
462
  Broadcasts transactions to one or more overlay topics.
@@ -499,15 +477,14 @@ Constructs an instance of the SHIP broadcaster.
499
477
  ```ts
500
478
  constructor(topics: string[], config: SHIPBroadcasterConfig = {})
501
479
  ```
502
-
503
480
  See also: [SHIPBroadcasterConfig](./overlay-tools.md#interface-shipbroadcasterconfig)
504
481
 
505
482
  Argument Details
506
483
 
507
- - **topics**
508
- - The list of SHIP topic names where transactions are to be sent.
509
- - **config**
510
- - Configuration options for the SHIP broadcaster.
484
+ + **topics**
485
+ + The list of SHIP topic names where transactions are to be sent.
486
+ + **config**
487
+ + Configuration options for the SHIP broadcaster.
511
488
 
512
489
  #### Method broadcast
513
490
 
@@ -516,7 +493,6 @@ Broadcasts a transaction to Overlay Services via SHIP.
516
493
  ```ts
517
494
  async broadcast(tx: Transaction): Promise<BroadcastResponse | BroadcastFailure>
518
495
  ```
519
-
520
496
  See also: [BroadcastFailure](./transaction.md#interface-broadcastfailure), [BroadcastResponse](./transaction.md#interface-broadcastresponse), [Transaction](./transaction.md#class-transaction)
521
497
 
522
498
  Returns
@@ -525,13 +501,12 @@ A promise that resolves to either a success or failure response.
525
501
 
526
502
  Argument Details
527
503
 
528
- - **tx**
529
- - The transaction to be sent.
504
+ + **tx**
505
+ + The transaction to be sent.
530
506
 
531
507
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
532
508
 
533
509
  ---
534
-
535
510
  ## Functions
536
511
 
537
512
  ## Types
@@ -564,7 +539,6 @@ export type LookupAnswer = {
564
539
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
565
540
 
566
541
  ---
567
-
568
542
  ### Type: STEAK
569
543
 
570
544
  Submitted Transaction Execution AcKnowledgment
@@ -578,7 +552,6 @@ See also: [AdmittanceInstructions](./overlay-tools.md#interface-admittanceinstru
578
552
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
579
553
 
580
554
  ---
581
-
582
555
  ## Enums
583
556
 
584
557
  ## Variables
@@ -603,7 +576,6 @@ DEFAULT_SLAP_TRACKERS: string[] = [
603
576
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
604
577
 
605
578
  ---
606
-
607
579
  ### Variable: DEFAULT_TESTNET_SLAP_TRACKERS
608
580
 
609
581
  ```ts