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