@bsv/sdk 1.6.11 → 1.6.14

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