@bsv/sdk 1.6.14 → 1.6.16

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 (68) hide show
  1. package/dist/cjs/package.json +1 -1
  2. package/dist/cjs/src/auth/certificates/__tests/CompletedProtoWallet.js +1 -1
  3. package/dist/cjs/src/auth/certificates/__tests/CompletedProtoWallet.js.map +1 -1
  4. package/dist/cjs/src/primitives/Point.js +123 -6
  5. package/dist/cjs/src/primitives/Point.js.map +1 -1
  6. package/dist/cjs/src/primitives/PrivateKey.js +19 -2
  7. package/dist/cjs/src/primitives/PrivateKey.js.map +1 -1
  8. package/dist/cjs/src/primitives/PublicKey.js +19 -2
  9. package/dist/cjs/src/primitives/PublicKey.js.map +1 -1
  10. package/dist/cjs/src/wallet/CachedKeyDeriver.js +12 -1
  11. package/dist/cjs/src/wallet/CachedKeyDeriver.js.map +1 -1
  12. package/dist/cjs/src/wallet/KeyDeriver.js +8 -5
  13. package/dist/cjs/src/wallet/KeyDeriver.js.map +1 -1
  14. package/dist/cjs/src/wallet/ProtoWallet.js +5 -2
  15. package/dist/cjs/src/wallet/ProtoWallet.js.map +1 -1
  16. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  17. package/dist/esm/src/auth/certificates/__tests/CompletedProtoWallet.js +2 -2
  18. package/dist/esm/src/auth/certificates/__tests/CompletedProtoWallet.js.map +1 -1
  19. package/dist/esm/src/primitives/Point.js +123 -6
  20. package/dist/esm/src/primitives/Point.js.map +1 -1
  21. package/dist/esm/src/primitives/PrivateKey.js +19 -2
  22. package/dist/esm/src/primitives/PrivateKey.js.map +1 -1
  23. package/dist/esm/src/primitives/PublicKey.js +19 -2
  24. package/dist/esm/src/primitives/PublicKey.js.map +1 -1
  25. package/dist/esm/src/wallet/CachedKeyDeriver.js +20 -1
  26. package/dist/esm/src/wallet/CachedKeyDeriver.js.map +1 -1
  27. package/dist/esm/src/wallet/KeyDeriver.js +11 -5
  28. package/dist/esm/src/wallet/KeyDeriver.js.map +1 -1
  29. package/dist/esm/src/wallet/ProtoWallet.js +2 -2
  30. package/dist/esm/src/wallet/ProtoWallet.js.map +1 -1
  31. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  32. package/dist/types/src/auth/certificates/__tests/CompletedProtoWallet.d.ts.map +1 -1
  33. package/dist/types/src/primitives/Point.d.ts.map +1 -1
  34. package/dist/types/src/primitives/PrivateKey.d.ts +3 -1
  35. package/dist/types/src/primitives/PrivateKey.d.ts.map +1 -1
  36. package/dist/types/src/primitives/PublicKey.d.ts +3 -1
  37. package/dist/types/src/primitives/PublicKey.d.ts.map +1 -1
  38. package/dist/types/src/transaction/http/HttpClient.d.ts +2 -0
  39. package/dist/types/src/transaction/http/HttpClient.d.ts.map +1 -1
  40. package/dist/types/src/wallet/CachedKeyDeriver.d.ts +10 -2
  41. package/dist/types/src/wallet/CachedKeyDeriver.d.ts.map +1 -1
  42. package/dist/types/src/wallet/KeyDeriver.d.ts +5 -2
  43. package/dist/types/src/wallet/KeyDeriver.d.ts.map +1 -1
  44. package/dist/types/src/wallet/ProtoWallet.d.ts.map +1 -1
  45. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  46. package/dist/umd/bundle.js +1 -1
  47. package/docs/reference/auth.md +159 -212
  48. package/docs/reference/compat.md +96 -120
  49. package/docs/reference/identity.md +12 -21
  50. package/docs/reference/kvstore.md +19 -21
  51. package/docs/reference/messages.md +0 -3
  52. package/docs/reference/overlay-tools.md +18 -46
  53. package/docs/reference/primitives.md +404 -577
  54. package/docs/reference/registry.md +20 -43
  55. package/docs/reference/script.md +105 -140
  56. package/docs/reference/storage.md +12 -32
  57. package/docs/reference/totp.md +11 -16
  58. package/docs/reference/transaction.md +129 -201
  59. package/docs/reference/wallet.md +89 -247
  60. package/package.json +1 -1
  61. package/src/auth/certificates/__tests/CompletedProtoWallet.ts +3 -2
  62. package/src/primitives/Point.ts +152 -5
  63. package/src/primitives/PrivateKey.ts +22 -2
  64. package/src/primitives/PublicKey.ts +22 -2
  65. package/src/transaction/http/HttpClient.ts +2 -0
  66. package/src/wallet/CachedKeyDeriver.ts +32 -8
  67. package/src/wallet/KeyDeriver.ts +22 -6
  68. package/src/wallet/ProtoWallet.ts +3 -2
