@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/registry.md CHANGED
@@ -36,7 +36,7 @@ export interface BasketDefinitionData {
36
36
  }
37
37
  ```
38
38
 
39
- See also: [PubKeyHex](./wallet.md#type-pubkeyhex)
39
+ See also: [PubKeyHex](#type-pubkeyhex)
40
40
 
41
41
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
42
42
 
@@ -76,7 +76,7 @@ export interface CertificateDefinitionData {
76
76
  }
77
77
  ```
78
78
 
79
- See also: [CertificateFieldDescriptor](./registry.md#interface-certificatefielddescriptor), [PubKeyHex](./wallet.md#type-pubkeyhex)
79
+ See also: [CertificateFieldDescriptor](#interface-certificatefielddescriptor), [PubKeyHex](#type-pubkeyhex)
80
80
 
81
81
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
82
82
 
@@ -131,7 +131,7 @@ export interface ProtocolDefinitionData {
131
131
  }
132
132
  ```
133
133
 
134
- See also: [PubKeyHex](./wallet.md#type-pubkeyhex), [WalletProtocol](./wallet.md#type-walletprotocol)
134
+ See also: [PubKeyHex](#type-pubkeyhex), [WalletProtocol](#type-walletprotocol)
135
135
 
136
136
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
137
137
 
@@ -151,7 +151,7 @@ export interface ProtocolQuery {
151
151
  }
152
152
  ```
153
153
 
154
- See also: [WalletProtocol](./wallet.md#type-walletprotocol)
154
+ See also: [WalletProtocol](#type-walletprotocol)
155
155
 
156
156
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
157
157
 
@@ -168,7 +168,7 @@ export interface RegistryQueryMapping {
168
168
  }
169
169
  ```
170
170
 
171
- See also: [BasketQuery](./registry.md#interface-basketquery), [CertificateQuery](./registry.md#interface-certificatequery), [ProtocolQuery](./registry.md#interface-protocolquery)
171
+ See also: [BasketQuery](#interface-basketquery), [CertificateQuery](#interface-certificatequery), [ProtocolQuery](#interface-protocolquery)
172
172
 
173
173
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
174
174
 
@@ -187,7 +187,7 @@ export interface TokenData {
187
187
  }
188
188
  ```
189
189
 
190
- See also: [BEEF](./wallet.md#type-beef)
190
+ See also: [BEEF](#type-beef)
191
191
 
192
192
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
193
193
 
@@ -220,7 +220,11 @@ export class RegistryClient {
220
220
  }
221
221
  ```
222
222
 
223
- See also: [BroadcastFailure](./transaction.md#interface-broadcastfailure), [BroadcastResponse](./transaction.md#interface-broadcastresponse), [DefinitionData](./registry.md#type-definitiondata), [DefinitionType](./registry.md#type-definitiontype), [RegistryQueryMapping](./registry.md#interface-registryquerymapping), [RegistryRecord](./registry.md#type-registryrecord), [WalletClient](./wallet.md#class-walletclient), [WalletInterface](./wallet.md#interface-walletinterface)
223
+ See also: [BroadcastFailure](#interface-broadcastfailure), [BroadcastResponse](#interface-broadcastresponse), [DefinitionData](#type-definitiondata), [DefinitionType](#type-definitiontype), [RegistryQueryMapping](#interface-registryquerymapping), [RegistryRecord](#type-registryrecord), [WalletClient](#class-walletclient), [WalletInterface](#interface-walletinterface)
224
+
225
+ <details>
226
+
227
+ <summary>Class RegistryClient Details</summary>
224
228
 
225
229
  #### Method listOwnRegistryEntries
226
230
 
@@ -231,7 +235,7 @@ Returns parsed registry records including transaction details such as txid, outp
231
235
  ```ts
232
236
  async listOwnRegistryEntries(definitionType: DefinitionType): Promise<RegistryRecord[]>
233
237
  ```
234
- See also: [DefinitionType](./registry.md#type-definitiontype), [RegistryRecord](./registry.md#type-registryrecord)
238
+ See also: [DefinitionType](#type-definitiontype), [RegistryRecord](#type-registryrecord)
235
239
 
236
240
  Returns
237
241
 
@@ -253,7 +257,7 @@ to establish canonical references for basket IDs, protocol specs, or certificate
253
257
  ```ts
254
258
  async registerDefinition(data: DefinitionData): Promise<BroadcastResponse | BroadcastFailure>
255
259
  ```
256
- See also: [BroadcastFailure](./transaction.md#interface-broadcastfailure), [BroadcastResponse](./transaction.md#interface-broadcastresponse), [DefinitionData](./registry.md#type-definitiondata)
260
+ See also: [BroadcastFailure](#interface-broadcastfailure), [BroadcastResponse](#interface-broadcastresponse), [DefinitionData](#type-definitiondata)
257
261
 
258
262
  Returns
259
263
 
@@ -279,7 +283,7 @@ The query object shape depends on the registry type:
279
283
  ```ts
280
284
  async resolve<T extends DefinitionType>(definitionType: T, query: RegistryQueryMapping[T]): Promise<DefinitionData[]>
281
285
  ```
282
- See also: [DefinitionData](./registry.md#type-definitiondata), [DefinitionType](./registry.md#type-definitiontype), [RegistryQueryMapping](./registry.md#interface-registryquerymapping)
286
+ See also: [DefinitionData](#type-definitiondata), [DefinitionType](#type-definitiontype), [RegistryQueryMapping](#interface-registryquerymapping)
283
287
 
284
288
  Returns
285
289
 
@@ -299,7 +303,7 @@ Revokes a registry record by spending its associated UTXO.
299
303
  ```ts
300
304
  async revokeOwnRegistryEntry(registryRecord: RegistryRecord): Promise<BroadcastResponse | BroadcastFailure>
301
305
  ```
302
- See also: [BroadcastFailure](./transaction.md#interface-broadcastfailure), [BroadcastResponse](./transaction.md#interface-broadcastresponse), [RegistryRecord](./registry.md#type-registryrecord)
306
+ See also: [BroadcastFailure](#interface-broadcastfailure), [BroadcastResponse](#interface-broadcastresponse), [RegistryRecord](#type-registryrecord)
303
307
 
304
308
  Returns
305
309
 
@@ -310,6 +314,8 @@ Argument Details
310
314
  + **registryRecord**
311
315
  + Must have valid txid, outputIndex, and lockingScript.
312
316
 
317
+ </details>
318
+
313
319
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
314
320
 
315
321
  ---
@@ -321,7 +327,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
321
327
  export function deserializeWalletProtocol(str: string): WalletProtocol
322
328
  ```
323
329
 
324
- See also: [WalletProtocol](./wallet.md#type-walletprotocol)
330
+ See also: [WalletProtocol](#type-walletprotocol)
325
331
 
326
332
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
327
333
 
@@ -346,7 +352,7 @@ Union of all possible definition data objects.
346
352
  export type DefinitionData = BasketDefinitionData | ProtocolDefinitionData | CertificateDefinitionData
347
353
  ```
348
354
 
349
- See also: [BasketDefinitionData](./registry.md#interface-basketdefinitiondata), [CertificateDefinitionData](./registry.md#interface-certificatedefinitiondata), [ProtocolDefinitionData](./registry.md#interface-protocoldefinitiondata)
355
+ See also: [BasketDefinitionData](#interface-basketdefinitiondata), [CertificateDefinitionData](#interface-certificatedefinitiondata), [ProtocolDefinitionData](#interface-protocoldefinitiondata)
350
356
 
351
357
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
352
358
 
@@ -372,7 +378,7 @@ plus the on-chain token data for the UTXO holding it.
372
378
  export type RegistryRecord = DefinitionData & TokenData
373
379
  ```
374
380
 
375
- See also: [DefinitionData](./registry.md#type-definitiondata), [TokenData](./registry.md#interface-tokendata)
381
+ See also: [DefinitionData](#type-definitiondata), [TokenData](#interface-tokendata)
376
382
 
377
383
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
378
384
 
package/docs/script.md CHANGED
@@ -37,7 +37,11 @@ export default interface ScriptTemplate {
37
37
  }
38
38
  ```
39
39
 
40
- See also: [LockingScript](./script.md#class-lockingscript), [ScriptTemplateUnlock](./script.md#interface-scripttemplateunlock)
40
+ See also: [LockingScript](#class-lockingscript), [ScriptTemplateUnlock](#interface-scripttemplateunlock)
41
+
42
+ <details>
43
+
44
+ <summary>Interface ScriptTemplate Details</summary>
41
45
 
42
46
  #### Property lock
43
47
 
@@ -46,7 +50,7 @@ Creates a locking script with the given parameters.
46
50
  ```ts
47
51
  lock: (...params: any[]) => LockingScript | Promise<LockingScript>
48
52
  ```
49
- See also: [LockingScript](./script.md#class-lockingscript)
53
+ See also: [LockingScript](#class-lockingscript)
50
54
 
51
55
  #### Property unlock
52
56
 
@@ -59,7 +63,9 @@ This method returns an object containing two functions:
59
63
  ```ts
60
64
  unlock: (...params: any[]) => ScriptTemplateUnlock
61
65
  ```
62
- See also: [ScriptTemplateUnlock](./script.md#interface-scripttemplateunlock)
66
+ See also: [ScriptTemplateUnlock](#interface-scripttemplateunlock)
67
+
68
+ </details>
63
69
 
64
70
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
65
71
 
@@ -73,7 +79,7 @@ export default interface ScriptTemplateUnlock {
73
79
  }
74
80
  ```
75
81
 
76
- See also: [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [sign](./compat.md#variable-sign)
82
+ See also: [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [sign](#variable-sign)
77
83
 
78
84
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
79
85
 
@@ -108,7 +114,11 @@ export default class LockingScript extends Script {
108
114
  }
109
115
  ```
110
116
 
111
- See also: [Script](./script.md#class-script)
117
+ See also: [Script](#class-script)
118
+
119
+ <details>
120
+
121
+ <summary>Class LockingScript Details</summary>
112
122
 
113
123
  #### Method isLockingScript
114
124
 
@@ -130,6 +140,8 @@ Returns
130
140
 
131
141
  Always returns false for a LockingScript instance.
132
142
 
143
+ </details>
144
+
133
145
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
134
146
 
135
147
  ---
@@ -149,7 +161,11 @@ export default class P2PKH implements ScriptTemplate {
149
161
  }
150
162
  ```
151
163
 
152
- See also: [LockingScript](./script.md#class-lockingscript), [PrivateKey](./primitives.md#class-privatekey), [Script](./script.md#class-script), [ScriptTemplate](./script.md#interface-scripttemplate), [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [sign](./compat.md#variable-sign)
164
+ See also: [LockingScript](#class-lockingscript), [PrivateKey](#class-privatekey), [Script](#class-script), [ScriptTemplate](#interface-scripttemplate), [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [sign](#variable-sign)
165
+
166
+ <details>
167
+
168
+ <summary>Class P2PKH Details</summary>
153
169
 
154
170
  #### Method lock
155
171
 
@@ -158,7 +174,7 @@ Creates a P2PKH locking script for a given public key hash or address string
158
174
  ```ts
159
175
  lock(pubkeyhash: string | number[]): LockingScript
160
176
  ```
161
- See also: [LockingScript](./script.md#class-lockingscript)
177
+ See also: [LockingScript](#class-lockingscript)
162
178
 
163
179
  Returns
164
180
 
@@ -184,7 +200,7 @@ unlock(privateKey: PrivateKey, signOutputs: "all" | "none" | "single" = "all", a
184
200
  estimateLength: () => Promise<108>;
185
201
  }
186
202
  ```
187
- See also: [PrivateKey](./primitives.md#class-privatekey), [Script](./script.md#class-script), [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [sign](./compat.md#variable-sign)
203
+ See also: [PrivateKey](#class-privatekey), [Script](#class-script), [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [sign](#variable-sign)
188
204
 
189
205
  Returns
190
206
 
@@ -203,6 +219,8 @@ Argument Details
203
219
  + **lockingScript**
204
220
  + Optional. The lockinScript. Otherwise the input.sourceTransaction is required.
205
221
 
222
+ </details>
223
+
206
224
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
207
225
 
208
226
  ---
@@ -231,7 +249,11 @@ export default class PushDrop implements ScriptTemplate {
231
249
  }
232
250
  ```
233
251
 
234
- See also: [LockingScript](./script.md#class-lockingscript), [PublicKey](./primitives.md#class-publickey), [ScriptTemplate](./script.md#interface-scripttemplate), [SecurityLevel](./wallet.md#type-securitylevel), [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [WalletInterface](./wallet.md#interface-walletinterface), [sign](./compat.md#variable-sign)
252
+ See also: [LockingScript](#class-lockingscript), [PublicKey](#class-publickey), [ScriptTemplate](#interface-scripttemplate), [SecurityLevel](#type-securitylevel), [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [WalletInterface](#interface-walletinterface), [sign](#variable-sign)
253
+
254
+ <details>
255
+
256
+ <summary>Class PushDrop Details</summary>
235
257
 
236
258
  #### Constructor
237
259
 
@@ -240,7 +262,7 @@ Constructs a new instance of the PushDrop class.
240
262
  ```ts
241
263
  constructor(wallet: WalletInterface, originator?: string)
242
264
  ```
243
- See also: [WalletInterface](./wallet.md#interface-walletinterface)
265
+ See also: [WalletInterface](#interface-walletinterface)
244
266
 
245
267
  Argument Details
246
268
 
@@ -260,7 +282,7 @@ static decode(script: LockingScript): {
260
282
  fields: number[][];
261
283
  }
262
284
  ```
263
- See also: [LockingScript](./script.md#class-lockingscript), [PublicKey](./primitives.md#class-publickey)
285
+ See also: [LockingScript](#class-lockingscript), [PublicKey](#class-publickey)
264
286
 
265
287
  Returns
266
288
 
@@ -281,7 +303,7 @@ async lock(fields: number[][], protocolID: [
281
303
  string
282
304
  ], keyID: string, counterparty: string, forSelf = false, includeSignature = true, lockPosition: "before" | "after" = "before"): Promise<LockingScript>
283
305
  ```
284
- See also: [LockingScript](./script.md#class-lockingscript), [SecurityLevel](./wallet.md#type-securitylevel)
306
+ See also: [LockingScript](#class-lockingscript), [SecurityLevel](#type-securitylevel)
285
307
 
286
308
  Returns
287
309
 
@@ -315,7 +337,7 @@ unlock(protocolID: [
315
337
  estimateLength: () => Promise<73>;
316
338
  }
317
339
  ```
318
- See also: [LockingScript](./script.md#class-lockingscript), [SecurityLevel](./wallet.md#type-securitylevel), [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [sign](./compat.md#variable-sign)
340
+ See also: [LockingScript](#class-lockingscript), [SecurityLevel](#type-securitylevel), [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [sign](#variable-sign)
319
341
 
320
342
  Returns
321
343
 
@@ -340,6 +362,8 @@ Argument Details
340
362
  + **anyoneCanPay**
341
363
  + Specifies if the anyone-can-pay flag is set.
342
364
 
365
+ </details>
366
+
343
367
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
344
368
 
345
369
  ---
@@ -361,7 +385,11 @@ export default class RPuzzle implements ScriptTemplate {
361
385
  }
362
386
  ```
363
387
 
364
- See also: [BigNumber](./primitives.md#class-bignumber), [LockingScript](./script.md#class-lockingscript), [PrivateKey](./primitives.md#class-privatekey), [ScriptTemplate](./script.md#interface-scripttemplate), [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [sign](./compat.md#variable-sign)
388
+ See also: [BigNumber](#class-bignumber), [LockingScript](#class-lockingscript), [PrivateKey](#class-privatekey), [ScriptTemplate](#interface-scripttemplate), [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [sign](#variable-sign)
389
+
390
+ <details>
391
+
392
+ <summary>Class RPuzzle Details</summary>
365
393
 
366
394
  #### Constructor
367
395
 
@@ -381,7 +409,7 @@ Creates an R puzzle locking script for a given R value or R value hash.
381
409
  ```ts
382
410
  lock(value: number[]): LockingScript
383
411
  ```
384
- See also: [LockingScript](./script.md#class-lockingscript)
412
+ See also: [LockingScript](#class-lockingscript)
385
413
 
386
414
  Returns
387
415
 
@@ -407,7 +435,7 @@ unlock(k: BigNumber, privateKey: PrivateKey, signOutputs: "all" | "none" | "sing
407
435
  estimateLength: () => Promise<108>;
408
436
  }
409
437
  ```
410
- See also: [BigNumber](./primitives.md#class-bignumber), [PrivateKey](./primitives.md#class-privatekey), [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [sign](./compat.md#variable-sign)
438
+ See also: [BigNumber](#class-bignumber), [PrivateKey](#class-privatekey), [Transaction](#class-transaction), [UnlockingScript](#class-unlockingscript), [sign](#variable-sign)
411
439
 
412
440
  Returns
413
441
 
@@ -424,6 +452,8 @@ Argument Details
424
452
  + **anyoneCanPay**
425
453
  + Flag indicating if the signature allows for other inputs to be added later.
426
454
 
455
+ </details>
456
+
427
457
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
428
458
 
429
459
  ---
@@ -457,14 +487,18 @@ export default class Script {
457
487
  }
458
488
  ```
459
489
 
460
- See also: [BigNumber](./primitives.md#class-bignumber), [ScriptChunk](./script.md#interface-scriptchunk), [toHex](./primitives.md#variable-tohex)
490
+ See also: [BigNumber](#class-bignumber), [ScriptChunk](#interface-scriptchunk), [toHex](#variable-tohex)
491
+
492
+ <details>
493
+
494
+ <summary>Class Script Details</summary>
461
495
 
462
496
  #### Constructor
463
497
 
464
498
  ```ts
465
499
  constructor(chunks: ScriptChunk[] = [])
466
500
  ```
467
- See also: [ScriptChunk](./script.md#interface-scriptchunk)
501
+ See also: [ScriptChunk](#interface-scriptchunk)
468
502
 
469
503
  Argument Details
470
504
 
@@ -478,7 +512,7 @@ Deletes the given item wherever it appears in the current script.
478
512
  ```ts
479
513
  findAndDelete(script: Script): Script
480
514
  ```
481
- See also: [Script](./script.md#class-script)
515
+ See also: [Script](#class-script)
482
516
 
483
517
  Returns
484
518
 
@@ -494,7 +528,7 @@ Argument Details
494
528
  ```ts
495
529
  static fromASM(asm: string): Script
496
530
  ```
497
- See also: [Script](./script.md#class-script)
531
+ See also: [Script](#class-script)
498
532
 
499
533
  Returns
500
534
 
@@ -516,7 +550,7 @@ const script = Script.fromASM("OP_DUP OP_HASH160 abcd... OP_EQUALVERIFY OP_CHECK
516
550
  ```ts
517
551
  static fromBinary(bin: number[]): Script
518
552
  ```
519
- See also: [Script](./script.md#class-script)
553
+ See also: [Script](#class-script)
520
554
 
521
555
  Returns
522
556
 
@@ -538,7 +572,7 @@ const script = Script.fromBinary([0x76, 0xa9, ...])
538
572
  ```ts
539
573
  static fromHex(hex: string): Script
540
574
  ```
541
- See also: [Script](./script.md#class-script)
575
+ See also: [Script](#class-script)
542
576
 
543
577
  Returns
544
578
 
@@ -590,7 +624,7 @@ True if the script is an unlocking script, otherwise false.
590
624
  ```ts
591
625
  removeCodeseparators(): Script
592
626
  ```
593
- See also: [Script](./script.md#class-script)
627
+ See also: [Script](#class-script)
594
628
 
595
629
  Returns
596
630
 
@@ -601,7 +635,7 @@ This script instance for chaining.
601
635
  ```ts
602
636
  setChunkOpCode(i: number, op: number): Script
603
637
  ```
604
- See also: [Script](./script.md#class-script)
638
+ See also: [Script](#class-script)
605
639
 
606
640
  Returns
607
641
 
@@ -649,7 +683,7 @@ The script in hexadecimal format.
649
683
  ```ts
650
684
  writeBin(bin: number[]): Script
651
685
  ```
652
- See also: [Script](./script.md#class-script)
686
+ See also: [Script](#class-script)
653
687
 
654
688
  Returns
655
689
 
@@ -669,7 +703,7 @@ Throws an error if the data is too large to be pushed.
669
703
  ```ts
670
704
  writeBn(bn: BigNumber): Script
671
705
  ```
672
- See also: [BigNumber](./primitives.md#class-bignumber), [Script](./script.md#class-script)
706
+ See also: [BigNumber](#class-bignumber), [Script](#class-script)
673
707
 
674
708
  Returns
675
709
 
@@ -685,7 +719,7 @@ Argument Details
685
719
  ```ts
686
720
  writeNumber(num: number): Script
687
721
  ```
688
- See also: [Script](./script.md#class-script)
722
+ See also: [Script](#class-script)
689
723
 
690
724
  Returns
691
725
 
@@ -701,7 +735,7 @@ Argument Details
701
735
  ```ts
702
736
  writeOpCode(op: number): Script
703
737
  ```
704
- See also: [Script](./script.md#class-script)
738
+ See also: [Script](#class-script)
705
739
 
706
740
  Returns
707
741
 
@@ -717,7 +751,7 @@ Argument Details
717
751
  ```ts
718
752
  writeScript(script: Script): Script
719
753
  ```
720
- See also: [Script](./script.md#class-script)
754
+ See also: [Script](#class-script)
721
755
 
722
756
  Returns
723
757
 
@@ -728,6 +762,8 @@ Argument Details
728
762
  + **script**
729
763
  + The script to append.
730
764
 
765
+ </details>
766
+
731
767
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
732
768
 
733
769
  ---
@@ -756,6 +792,9 @@ export default class Spend {
756
792
  stack: number[][];
757
793
  altStack: number[][];
758
794
  ifStack: boolean[];
795
+ memoryLimit: number;
796
+ stackMem: number;
797
+ altStackMem: number;
759
798
  constructor(params: {
760
799
  sourceTXID: string;
761
800
  sourceOutputIndex: number;
@@ -768,14 +807,19 @@ export default class Spend {
768
807
  inputSequence: number;
769
808
  inputIndex: number;
770
809
  lockTime: number;
810
+ memoryLimit?: number;
771
811
  })
772
812
  reset(): void
773
- step(): void
813
+ step(): boolean
774
814
  validate(): boolean
775
815
  }
776
816
  ```
777
817
 
778
- See also: [LockingScript](./script.md#class-lockingscript), [TransactionInput](./transaction.md#interface-transactioninput), [TransactionOutput](./transaction.md#interface-transactionoutput), [UnlockingScript](./script.md#class-unlockingscript)
818
+ See also: [LockingScript](#class-lockingscript), [TransactionInput](#interface-transactioninput), [TransactionOutput](#interface-transactionoutput), [UnlockingScript](#class-unlockingscript)
819
+
820
+ <details>
821
+
822
+ <summary>Class Spend Details</summary>
779
823
 
780
824
  #### Constructor
781
825
 
@@ -792,9 +836,10 @@ constructor(params: {
792
836
  inputSequence: number;
793
837
  inputIndex: number;
794
838
  lockTime: number;
839
+ memoryLimit?: number;
795
840
  })
796
841
  ```
797
- See also: [LockingScript](./script.md#class-lockingscript), [TransactionInput](./transaction.md#interface-transactioninput), [TransactionOutput](./transaction.md#interface-transactionoutput), [UnlockingScript](./script.md#class-unlockingscript)
842
+ See also: [LockingScript](#class-lockingscript), [TransactionInput](#interface-transactioninput), [TransactionOutput](#interface-transactionoutput), [UnlockingScript](#class-unlockingscript)
798
843
 
799
844
  Argument Details
800
845
 
@@ -837,6 +882,7 @@ const spend = new Spend({
837
882
  inputIndex: 0, // inputIndex
838
883
  unlockingScript: UnlockingScript.fromASM("3045... 02ab..."),
839
884
  inputSequence: 0xffffffff // inputSequence
885
+ memoryLimit: 100000 // memoryLimit
840
886
  });
841
887
  ```
842
888
 
@@ -860,6 +906,8 @@ if (spend.validate()) {
860
906
  }
861
907
  ```
862
908
 
909
+ </details>
910
+
863
911
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
864
912
 
865
913
  ---
@@ -877,7 +925,11 @@ export default class UnlockingScript extends Script {
877
925
  }
878
926
  ```
879
927
 
880
- See also: [Script](./script.md#class-script)
928
+ See also: [Script](#class-script)
929
+
930
+ <details>
931
+
932
+ <summary>Class UnlockingScript Details</summary>
881
933
 
882
934
  #### Method isLockingScript
883
935
 
@@ -899,6 +951,8 @@ Returns
899
951
 
900
952
  Always returns true for an UnlockingScript instance.
901
953
 
954
+ </details>
955
+
902
956
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
903
957
 
904
958
  ---
package/docs/storage.md CHANGED
@@ -102,7 +102,7 @@ export interface UploaderConfig {
102
102
  }
103
103
  ```
104
104
 
105
- See also: [WalletInterface](./wallet.md#interface-walletinterface)
105
+ See also: [WalletInterface](#interface-walletinterface)
106
106
 
107
107
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
108
108
 
@@ -130,7 +130,7 @@ export class StorageDownloader {
130
130
  }
131
131
  ```
132
132
 
133
- See also: [DownloadResult](./storage.md#interface-downloadresult), [DownloaderConfig](./storage.md#interface-downloaderconfig)
133
+ See also: [DownloadResult](#interface-downloadresult), [DownloaderConfig](#interface-downloaderconfig)
134
134
 
135
135
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
136
136
 
@@ -156,7 +156,11 @@ export class StorageUploader {
156
156
  }
157
157
  ```
158
158
 
159
- See also: [FindFileData](./storage.md#interface-findfiledata), [RenewFileResult](./storage.md#interface-renewfileresult), [UploadFileResult](./storage.md#interface-uploadfileresult), [UploadableFile](./storage.md#interface-uploadablefile), [UploaderConfig](./storage.md#interface-uploaderconfig)
159
+ See also: [FindFileData](#interface-findfiledata), [RenewFileResult](#interface-renewfileresult), [UploadFileResult](#interface-uploadfileresult), [UploadableFile](#interface-uploadablefile), [UploaderConfig](#interface-uploaderconfig)
160
+
161
+ <details>
162
+
163
+ <summary>Class StorageUploader Details</summary>
160
164
 
161
165
  #### Constructor
162
166
 
@@ -165,7 +169,7 @@ Creates a new StorageUploader instance.
165
169
  ```ts
166
170
  constructor(config: UploaderConfig)
167
171
  ```
168
- See also: [UploaderConfig](./storage.md#interface-uploaderconfig)
172
+ See also: [UploaderConfig](#interface-uploaderconfig)
169
173
 
170
174
  Argument Details
171
175
 
@@ -179,7 +183,7 @@ Retrieves metadata for a file matching the given UHRP URL from the `/find` route
179
183
  ```ts
180
184
  public async findFile(uhrpUrl: string): Promise<FindFileData>
181
185
  ```
182
- See also: [FindFileData](./storage.md#interface-findfiledata)
186
+ See also: [FindFileData](#interface-findfiledata)
183
187
 
184
188
  Returns
185
189
 
@@ -225,7 +229,7 @@ public async publishFile(params: {
225
229
  retentionPeriod: number;
226
230
  }): Promise<UploadFileResult>
227
231
  ```
228
- See also: [UploadFileResult](./storage.md#interface-uploadfileresult), [UploadableFile](./storage.md#interface-uploadablefile)
232
+ See also: [UploadFileResult](#interface-uploadfileresult), [UploadableFile](#interface-uploadablefile)
229
233
 
230
234
  Returns
231
235
 
@@ -244,7 +248,7 @@ and re-mint the advertisement token on-chain.
244
248
  ```ts
245
249
  public async renewFile(uhrpUrl: string, additionalMinutes: number): Promise<RenewFileResult>
246
250
  ```
247
- See also: [RenewFileResult](./storage.md#interface-renewfileresult)
251
+ See also: [RenewFileResult](#interface-renewfileresult)
248
252
 
249
253
  Returns
250
254
 
@@ -261,6 +265,8 @@ Throws
261
265
 
262
266
  If the request fails or the server returns an error
263
267
 
268
+ </details>
269
+
264
270
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
265
271
 
266
272
  ---
@@ -300,7 +306,7 @@ getHashFromURL = (URL: string): number[] => {
300
306
  }
301
307
  ```
302
308
 
303
- See also: [fromBase58Check](./primitives.md#variable-frombase58check), [normalizeURL](./storage.md#variable-normalizeurl), [toHex](./primitives.md#variable-tohex)
309
+ See also: [fromBase58Check](#variable-frombase58check), [normalizeURL](#variable-normalizeurl), [toHex](#variable-tohex)
304
310
 
305
311
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
306
312
 
@@ -314,7 +320,7 @@ getURLForFile = (file: number[]): string => {
314
320
  }
315
321
  ```
316
322
 
317
- See also: [getURLForHash](./storage.md#variable-geturlforhash), [sha256](./primitives.md#variable-sha256)
323
+ See also: [getURLForHash](#variable-geturlforhash), [sha256](#variable-sha256)
318
324
 
319
325
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
320
326
 
@@ -330,7 +336,7 @@ getURLForHash = (hash: number[]): string => {
330
336
  }
331
337
  ```
332
338
 
333
- See also: [toArray](./primitives.md#variable-toarray), [toBase58Check](./primitives.md#variable-tobase58check)
339
+ See also: [toArray](#variable-toarray), [toBase58Check](#variable-tobase58check)
334
340
 
335
341
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
336
342
 
@@ -349,7 +355,7 @@ isValidURL = (URL: string): boolean => {
349
355
  }
350
356
  ```
351
357
 
352
- See also: [getHashFromURL](./storage.md#variable-gethashfromurl)
358
+ See also: [getHashFromURL](#variable-gethashfromurl)
353
359
 
354
360
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
355
361