@bsv/sdk 1.2.1 → 1.2.2

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.
@@ -18,6 +18,42 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
18
18
 
19
19
  ---
20
20
 
21
+ ### Interface: AdmittanceInstructions
22
+
23
+ Instructs the Overlay Services Engine about which outputs to admit and which previous outputs to retain. Returned by a Topic Manager.
24
+
25
+ ```ts
26
+ export interface AdmittanceInstructions {
27
+ outputsToAdmit: number[];
28
+ coinsToRetain: number[];
29
+ }
30
+ ```
31
+
32
+ <details>
33
+
34
+ <summary>Interface AdmittanceInstructions Details</summary>
35
+
36
+ #### Property coinsToRetain
37
+
38
+ The indices of all inputs from the provided transaction which spend previously-admitted outputs that should be retained for historical record-keeping.
39
+
40
+ ```ts
41
+ coinsToRetain: number[]
42
+ ```
43
+
44
+ #### Property outputsToAdmit
45
+
46
+ The indices of all admissable outputs into the managed topic from the provided transaction.
47
+
48
+ ```ts
49
+ outputsToAdmit: number[]
50
+ ```
51
+
52
+ </details>
53
+
54
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
55
+
56
+ ---
21
57
  ### Interface: LookupQuestion
22
58
 
23
59
  The question asked to the Overlay Services Engine when a consumer of state wishes to look up information.
@@ -68,6 +104,8 @@ export interface LookupResolverConfig {
68
104
  }
69
105
  ```
70
106
 
107
+ See also: [OverlayLookupFacilitator](#interface-overlaylookupfacilitator)
108
+
71
109
  <details>
72
110
 
73
111
  <summary>Interface LookupResolverConfig Details</summary>
@@ -87,6 +125,7 @@ The facilitator used to make requests to Overlay Services hosts.
87
125
  ```ts
88
126
  facilitator?: OverlayLookupFacilitator
89
127
  ```
128
+ See also: [OverlayLookupFacilitator](#interface-overlaylookupfacilitator)
90
129
 
91
130
  #### Property hostOverrides
92
131
 
@@ -109,65 +148,32 @@ slapTrackers?: string[]
109
148
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
110
149
 
111
150
  ---
112
- ### Interface: OverlayLookupFacilitator
151
+ ### Interface: OverlayBroadcastFacilitator
113
152
 
114
- Facilitates lookups to URLs that return answers.
153
+ Facilitates transaction broadcasts that return STEAK.
115
154
 
116
155
  ```ts