@@ -30,7 +30,6 @@ export interface DownloadResult {
30
30
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
31
31
 
32
32
  ---
33
-
34
33
  ### Interface: DownloaderConfig
35
34
 
36
35
  ```ts
@@ -42,7 +41,6 @@ export interface DownloaderConfig {
42
41
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
43
42
 
44
43
  ---
45
-
46
44
  ### Interface: FindFileData
47
45
 
48
46
  ```ts
@@ -57,7 +55,6 @@ export interface FindFileData {
57
55
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
58
56
 
59
57
  ---
60
-
61
58
  ### Interface: RenewFileResult
62
59
 
63
60
  ```ts
@@ -72,7 +69,6 @@ export interface RenewFileResult {
72
69
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
73
70
 
74
71
  ---
75
-
76
72
  ### Interface: UploadFileResult
77
73
 
78
74
  ```ts
@@ -85,7 +81,6 @@ export interface UploadFileResult {
85
81
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
86
82
 
87
83
  ---
88
-
89
84
  ### Interface: UploadableFile
90
85
 
91
86
  ```ts
@@ -98,7 +93,6 @@ export interface UploadableFile {
98
93
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
99
94
 
100
95
  ---
101
-
102
96
  ### Interface: UploaderConfig
103
97
 
104
98
  ```ts
@@ -113,7 +107,6 @@ See also: [WalletInterface](./wallet.md#interface-walletinterface)
113
107
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
114
108
 
115
109
  ---
116
-
117
110
  ## Classes
118
111
 
119
112
  | |
@@ -144,7 +137,6 @@ Downloads the content from the UHRP URL after validating the hash for integrity.
144
137
  ```ts
145
138
  public async download(uhrpUrl: string): Promise<DownloadResult>
146
139
  ```
147
-
148
140
  See also: [DownloadResult](./storage.md#interface-downloadresult)
149
141
 
150
142
  Returns
@@ -153,8 +145,8 @@ A promise that resolves to the downloaded content.
153
145
 
154
146
  Argument Details
155
147
 
156
- - **uhrpUrl**
157
- - The UHRP URL to download.
148
+ + **uhrpUrl**
149
+ + The UHRP URL to download.
158
150
 
159
151
  #### Method resolve
160
152
 
@@ -170,17 +162,15 @@ A promise that resolves to an array of HTTP URLs.
170
162
 
171
163
  Argument Details
172
164
 
173
- - **uhrpUrl**
174
- - The UHRP URL to resolve.
165
+ + **uhrpUrl**
166
+ + The UHRP URL to resolve.
175
167
 
176
168
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
177
169
 
178
170
  ---
179
-
180
171
  ### Class: StorageUploader
181
172
 
182
173
  The StorageUploader class provides client-side methods for:
183
-
184
174
  - Uploading files with a specified retention period
185
175
  - Finding file metadata by UHRP URL
186
176
  - Listing all user uploads
@@ -208,13 +198,12 @@ Creates a new StorageUploader instance.
208
198
  ```ts
209
199
  constructor(config: UploaderConfig)
210
200
  ```
211
-
212
201
  See also: [UploaderConfig](./storage.md#interface-uploaderconfig)
213
202
 
214
203
  Argument Details
215
204
 
216
- - **config**
217
- - An object containing the storage server's URL and a wallet interface
205
+ + **config**
206
+ + An object containing the storage server's URL and a wallet interface
218
207
 
219
208
  #### Method findFile
220
209
 
@@ -223,7 +212,6 @@ Retrieves metadata for a file matching the given UHRP URL from the `/find` route
223
212
  ```ts
224
213
  public async findFile(uhrpUrl: string): Promise<FindFileData>
225
214
  ```
226
-
227
215
  See also: [FindFileData](./storage.md#interface-findfiledata)
228
216
 
229
217
  Returns
@@ -232,8 +220,8 @@ An object with file name, size, MIME type, and expiry time
232
220
 
233
221
  Argument Details
234
222
 
235
- - **uhrpUrl**
236
- - The UHRP URL, e.g. "uhrp://abcd..."
223
+ + **uhrpUrl**
224
+ + The UHRP URL, e.g. "uhrp://abcd..."
237
225
 
238
226
  Throws
239
227
 
@@ -260,7 +248,6 @@ If the server or the route returns an error
260
248
  Publishes a file to the storage server with the specified retention period.
261
249
 
262
250
  This will:
263
-
264
251
  1. Request an upload URL from the server.
265
252
  2. Perform an HTTP PUT to upload the file’s raw bytes.
266
253
  3. Return a UHRP URL referencing the file once published.
@@ -271,7 +258,6 @@ public async publishFile(params: {
271
258
  retentionPeriod: number;
272
259
  }): Promise<UploadFileResult>
273
260
  ```
274
-
275
261
  See also: [UploadFileResult](./storage.md#interface-uploadfileresult), [UploadableFile](./storage.md#interface-uploadablefile)
276
262
 
277
263
  Returns
@@ -291,7 +277,6 @@ and re-mint the advertisement token on-chain.
291
277
  ```ts
292
278
  public async renewFile(uhrpUrl: string, additionalMinutes: number): Promise<RenewFileResult>
293
279
  ```
294
-
295
280
  See also: [RenewFileResult](./storage.md#interface-renewfileresult)
296
281
 
297
282
  Returns
@@ -300,10 +285,10 @@ An object with the new and previous expiry times, plus any cost
300
285
 
301
286
  Argument Details
302
287
 
303
- - **uhrpUrl**
304
- - The UHRP URL of the file (e.g., "uhrp://abcd1234...")
305
- - **additionalMinutes**
306
- - The number of minutes to extend
288
+ + **uhrpUrl**
289
+ + The UHRP URL of the file (e.g., "uhrp://abcd1234...")
290
+ + **additionalMinutes**
291
+ + The number of minutes to extend
307
292
 
308
293
  Throws
309
294
 
@@ -312,7 +297,6 @@ If the request fails or the server returns an error
312
297
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
313
298
 
314
299
  ---
315
-
316
300
  ## Functions
317
301
 
318
302
  ## Types
@@ -354,7 +338,6 @@ See also: [fromBase58Check](./primitives.md#variable-frombase58check), [normaliz
354
338
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
355
339
 
356
340
  ---
357
-
358
341
  ### Variable: getURLForFile
359
342
 
360
343
  ```ts
@@ -369,7 +352,6 @@ See also: [getURLForHash](./storage.md#variable-geturlforhash), [sha256](./primi
369
352
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
370
353
 
371
354
  ---
372
-
373
355
  ### Variable: getURLForHash
374
356
 
375
357
  ```ts
@@ -386,7 +368,6 @@ See also: [toArray](./primitives.md#variable-toarray), [toBase58Check](./primiti
386
368
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
387
369
 
388
370
  ---
389
-
390
371
  ### Variable: isValidURL
391
372
 
392
373
  ```ts
@@ -406,7 +387,6 @@ See also: [getHashFromURL](./storage.md#variable-gethashfromurl)
406
387
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
407
388
 
408
389
  ---
409
-
410
390
  ### Variable: normalizeURL
411
391
 
412
392
  ```ts
@@ -22,7 +22,6 @@ See also: [TOTPAlgorithm](./totp.md#type-totpalgorithm)
22
22
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
23
23
 
24
24
  ---
25
-
26
25
  ## Classes
27
26
 
28
27
  ### Class: TOTP
@@ -43,7 +42,6 @@ Generates a Time-based One-Time Password (TOTP).
43
42
  ```ts
44
43
  static generate(secret: number[], options?: TOTPOptions): string
45
44
  ```
46
-
47
45
  See also: [TOTPOptions](./totp.md#interface-totpoptions)
48
46
 
49
47
  Returns
@@ -52,10 +50,10 @@ The generated TOTP.
52
50
 
53
51
  Argument Details
54
52
 
55
- - **secret**
56
- - The secret key for TOTP.
57
- - **options**
58
- - Optional parameters for TOTP.
53
+ + **secret**
54
+ + The secret key for TOTP.
55
+ + **options**
56
+ + Optional parameters for TOTP.
59
57
 
60
58
  #### Method validate
61
59
 
@@ -64,7 +62,6 @@ Validates a Time-based One-Time Password (TOTP).
64
62
  ```ts
65
63
  static validate(secret: number[], passcode: string, options?: TOTPValidateOptions): boolean
66
64
  ```
67
-
68
65
  See also: [TOTPValidateOptions](./totp.md#type-totpvalidateoptions)
69
66
 
70
67
  Returns
@@ -73,17 +70,16 @@ A boolean indicating whether the passcode is valid.
73
70
 
74
71
  Argument Details
75
72
 
76
- - **secret**
77
- - The secret key for TOTP.
78
- - **passcode**
79
- - The passcode to validate.
80
- - **options**
81
- - Optional parameters for TOTP validation.
73
+ + **secret**
74
+ + The secret key for TOTP.
75
+ + **passcode**
76
+ + The passcode to validate.
77
+ + **options**
78
+ + Optional parameters for TOTP validation.
82
79
 
83
80
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
84
81
 
85
82
  ---
86
-
87
83
  ## Functions
88
84
 
89
85
  ## Types
@@ -106,7 +102,6 @@ export type TOTPAlgorithm = "SHA-1" | "SHA-256" | "SHA-512"
106
102
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
107
103
 
108
104
  ---
109
-
110
105
  ### Type: TOTPValidateOptions
111
106
 
112
107
  Options for TOTP validation.
@@ -122,5 +117,5 @@ See also: [TOTPOptions](./totp.md#interface-totpoptions)
122
117
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
123
118
 
124
119
  ---
125
-
126
120
  ## Variables
121
+