@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
package/docs/auth.md CHANGED
@@ -33,7 +33,7 @@ export interface AuthMessage {
33
33
  }
34
34
  ```
35
35
 
36
- See also: [RequestedCertificateSet](./auth.md#interface-requestedcertificateset), [VerifiableCertificate](./auth.md#class-verifiablecertificate)
36
+ See also: [RequestedCertificateSet](#interface-requestedcertificateset), [VerifiableCertificate](#class-verifiablecertificate)
37
37
 
38
38
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
39
39
 
@@ -62,7 +62,7 @@ export interface RequestedCertificateSet {
62
62
  }
63
63
  ```
64
64
 
65
- See also: [RequestedCertificateTypeIDAndFieldList](./auth.md#interface-requestedcertificatetypeidandfieldlist)
65
+ See also: [RequestedCertificateTypeIDAndFieldList](#interface-requestedcertificatetypeidandfieldlist)
66
66
 
67
67
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
68
68
 
@@ -87,7 +87,7 @@ export interface Transport {
87
87
  }
88
88
  ```
89
89
 
90
- See also: [AuthMessage](./auth.md#interface-authmessage)
90
+ See also: [AuthMessage](#interface-authmessage)
91
91
 
92
92
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
93
93
 
@@ -128,7 +128,11 @@ export class AuthFetch {
128
128
  }
129
129
  ```
130
130
 
131
- See also: [RequestedCertificateSet](./auth.md#interface-requestedcertificateset), [SessionManager](./auth.md#class-sessionmanager), [VerifiableCertificate](./auth.md#class-verifiablecertificate), [WalletInterface](./wallet.md#interface-walletinterface)
131
+ See also: [RequestedCertificateSet](#interface-requestedcertificateset), [SessionManager](#class-sessionmanager), [VerifiableCertificate](#class-verifiablecertificate), [WalletInterface](#interface-walletinterface)
132
+
133
+ <details>
134
+
135
+ <summary>Class AuthFetch Details</summary>
132
136
 
133
137
  #### Constructor
134
138
 
@@ -137,7 +141,7 @@ Constructs a new AuthFetch instance.
137
141
  ```ts
138
142
  constructor(wallet: WalletInterface, requestedCertificates?: RequestedCertificateSet, sessionManager?: SessionManager)
139
143
  ```
140
- See also: [RequestedCertificateSet](./auth.md#interface-requestedcertificateset), [SessionManager](./auth.md#class-sessionmanager), [WalletInterface](./wallet.md#interface-walletinterface)
144
+ See also: [RequestedCertificateSet](#interface-requestedcertificateset), [SessionManager](#class-sessionmanager), [WalletInterface](#interface-walletinterface)
141
145
 
142
146
  Argument Details
143
147
 
@@ -153,7 +157,7 @@ Return any certificates we've collected thus far, then clear them out.
153
157
  ```ts
154
158
  public consumeReceivedCertificates(): VerifiableCertificate[]
155
159
  ```
156
- See also: [VerifiableCertificate](./auth.md#class-verifiablecertificate)
160
+ See also: [VerifiableCertificate](#class-verifiablecertificate)
157
161
 
158
162
  #### Method fetch
159
163
 
@@ -189,7 +193,9 @@ Request Certificates from a Peer
189
193
  ```ts
190
194
  async sendCertificateRequest(baseUrl: string, certificatesToRequest: RequestedCertificateSet): Promise<VerifiableCertificate[]>
191
195
  ```
192
- See also: [RequestedCertificateSet](./auth.md#interface-requestedcertificateset), [VerifiableCertificate](./auth.md#class-verifiablecertificate)
196
+ See also: [RequestedCertificateSet](#interface-requestedcertificateset), [VerifiableCertificate](#class-verifiablecertificate)
197
+
198
+ </details>
193
199
 
194
200
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
195
201
 
@@ -221,7 +227,11 @@ export default class Certificate {
221
227
  }
222
228
  ```
223
229
 
224
- See also: [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [HexString](./wallet.md#type-hexstring), [OutpointString](./wallet.md#type-outpointstring), [ProtoWallet](./wallet.md#class-protowallet), [PubKeyHex](./wallet.md#type-pubkeyhex), [WalletProtocol](./wallet.md#type-walletprotocol), [sign](./compat.md#variable-sign), [verify](./compat.md#variable-verify)
230
+ See also: [Base64String](#type-base64string), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [HexString](#type-hexstring), [OutpointString](#type-outpointstring), [ProtoWallet](#class-protowallet), [PubKeyHex](#type-pubkeyhex), [WalletProtocol](#type-walletprotocol), [sign](#variable-sign), [verify](#variable-verify)
231
+
232
+ <details>
233
+
234
+ <summary>Class Certificate Details</summary>
225
235
 
226
236
  #### Constructor
227
237
 
@@ -230,7 +240,7 @@ Constructs a new Certificate.
230
240
  ```ts
231
241
  constructor(type: Base64String, serialNumber: Base64String, subject: PubKeyHex, certifier: PubKeyHex, revocationOutpoint: OutpointString, fields: Record<CertificateFieldNameUnder50Bytes, string>, signature?: HexString)
232
242
  ```
233
- See also: [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [HexString](./wallet.md#type-hexstring), [OutpointString](./wallet.md#type-outpointstring), [PubKeyHex](./wallet.md#type-pubkeyhex)
243
+ See also: [Base64String](#type-base64string), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [HexString](#type-hexstring), [OutpointString](#type-outpointstring), [PubKeyHex](#type-pubkeyhex)
234
244
 
235
245
  Argument Details
236
246
 
@@ -256,7 +266,7 @@ Public key of the certifier who issued the certificate, compressed public key he
256
266
  ```ts
257
267
  certifier: PubKeyHex
258
268
  ```
259
- See also: [PubKeyHex](./wallet.md#type-pubkeyhex)
269
+ See also: [PubKeyHex](#type-pubkeyhex)
260
270
 
261
271
  #### Property fields
262
272
 
@@ -265,7 +275,7 @@ All the fields present in the certificate, with field names as keys and encrypte
265
275
  ```ts
266
276
  fields: Record<CertificateFieldNameUnder50Bytes, Base64String>
267
277
  ```
268
- See also: [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes)
278
+ See also: [Base64String](#type-base64string), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes)
269
279
 
270
280
  #### Property revocationOutpoint
271
281
 
@@ -274,7 +284,7 @@ The outpoint used to confirm that the certificate has not been revoked (TXID.Out
274
284
  ```ts
275
285
  revocationOutpoint: OutpointString
276
286
  ```
277
- See also: [OutpointString](./wallet.md#type-outpointstring)
287
+ See also: [OutpointString](#type-outpointstring)
278
288
 
279
289
  #### Property serialNumber
280
290
 
@@ -283,7 +293,7 @@ Unique serial number of the certificate, base64 encoded string, 32 bytes.
283
293
  ```ts
284
294
  serialNumber: Base64String
285
295
  ```
286
- See also: [Base64String](./wallet.md#type-base64string)
296
+ See also: [Base64String](#type-base64string)
287
297
 
288
298
  #### Property signature
289
299
 
@@ -292,7 +302,7 @@ Certificate signature by the certifier's private key, DER encoded hex string.
292
302
  ```ts
293
303
  signature?: HexString
294
304
  ```
295
- See also: [HexString](./wallet.md#type-hexstring)
305
+ See also: [HexString](#type-hexstring)
296
306
 
297
307
  #### Property subject
298
308
 
@@ -301,7 +311,7 @@ The public key belonging to the certificate's subject, compressed public key hex
301
311
  ```ts
302
312
  subject: PubKeyHex
303
313
  ```
304
- See also: [PubKeyHex](./wallet.md#type-pubkeyhex)
314
+ See also: [PubKeyHex](#type-pubkeyhex)
305
315
 
306
316
  #### Property type
307
317
 
@@ -310,7 +320,7 @@ Type identifier for the certificate, base64 encoded string, 32 bytes.
310
320
  ```ts
311
321
  type: Base64String
312
322
  ```
313
- See also: [Base64String](./wallet.md#type-base64string)
323
+ See also: [Base64String](#type-base64string)
314
324
 
315
325
  #### Method fromBinary
316
326
 
@@ -319,7 +329,7 @@ Deserializes a certificate from binary format.
319
329
  ```ts
320
330
  static fromBinary(bin: number[]): Certificate
321
331
  ```
322
- See also: [Certificate](./auth.md#class-certificate)
332
+ See also: [Certificate](#class-certificate)
323
333
 
324
334
  Returns
325
335
 
@@ -346,7 +356,7 @@ static getCertificateFieldEncryptionDetails(fieldName: string, serialNumber?: st
346
356
  keyID: string;
347
357
  }
348
358
  ```
349
- See also: [WalletProtocol](./wallet.md#type-walletprotocol)
359
+ See also: [WalletProtocol](#type-walletprotocol)
350
360
 
351
361
  Returns
352
362
 
@@ -369,7 +379,7 @@ Signs the certificate using the provided certifier wallet.
369
379
  ```ts
370
380
  async sign(certifierWallet: ProtoWallet): Promise<void>
371
381
  ```
372
- See also: [ProtoWallet](./wallet.md#class-protowallet)
382
+ See also: [ProtoWallet](#class-protowallet)
373
383
 
374
384
  Argument Details
375
385
 
@@ -405,6 +415,8 @@ Returns
405
415
 
406
416
  - A promise that resolves to true if the signature is valid.
407
417
 
418
+ </details>
419
+
408
420
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
409
421
 
410
422
  ---
@@ -439,7 +451,7 @@ export class CompletedProtoWallet extends ProtoWallet implements WalletInterface
439
451
  }
440
452
  ```
441
453
 
442
- See also: [AbortActionResult](./wallet.md#interface-abortactionresult), [AcquireCertificateResult](./wallet.md#type-acquirecertificateresult), [AuthenticatedResult](./wallet.md#interface-authenticatedresult), [CreateActionResult](./wallet.md#interface-createactionresult), [DiscoverCertificatesResult](./wallet.md#interface-discovercertificatesresult), [GetHeaderResult](./wallet.md#interface-getheaderresult), [GetHeightResult](./wallet.md#interface-getheightresult), [GetNetworkResult](./wallet.md#interface-getnetworkresult), [GetPublicKeyArgs](./wallet.md#interface-getpublickeyargs), [GetVersionResult](./wallet.md#interface-getversionresult), [InternalizeActionResult](./wallet.md#interface-internalizeactionresult), [KeyDeriver](./wallet.md#class-keyderiver), [KeyDeriverApi](./wallet.md#interface-keyderiverapi), [ListActionsResult](./wallet.md#interface-listactionsresult), [ListCertificatesResult](./wallet.md#interface-listcertificatesresult), [ListOutputsResult](./wallet.md#interface-listoutputsresult), [PrivateKey](./primitives.md#class-privatekey), [ProtoWallet](./wallet.md#class-protowallet), [ProveCertificateResult](./wallet.md#interface-provecertificateresult), [PubKeyHex](./wallet.md#type-pubkeyhex), [RelinquishCertificateResult](./wallet.md#interface-relinquishcertificateresult), [RelinquishOutputResult](./wallet.md#interface-relinquishoutputresult), [SignActionResult](./wallet.md#interface-signactionresult), [WalletInterface](./wallet.md#interface-walletinterface)
454
+ See also: [AbortActionResult](#interface-abortactionresult), [AcquireCertificateResult](#type-acquirecertificateresult), [AuthenticatedResult](#interface-authenticatedresult), [CreateActionResult](#interface-createactionresult), [DiscoverCertificatesResult](#interface-discovercertificatesresult), [GetHeaderResult](#interface-getheaderresult), [GetHeightResult](#interface-getheightresult), [GetNetworkResult](#interface-getnetworkresult), [GetPublicKeyArgs](#interface-getpublickeyargs), [GetVersionResult](#interface-getversionresult), [InternalizeActionResult](#interface-internalizeactionresult), [KeyDeriver](#class-keyderiver), [KeyDeriverApi](#interface-keyderiverapi), [ListActionsResult](#interface-listactionsresult), [ListCertificatesResult](#interface-listcertificatesresult), [ListOutputsResult](#interface-listoutputsresult), [PrivateKey](#class-privatekey), [ProtoWallet](#class-protowallet), [ProveCertificateResult](#interface-provecertificateresult), [PubKeyHex](#type-pubkeyhex), [RelinquishCertificateResult](#interface-relinquishcertificateresult), [RelinquishOutputResult](#interface-relinquishoutputresult), [SignActionResult](#interface-signactionresult), [WalletInterface](#interface-walletinterface)
443
455
 
444
456
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
445
457
 
@@ -477,7 +489,11 @@ export class MasterCertificate extends Certificate {
477
489
  }
478
490
  ```
479
491
 
480
- See also: [Base64String](./wallet.md#type-base64string), [Certificate](./auth.md#class-certificate), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [HexString](./wallet.md#type-hexstring), [OutpointString](./wallet.md#type-outpointstring), [ProtoWallet](./wallet.md#class-protowallet), [PubKeyHex](./wallet.md#type-pubkeyhex), [WalletCounterparty](./wallet.md#type-walletcounterparty)
492
+ See also: [Base64String](#type-base64string), [Certificate](#class-certificate), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [HexString](#type-hexstring), [OutpointString](#type-outpointstring), [ProtoWallet](#class-protowallet), [PubKeyHex](#type-pubkeyhex), [WalletCounterparty](#type-walletcounterparty)
493
+
494
+ <details>
495
+
496
+ <summary>Class MasterCertificate Details</summary>
481
497
 
482
498
  #### Method createCertificateFields
483
499
 
@@ -488,7 +504,7 @@ and sign off on the fields, along with the encrypted certificate fields.
488
504
  ```ts
489
505
  static async createCertificateFields(creatorWallet: ProtoWallet, certifierOrSubject: WalletCounterparty, fields: Record<CertificateFieldNameUnder50Bytes, string>, privileged?: boolean, privilegedReason?: string): Promise<CreateCertificateFieldsResult>
490
506
  ```
491
- See also: [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [ProtoWallet](./wallet.md#class-protowallet), [WalletCounterparty](./wallet.md#type-walletcounterparty)
507
+ See also: [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [ProtoWallet](#class-protowallet), [WalletCounterparty](#type-walletcounterparty)
492
508
 
493
509
  Returns
494
510
 
@@ -521,7 +537,7 @@ for the verifier to access the designated fields.
521
537
  ```ts
522
538
  static async createKeyringForVerifier(subjectWallet: ProtoWallet, certifier: WalletCounterparty, verifier: WalletCounterparty, fields: Record<CertificateFieldNameUnder50Bytes, Base64String>, fieldsToReveal: string[], masterKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>, serialNumber: Base64String, privileged?: boolean, privilegedReason?: string): Promise<Record<CertificateFieldNameUnder50Bytes, string>>
523
539
  ```
524
- See also: [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [ProtoWallet](./wallet.md#class-protowallet), [WalletCounterparty](./wallet.md#type-walletcounterparty)
540
+ See also: [Base64String](#type-base64string), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [ProtoWallet](#class-protowallet), [WalletCounterparty](#type-walletcounterparty)
525
541
 
526
542
  Returns
527
543
 
@@ -562,7 +578,7 @@ The counterparty used for decryption depends on how the certificate fields were
562
578
  ```ts
563
579
  static async decryptFields(subjectOrCertifierWallet: ProtoWallet, masterKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>, fields: Record<CertificateFieldNameUnder50Bytes, Base64String>, counterparty: WalletCounterparty, privileged?: boolean, privilegedReason?: string): Promise<Record<CertificateFieldNameUnder50Bytes, string>>
564
580
  ```
565
- See also: [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [ProtoWallet](./wallet.md#class-protowallet), [WalletCounterparty](./wallet.md#type-walletcounterparty)
581
+ See also: [Base64String](#type-base64string), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [ProtoWallet](#class-protowallet), [WalletCounterparty](#type-walletcounterparty)
566
582
 
567
583
  Returns
568
584
 
@@ -602,7 +618,7 @@ static async issueCertificateForSubject(certifierWallet: ProtoWallet, subject: W
602
618
  return "Certificate revocation not tracked.";
603
619
  }, serialNumber?: string): Promise<MasterCertificate>
604
620
  ```
605
- See also: [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [MasterCertificate](./auth.md#class-mastercertificate), [ProtoWallet](./wallet.md#class-protowallet), [WalletCounterparty](./wallet.md#type-walletcounterparty)
621
+ See also: [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [MasterCertificate](#class-mastercertificate), [ProtoWallet](#class-protowallet), [WalletCounterparty](#type-walletcounterparty)
606
622
 
607
623
  Returns
608
624
 
@@ -628,6 +644,8 @@ Throws
628
644
 
629
645
  Throws an error if any operation (e.g., encryption, signing) fails during certificate issuance.
630
646
 
647
+ </details>
648
+
631
649
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
632
650
 
633
651
  ---
@@ -657,7 +675,11 @@ export class Peer {
657
675
  }
658
676
  ```
659
677
 
660
- See also: [PeerSession](./auth.md#interface-peersession), [RequestedCertificateSet](./auth.md#interface-requestedcertificateset), [SessionManager](./auth.md#class-sessionmanager), [Transport](./auth.md#interface-transport), [VerifiableCertificate](./auth.md#class-verifiablecertificate), [WalletInterface](./wallet.md#interface-walletinterface)
678
+ See also: [PeerSession](#interface-peersession), [RequestedCertificateSet](#interface-requestedcertificateset), [SessionManager](#class-sessionmanager), [Transport](#interface-transport), [VerifiableCertificate](#class-verifiablecertificate), [WalletInterface](#interface-walletinterface)
679
+
680
+ <details>
681
+
682
+ <summary>Class Peer Details</summary>
661
683
 
662
684
  #### Constructor
663
685
 
@@ -666,7 +688,7 @@ Creates a new Peer instance
666
688
  ```ts
667
689
  constructor(wallet: WalletInterface, transport: Transport, certificatesToRequest?: RequestedCertificateSet, sessionManager?: SessionManager, autoPersistLastSession?: boolean)
668
690
  ```
669
- See also: [RequestedCertificateSet](./auth.md#interface-requestedcertificateset), [SessionManager](./auth.md#class-sessionmanager), [Transport](./auth.md#interface-transport), [WalletInterface](./wallet.md#interface-walletinterface)
691
+ See also: [RequestedCertificateSet](#interface-requestedcertificateset), [SessionManager](#class-sessionmanager), [Transport](#interface-transport), [WalletInterface](#interface-walletinterface)
670
692
 
671
693
  Argument Details
672
694
 
@@ -693,7 +715,7 @@ or the session is not authenticated, initiates a handshake to create or authenti
693
715
  ```ts
694
716
  async getAuthenticatedSession(identityKey?: string, maxWaitTime?: number): Promise<PeerSession>
695
717
  ```
696
- See also: [PeerSession](./auth.md#interface-peersession)
718
+ See also: [PeerSession](#interface-peersession)
697
719
 
698
720
  Returns
699
721
 
@@ -713,7 +735,7 @@ Registers a callback to listen for certificates received from peers.
713
735
  ```ts
714
736
  listenForCertificatesReceived(callback: (senderPublicKey: string, certs: VerifiableCertificate[]) => void): number
715
737
  ```
716
- See also: [VerifiableCertificate](./auth.md#class-verifiablecertificate)
738
+ See also: [VerifiableCertificate](#class-verifiablecertificate)
717
739
 
718
740
  Returns
719
741
 
@@ -731,7 +753,7 @@ Registers a callback to listen for certificates requested from peers.
731
753
  ```ts
732
754
  listenForCertificatesRequested(callback: (senderPublicKey: string, requestedCertificates: RequestedCertificateSet) => void): number
733
755
  ```
734
- See also: [RequestedCertificateSet](./auth.md#interface-requestedcertificateset)
756
+ See also: [RequestedCertificateSet](#interface-requestedcertificateset)
735
757
 
736
758
  Returns
737
759
 
@@ -768,7 +790,7 @@ an initial handshake or message has been exchanged.
768
790
  ```ts
769
791
  async requestCertificates(certificatesToRequest: RequestedCertificateSet, identityKey?: string, maxWaitTime = 10000): Promise<void>
770
792
  ```
771
- See also: [RequestedCertificateSet](./auth.md#interface-requestedcertificateset)
793
+ See also: [RequestedCertificateSet](#interface-requestedcertificateset)
772
794
 
773
795
  Returns
774
796
 
@@ -794,7 +816,7 @@ Sends a certificate response message containing the specified certificates to a
794
816
  ```ts
795
817
  async sendCertificateResponse(verifierIdentityKey: string, certificates: VerifiableCertificate[]): Promise<void>
796
818
  ```
797
- See also: [VerifiableCertificate](./auth.md#class-verifiablecertificate)
819
+ See also: [VerifiableCertificate](#class-verifiablecertificate)
798
820
 
799
821
  Argument Details
800
822
 
@@ -867,6 +889,8 @@ Throws
867
889
 
868
890
  Will throw an error if the message fails to send.
869
891
 
892
+ </details>
893
+
870
894
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
871
895
 
872
896
  ---
@@ -886,7 +910,11 @@ export class SessionManager {
886
910
  }
887
911
  ```
888
912
 
889
- See also: [PeerSession](./auth.md#interface-peersession)
913
+ See also: [PeerSession](#interface-peersession)
914
+
915
+ <details>
916
+
917
+ <summary>Class SessionManager Details</summary>
890
918
 
891
919
  #### Method addSession
892
920
 
@@ -899,7 +927,7 @@ allowing multiple concurrent sessions for the same peer.
899
927
  ```ts
900
928
  addSession(session: PeerSession): void
901
929
  ```
902
- See also: [PeerSession](./auth.md#interface-peersession)
930
+ See also: [PeerSession](#interface-peersession)
903
931
 
904
932
  Argument Details
905
933
 
@@ -919,7 +947,7 @@ authenticated) session associated with that peer, if any.
919
947
  ```ts
920
948
  getSession(identifier: string): PeerSession | undefined
921
949
  ```
922
- See also: [PeerSession](./auth.md#interface-peersession)
950
+ See also: [PeerSession](#interface-peersession)
923
951
 
924
952
  Returns
925
953
 
@@ -954,7 +982,7 @@ Removes a session from the manager by clearing all associated identifiers.
954
982
  ```ts
955
983
  removeSession(session: PeerSession): void
956
984
  ```
957
- See also: [PeerSession](./auth.md#interface-peersession)
985
+ See also: [PeerSession](#interface-peersession)
958
986
 
959
987
  Argument Details
960
988
 
@@ -969,13 +997,15 @@ ensuring we record the latest data (e.g., isAuthenticated, lastUpdate, etc.).
969
997
  ```ts
970
998
  updateSession(session: PeerSession): void
971
999
  ```
972
- See also: [PeerSession](./auth.md#interface-peersession)
1000
+ See also: [PeerSession](#interface-peersession)
973
1001
 
974
1002
  Argument Details
975
1003
 
976
1004
  + **session**
977
1005
  + The peer session to update.
978
1006
 
1007
+ </details>
1008
+
979
1009
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
980
1010
 
981
1011
  ---
@@ -1001,7 +1031,11 @@ export class SimplifiedFetchTransport implements Transport {
1001
1031
  }
1002
1032
  ```
1003
1033
 
1004
- See also: [AuthMessage](./auth.md#interface-authmessage), [Transport](./auth.md#interface-transport)
1034
+ See also: [AuthMessage](#interface-authmessage), [Transport](#interface-transport)
1035
+
1036
+ <details>
1037
+
1038
+ <summary>Class SimplifiedFetchTransport Details</summary>
1005
1039
 
1006
1040
  #### Constructor
1007
1041
 
@@ -1050,7 +1084,7 @@ This must be called before sending any messages to ensure responses can be proce
1050
1084
  ```ts
1051
1085
  async onData(callback: (message: AuthMessage) => Promise<void>): Promise<void>
1052
1086
  ```
1053
- See also: [AuthMessage](./auth.md#interface-authmessage)
1087
+ See also: [AuthMessage](#interface-authmessage)
1054
1088
 
1055
1089
  Returns
1056
1090
 
@@ -1071,7 +1105,7 @@ the message is sent as a POST request to the `/auth` endpoint.
1071
1105
  ```ts
1072
1106
  async send(message: AuthMessage): Promise<void>
1073
1107
  ```
1074
- See also: [AuthMessage](./auth.md#interface-authmessage)
1108
+ See also: [AuthMessage](#interface-authmessage)
1075
1109
 
1076
1110
  Returns
1077
1111
 
@@ -1086,6 +1120,8 @@ Throws
1086
1120
 
1087
1121
  Will throw an error if no listener has been registered via `onData`.
1088
1122
 
1123
+ </details>
1124
+
1089
1125
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1090
1126
 
1091
1127
  ---
@@ -1106,11 +1142,16 @@ export class VerifiableCertificate extends Certificate {
1106
1142
  keyring: Record<CertificateFieldNameUnder50Bytes, string>;
1107
1143
  decryptedFields?: Record<CertificateFieldNameUnder50Bytes, Base64String>;
1108
1144
  constructor(type: Base64String, serialNumber: Base64String, subject: PubKeyHex, certifier: PubKeyHex, revocationOutpoint: OutpointString, fields: Record<CertificateFieldNameUnder50Bytes, string>, keyring: Record<CertificateFieldNameUnder50Bytes, string>, signature?: HexString, decryptedFields?: Record<CertificateFieldNameUnder50Bytes, Base64String>)
1145
+ static fromCertificate(certificate: WalletCertificate, keyring: Record<CertificateFieldNameUnder50Bytes, string>): VerifiableCertificate
1109
1146
  async decryptFields(verifierWallet: ProtoWallet, privileged?: boolean, privilegedReason?: string): Promise<Record<CertificateFieldNameUnder50Bytes, string>>
1110
1147
  }
1111
1148
  ```
1112
1149
 
1113
- See also: [Base64String](./wallet.md#type-base64string), [Certificate](./auth.md#class-certificate), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [HexString](./wallet.md#type-hexstring), [OutpointString](./wallet.md#type-outpointstring), [ProtoWallet](./wallet.md#class-protowallet), [PubKeyHex](./wallet.md#type-pubkeyhex)
1150
+ See also: [Base64String](#type-base64string), [Certificate](#class-certificate), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [HexString](#type-hexstring), [OutpointString](#type-outpointstring), [ProtoWallet](#class-protowallet), [PubKeyHex](#type-pubkeyhex), [WalletCertificate](#interface-walletcertificate)
1151
+
1152
+ <details>
1153
+
1154
+ <summary>Class VerifiableCertificate Details</summary>
1114
1155
 
1115
1156
  #### Method decryptFields
1116
1157
 
@@ -1119,7 +1160,7 @@ Decrypts selectively revealed certificate fields using the provided keyring and
1119
1160
  ```ts
1120
1161
  async decryptFields(verifierWallet: ProtoWallet, privileged?: boolean, privilegedReason?: string): Promise<Record<CertificateFieldNameUnder50Bytes, string>>
1121
1162
  ```
1122
- See also: [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [ProtoWallet](./wallet.md#class-protowallet)
1163
+ See also: [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [ProtoWallet](#class-protowallet)
1123
1164
 
1124
1165
  Returns
1125
1166
 
@@ -1138,6 +1179,27 @@ Throws
1138
1179
 
1139
1180
  Throws an error if any of the decryption operations fail, with a message indicating the failure context.
1140
1181
 
1182
+ #### Method fromCertificate
1183
+
1184
+ ```ts
1185
+ static fromCertificate(certificate: WalletCertificate, keyring: Record<CertificateFieldNameUnder50Bytes, string>): VerifiableCertificate
1186
+ ```
1187
+ See also: [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [VerifiableCertificate](#class-verifiablecertificate), [WalletCertificate](#interface-walletcertificate)
1188
+
1189
+ Returns
1190
+
1191
+ – A fully-formed instance containing the
1192
+ original certificate data plus the supplied keyring.
1193
+
1194
+ Argument Details
1195
+
1196
+ + **certificate**
1197
+ + – The source certificate that was issued and signed by the certifier.
1198
+ + **keyring**
1199
+ + – A allows the verifier to decrypt selected certificate fields.
1200
+
1201
+ </details>
1202
+
1141
1203
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1142
1204
 
1143
1205
  ---
@@ -1160,7 +1222,11 @@ Creates a nonce derived from a wallet
1160
1222
  export async function createNonce(wallet: WalletInterface, counterparty: WalletCounterparty = "self"): Promise<Base64String>
1161
1223
  ```
1162
1224
 
1163
- See also: [Base64String](./wallet.md#type-base64string), [WalletCounterparty](./wallet.md#type-walletcounterparty), [WalletInterface](./wallet.md#interface-walletinterface)
1225
+ See also: [Base64String](#type-base64string), [WalletCounterparty](#type-walletcounterparty), [WalletInterface](#interface-walletinterface)
1226
+
1227
+ <details>
1228
+
1229
+ <summary>Function createNonce Details</summary>
1164
1230
 
1165
1231
  Returns
1166
1232
 
@@ -1171,6 +1237,8 @@ Argument Details
1171
1237
  + **counterparty**
1172
1238
  + The counterparty to the nonce creation. Defaults to 'self'.
1173
1239
 
1240
+ </details>
1241
+
1174
1242
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1175
1243
 
1176
1244
  ---
@@ -1182,7 +1250,11 @@ Verifies a nonce derived from a wallet
1182
1250
  export async function verifyNonce(nonce: Base64String, wallet: WalletInterface, counterparty: WalletCounterparty = "self"): Promise<boolean>
1183
1251
  ```
1184
1252
 
1185
- See also: [Base64String](./wallet.md#type-base64string), [WalletCounterparty](./wallet.md#type-walletcounterparty), [WalletInterface](./wallet.md#interface-walletinterface)
1253
+ See also: [Base64String](#type-base64string), [WalletCounterparty](#type-walletcounterparty), [WalletInterface](#interface-walletinterface)
1254
+
1255
+ <details>
1256
+
1257
+ <summary>Function verifyNonce Details</summary>
1186
1258
 
1187
1259
  Returns
1188
1260
 
@@ -1195,6 +1267,8 @@ Argument Details
1195
1267
  + **counterparty**
1196
1268
  + The counterparty to the nonce creation. Defaults to 'self'.
1197
1269
 
1270
+ </details>
1271
+
1198
1272
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1199
1273
 
1200
1274
  ---
@@ -1232,7 +1306,7 @@ getVerifiableCertificates = async (wallet: WalletInterface, requestedCertificate
1232
1306
  }
1233
1307
  ```
1234
1308
 
1235
- See also: [RequestedCertificateSet](./auth.md#interface-requestedcertificateset), [VerifiableCertificate](./auth.md#class-verifiablecertificate), [WalletInterface](./wallet.md#interface-walletinterface)
1309
+ See also: [RequestedCertificateSet](#interface-requestedcertificateset), [VerifiableCertificate](#class-verifiablecertificate), [WalletInterface](#interface-walletinterface)
1236
1310
 
1237
1311
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1238
1312
 
@@ -1268,7 +1342,7 @@ validateCertificates = async (verifierWallet: WalletInterface, message: AuthMess
1268
1342
  }
1269
1343
  ```
1270
1344
 
1271
- See also: [AuthMessage](./auth.md#interface-authmessage), [Certificate](./auth.md#class-certificate), [RequestedCertificateSet](./auth.md#interface-requestedcertificateset), [VerifiableCertificate](./auth.md#class-verifiablecertificate), [WalletInterface](./wallet.md#interface-walletinterface), [verify](./compat.md#variable-verify)
1345
+ See also: [AuthMessage](#interface-authmessage), [Certificate](#class-certificate), [RequestedCertificateSet](#interface-requestedcertificateset), [VerifiableCertificate](#class-verifiablecertificate), [WalletInterface](#interface-walletinterface), [verify](#variable-verify)
1272
1346
 
1273
1347
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1274
1348