117
- export interface OverlayLookupFacilitator {
118
- lookup: (url: string, question: LookupQuestion) => Promise<LookupAnswer>;
156
+ export interface OverlayBroadcastFacilitator {
157
+ send: (url: string, taggedBEEF: TaggedBEEF) => Promise<STEAK>;
119
158
  }
120
159
  ```
121
160
 
122
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
123
-
124
- ---
125
- ### Interface: TaggedBEEF
126
-
127
- Tagged BEEF
128
-
129
- ```ts
130
- export interface TaggedBEEF {
131
- beef: number[];
132
- topics: string[];
133
- }
134
- ```
161
+ See also: [STEAK](#type-steak), [TaggedBEEF](#interface-taggedbeef)
135
162
 
136
163
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
137
164
 
138
165
  ---
139
- ### Interface: AdmittanceInstructions
166
+ ### Interface: OverlayLookupFacilitator
140
167
 
141
- Instructs the Overlay Services Engine about which outputs to admit and which previous outputs to retain. Returned by a Topic Manager.
168
+ Facilitates lookups to URLs that return answers.
142
169
 
143
170
  ```ts
144
- export interface AdmittanceInstructions {
145
- outputsToAdmit: number[];
146
- coinsToRetain: number[];
171
+ export interface OverlayLookupFacilitator {
172
+ lookup: (url: string, question: LookupQuestion) => Promise<LookupAnswer>;
147
173
  }
148
174
  ```
149
175
 
150
- <details>
151
-
152
- <summary>Interface AdmittanceInstructions Details</summary>
153
-
154
- #### Property coinsToRetain
155
-
156
- The indices of all inputs from the provided transaction which spend previously-admitted outputs that should be retained for historical record-keeping.
157
-
158
- ```ts
159
- coinsToRetain: number[]
160
- ```
161
-
162
- #### Property outputsToAdmit
163
-
164
- The indices of all admissable outputs into the managed topic from the provided transaction.
165
-
166
- ```ts
167
- outputsToAdmit: number[]
168
- ```
169
-
170
- </details>
176
+ See also: [LookupAnswer](#type-lookupanswer), [LookupQuestion](#interface-lookupquestion)
171
177
 
172
178
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
173
179
 
@@ -186,6 +192,8 @@ export interface SHIPBroadcasterConfig {
186
192
  }
187
193
  ```
188
194
 
195
+ See also: [LookupResolver](#class-lookupresolver), [OverlayBroadcastFacilitator](#interface-overlaybroadcastfacilitator)
196
+
189
197
  <details>
190
198
 
191
199
  <summary>Interface SHIPBroadcasterConfig Details</summary>
@@ -197,6 +205,7 @@ The facilitator used to make requests to Overlay Services hosts.
197
205
  ```ts
198
206
  facilitator?: OverlayBroadcastFacilitator
199
207
  ```
208
+ See also: [OverlayBroadcastFacilitator](#interface-overlaybroadcastfacilitator)
200
209
 
201
210
  #### Property requireAcknowledgmentFromAllHostsForTopics
202
211
 
@@ -229,19 +238,21 @@ The resolver used to locate suitable hosts with SHIP
229
238
  ```ts
230
239
  resolver: LookupResolver
231
240
  ```
241
+ See also: [LookupResolver](#class-lookupresolver)
232
242
 
233
243
  </details>
234
244
 
235
245
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
236
246
 
237
247
  ---
238
- ### Interface: OverlayBroadcastFacilitator
248
+ ### Interface: TaggedBEEF
239
249
 
240
- Facilitates transaction broadcasts that return STEAK.
250
+ Tagged BEEF
241
251
 
242
252
  ```ts
243
- export interface OverlayBroadcastFacilitator {
244
- send: (url: string, taggedBEEF: TaggedBEEF) => Promise<STEAK>;
253
+ export interface TaggedBEEF {
254
+ beef: number[];
255
+ topics: string[];
245
256
  }
246
257
  ```
247
258
 
@@ -262,6 +273,67 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
262
273
 
263
274
  ---
264
275
 
276
+ ### Class: HTTPSOverlayBroadcastFacilitator
277
+
278
+ ```ts
279
+ export class HTTPSOverlayBroadcastFacilitator implements OverlayBroadcastFacilitator {
280
+ httpClient: typeof fetch;
281
+ constructor(httpClient = fetch)
282
+ async send(url: string, taggedBEEF: TaggedBEEF): Promise<STEAK>
283
+ }
284
+ ```
285
+
286
+ See also: [OverlayBroadcastFacilitator](#interface-overlaybroadcastfacilitator), [STEAK](#type-steak), [TaggedBEEF](#interface-taggedbeef)
287
+
288
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
289
+
290
+ ---
291
+ ### Class: HTTPSOverlayLookupFacilitator
292
+
293
+ ```ts
294
+ export class HTTPSOverlayLookupFacilitator implements OverlayLookupFacilitator {
295
+ fetchClient: typeof fetch;
296
+ constructor(httpClient = fetch)
297
+ async lookup(url: string, question: LookupQuestion): Promise<LookupAnswer>
298
+ }
299
+ ```
300
+
301
+ See also: [LookupAnswer](#type-lookupanswer), [LookupQuestion](#interface-lookupquestion), [OverlayLookupFacilitator](#interface-overlaylookupfacilitator)
302
+
303
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
304
+
305
+ ---
306
+ ### Class: LookupResolver
307
+
308
+ Represents an SHIP transaction broadcaster.
309
+
310
+ ```ts
311
+ export default class LookupResolver {
312
+ constructor(config?: LookupResolverConfig)
313
+ async query(question: LookupQuestion): Promise<LookupAnswer>
314
+ }
315
+ ```
316
+
317
+ See also: [LookupAnswer](#type-lookupanswer), [LookupQuestion](#interface-lookupquestion), [LookupResolverConfig](#interface-lookupresolverconfig)
318
+
319
+ <details>
320
+
321
+ <summary>Class LookupResolver Details</summary>
322
+
323
+ #### Method query
324
+
325
+ Given a LookupQuestion, returns a LookupAnswer. Aggregates across multiple services and supports resiliency.
326
+
327
+ ```ts
328
+ async query(question: LookupQuestion): Promise<LookupAnswer>
329
+ ```
330
+ See also: [LookupAnswer](#type-lookupanswer), [LookupQuestion](#interface-lookupquestion)
331
+
332
+ </details>
333
+
334
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
335
+
336
+ ---
265
337
  ### Class: OverlayAdminTokenTemplate
266
338
 
267
339
  Script template enabling the creation, unlocking, and decoding of SHIP and SLAP advertisements.
@@ -284,6 +356,8 @@ export default class OverlayAdminTokenTemplate implements ScriptTemplate {
284
356
  }
285
357
  ```
286
358
 
359
+ See also: [LockingScript](#class-lockingscript), [PushDrop](#class-pushdrop), [ScriptTemplate](#interface-scripttemplate), [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [Wallet](#interface-wallet), [sign](#variable-sign)
360
+
287
361
  <details>
288
362
 
289
363
  <summary>Class OverlayAdminTokenTemplate Details</summary>
@@ -295,6 +369,7 @@ Constructs a new Overlay Admin template instance
295
369
  ```ts
296
370
  constructor(wallet: Wallet)
297
371
  ```
372
+ See also: [Wallet](#interface-wallet)
298
373
 
299
374
  Argument Details
300
375
 
@@ -313,6 +388,7 @@ static decode(script: LockingScript): {
313
388
  topicOrService: string;
314
389
  }
315
390
  ```
391
+ See also: [LockingScript](#class-lockingscript)
316
392
 
317
393
  Returns
318
394
 
@@ -330,6 +406,7 @@ Creates a new advertisement locking script
330
406
  ```ts
331
407
  async lock(protocol: "SHIP" | "SLAP", domain: string, topicOrService: string): Promise<LockingScript>
332
408
  ```
409
+ See also: [LockingScript](#class-lockingscript)
333
410
 
334
411
  Returns
335
412
 
@@ -354,6 +431,7 @@ unlock(protocol: "SHIP" | "SLAP"): {
354
431
  estimateLength: (tx: Transaction, inputIndex: number) => Promise<number>;
355
432
  }
356
433
  ```
434
+ See also: [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [sign](#variable-sign)
357
435
 
358
436
  Returns
359
437
 
@@ -368,60 +446,6 @@ Argument Details
368
446
 
369
447
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
370
448
 
371
- ---
372
- ### Class: HTTPSOverlayLookupFacilitator
373
-
374
- ```ts
375
- export class HTTPSOverlayLookupFacilitator implements OverlayLookupFacilitator {
376
- fetchClient: typeof fetch;
377
- constructor(httpClient = fetch)
378
- async lookup(url: string, question: LookupQuestion): Promise<LookupAnswer>
379
- }
380
- ```
381
-
382
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
383
-
384
- ---
385
- ### Class: LookupResolver
386
-
387
- Represents an SHIP transaction broadcaster.
388
-
389
- ```ts
390
- export default class LookupResolver {
391
- constructor(config?: LookupResolverConfig)
392
- async query(question: LookupQuestion): Promise<LookupAnswer>
393
- }
394
- ```
395
-
396
- <details>
397
-
398
- <summary>Class LookupResolver Details</summary>
399
-
400
- #### Method query
401
-
402
- Given a LookupQuestion, returns a LookupAnswer. Aggregates across multiple services and supports resiliency.
403
-
404
- ```ts
405
- async query(question: LookupQuestion): Promise<LookupAnswer>
406
- ```
407
-
408
- </details>
409
-
410
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
411
-
412
- ---
413
- ### Class: HTTPSOverlayBroadcastFacilitator
414
-
415
- ```ts
416
- export class HTTPSOverlayBroadcastFacilitator implements OverlayBroadcastFacilitator {
417
- httpClient: typeof fetch;
418
- constructor(httpClient = fetch)
419
- async send(url: string, taggedBEEF: TaggedBEEF): Promise<STEAK>
420
- }
421
- ```
422
-
423
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
424
-
425
449
  ---
426
450
  ### Class: SHIPCast
427
451
 
@@ -434,6 +458,8 @@ export default class SHIPCast implements Broadcaster {
434
458
  }
435
459
  ```
436
460
 
461
+ See also: [BroadcastFailure](#interface-broadcastfailure), [BroadcastResponse](#interface-broadcastresponse), [Broadcaster](#interface-broadcaster), [SHIPBroadcasterConfig](#interface-shipbroadcasterconfig), [Transaction](#class-transaction)
462
+
437
463
  <details>
438
464
 
439
465
  <summary>Class SHIPCast Details</summary>
@@ -445,6 +471,7 @@ Constructs an instance of the SHIP broadcaster.
445
471
  ```ts
446
472
  constructor(topics: string[], config?: SHIPBroadcasterConfig)
447
473
  ```
474
+ See also: [SHIPBroadcasterConfig](#interface-shipbroadcasterconfig)
448
475
 
449
476
  Argument Details
450
477
 
@@ -460,6 +487,7 @@ Broadcasts a transaction to Overlay Services via SHIP.
460
487
  ```ts
461
488
  async broadcast(tx: Transaction): Promise<BroadcastResponse | BroadcastFailure>
462
489
  ```
490
+ See also: [BroadcastFailure](#interface-broadcastfailure), [BroadcastResponse](#interface-broadcastresponse), [Transaction](#class-transaction)
463
491
 
464
492
  Returns
465
493
 
@@ -517,6 +545,8 @@ Submitted Transaction Execution AcKnowledgment
517
545
  export type STEAK = Record<string, AdmittanceInstructions>
518
546
  ```
519
547
 
548
+ See also: [AdmittanceInstructions](#interface-admittanceinstructions)
549
+
520
550
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
521
551
 
522
552
  ---