@bsv/sdk 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/src/primitives/Random.js +78 -19
- package/dist/cjs/src/primitives/Random.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/primitives/Random.js +78 -19
- package/dist/esm/src/primitives/Random.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/primitives/Random.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +3 -3
- package/dist/umd/bundle.js.map +1 -1
- package/docs/reference/compat.md +27 -15
- package/docs/reference/identity.md +16 -12
- package/docs/reference/kvstore.md +25 -7
- package/docs/reference/messages.md +8 -0
- package/docs/reference/overlay-tools.md +22 -15
- package/docs/reference/primitives.md +168 -168
- package/docs/reference/registry.md +19 -9
- package/docs/reference/script.md +32 -31
- package/docs/reference/storage.md +14 -10
- package/docs/reference/totp.md +5 -5
- package/docs/reference/transaction.md +70 -67
- package/docs/reference/wallet.md +135 -131
- package/package.json +1 -1
- package/src/primitives/Random.ts +86 -17
- package/src/primitives/__tests/Random.test.ts +21 -0
|
@@ -36,6 +36,8 @@ export interface BasketDefinitionData {
|
|
|
36
36
|
}
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
See also: [PubKeyHex](./wallet.md#type-pubkeyhex)
|
|
40
|
+
|
|
39
41
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
40
42
|
|
|
41
43
|
---
|
|
@@ -74,7 +76,7 @@ export interface CertificateDefinitionData {
|
|
|
74
76
|
}
|
|
75
77
|
```
|
|
76
78
|
|
|
77
|
-
See also: [CertificateFieldDescriptor](#interface-certificatefielddescriptor)
|
|
79
|
+
See also: [CertificateFieldDescriptor](./registry.md#interface-certificatefielddescriptor), [PubKeyHex](./wallet.md#type-pubkeyhex)
|
|
78
80
|
|
|
79
81
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
80
82
|
|
|
@@ -129,6 +131,8 @@ export interface ProtocolDefinitionData {
|
|
|
129
131
|
}
|
|
130
132
|
```
|
|
131
133
|
|
|
134
|
+
See also: [PubKeyHex](./wallet.md#type-pubkeyhex), [WalletProtocol](./wallet.md#type-walletprotocol)
|
|
135
|
+
|
|
132
136
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
133
137
|
|
|
134
138
|
---
|
|
@@ -147,6 +151,8 @@ export interface ProtocolQuery {
|
|
|
147
151
|
}
|
|
148
152
|
```
|
|
149
153
|
|
|
154
|
+
See also: [WalletProtocol](./wallet.md#type-walletprotocol)
|
|
155
|
+
|
|
150
156
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
151
157
|
|
|
152
158
|
---
|
|
@@ -162,7 +168,7 @@ export interface RegistryQueryMapping {
|
|
|
162
168
|
}
|
|
163
169
|
```
|
|
164
170
|
|
|
165
|
-
See also: [BasketQuery](#interface-basketquery), [CertificateQuery](#interface-certificatequery), [ProtocolQuery](#interface-protocolquery)
|
|
171
|
+
See also: [BasketQuery](./registry.md#interface-basketquery), [CertificateQuery](./registry.md#interface-certificatequery), [ProtocolQuery](./registry.md#interface-protocolquery)
|
|
166
172
|
|
|
167
173
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
168
174
|
|
|
@@ -181,6 +187,8 @@ export interface TokenData {
|
|
|
181
187
|
}
|
|
182
188
|
```
|
|
183
189
|
|
|
190
|
+
See also: [BEEF](./wallet.md#type-beef)
|
|
191
|
+
|
|
184
192
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
185
193
|
|
|
186
194
|
---
|
|
@@ -212,7 +220,7 @@ export class RegistryClient {
|
|
|
212
220
|
}
|
|
213
221
|
```
|
|
214
222
|
|
|
215
|
-
See also: [DefinitionData](#type-definitiondata), [DefinitionType](#type-definitiontype), [RegistryQueryMapping](#interface-registryquerymapping), [RegistryRecord](#type-registryrecord)
|
|
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)
|
|
216
224
|
|
|
217
225
|
#### Method listOwnRegistryEntries
|
|
218
226
|
|
|
@@ -223,7 +231,7 @@ Returns parsed registry records including transaction details such as txid, outp
|
|
|
223
231
|
```ts
|
|
224
232
|
async listOwnRegistryEntries(definitionType: DefinitionType): Promise<RegistryRecord[]>
|
|
225
233
|
```
|
|
226
|
-
See also: [DefinitionType](#type-definitiontype), [RegistryRecord](#type-registryrecord)
|
|
234
|
+
See also: [DefinitionType](./registry.md#type-definitiontype), [RegistryRecord](./registry.md#type-registryrecord)
|
|
227
235
|
|
|
228
236
|
Returns
|
|
229
237
|
|
|
@@ -245,7 +253,7 @@ to establish canonical references for basket IDs, protocol specs, or certificate
|
|
|
245
253
|
```ts
|
|
246
254
|
async registerDefinition(data: DefinitionData): Promise<BroadcastResponse | BroadcastFailure>
|
|
247
255
|
```
|
|
248
|
-
See also: [DefinitionData](#type-definitiondata)
|
|
256
|
+
See also: [BroadcastFailure](./transaction.md#interface-broadcastfailure), [BroadcastResponse](./transaction.md#interface-broadcastresponse), [DefinitionData](./registry.md#type-definitiondata)
|
|
249
257
|
|
|
250
258
|
Returns
|
|
251
259
|
|
|
@@ -271,7 +279,7 @@ The query object shape depends on the registry type:
|
|
|
271
279
|
```ts
|
|
272
280
|
async resolve<T extends DefinitionType>(definitionType: T, query: RegistryQueryMapping[T]): Promise<DefinitionData[]>
|
|
273
281
|
```
|
|
274
|
-
See also: [DefinitionData](#type-definitiondata), [DefinitionType](#type-definitiontype), [RegistryQueryMapping](#interface-registryquerymapping)
|
|
282
|
+
See also: [DefinitionData](./registry.md#type-definitiondata), [DefinitionType](./registry.md#type-definitiontype), [RegistryQueryMapping](./registry.md#interface-registryquerymapping)
|
|
275
283
|
|
|
276
284
|
Returns
|
|
277
285
|
|
|
@@ -291,7 +299,7 @@ Revokes a registry record by spending its associated UTXO.
|
|
|
291
299
|
```ts
|
|
292
300
|
async revokeOwnRegistryEntry(registryRecord: RegistryRecord): Promise<BroadcastResponse | BroadcastFailure>
|
|
293
301
|
```
|
|
294
|
-
See also: [RegistryRecord](#type-registryrecord)
|
|
302
|
+
See also: [BroadcastFailure](./transaction.md#interface-broadcastfailure), [BroadcastResponse](./transaction.md#interface-broadcastresponse), [RegistryRecord](./registry.md#type-registryrecord)
|
|
295
303
|
|
|
296
304
|
Returns
|
|
297
305
|
|
|
@@ -313,6 +321,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
313
321
|
export function deserializeWalletProtocol(str: string): WalletProtocol
|
|
314
322
|
```
|
|
315
323
|
|
|
324
|
+
See also: [WalletProtocol](./wallet.md#type-walletprotocol)
|
|
325
|
+
|
|
316
326
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
317
327
|
|
|
318
328
|
---
|
|
@@ -336,7 +346,7 @@ Union of all possible definition data objects.
|
|
|
336
346
|
export type DefinitionData = BasketDefinitionData | ProtocolDefinitionData | CertificateDefinitionData
|
|
337
347
|
```
|
|
338
348
|
|
|
339
|
-
See also: [BasketDefinitionData](#interface-basketdefinitiondata), [CertificateDefinitionData](#interface-certificatedefinitiondata), [ProtocolDefinitionData](#interface-protocoldefinitiondata)
|
|
349
|
+
See also: [BasketDefinitionData](./registry.md#interface-basketdefinitiondata), [CertificateDefinitionData](./registry.md#interface-certificatedefinitiondata), [ProtocolDefinitionData](./registry.md#interface-protocoldefinitiondata)
|
|
340
350
|
|
|
341
351
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
342
352
|
|
|
@@ -362,7 +372,7 @@ plus the on-chain token data for the UTXO holding it.
|
|
|
362
372
|
export type RegistryRecord = DefinitionData & TokenData
|
|
363
373
|
```
|
|
364
374
|
|
|
365
|
-
See also: [DefinitionData](#type-definitiondata), [TokenData](#interface-tokendata)
|
|
375
|
+
See also: [DefinitionData](./registry.md#type-definitiondata), [TokenData](./registry.md#interface-tokendata)
|
|
366
376
|
|
|
367
377
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
368
378
|
|
package/docs/reference/script.md
CHANGED
|
@@ -37,7 +37,7 @@ export default interface ScriptTemplate {
|
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
See also: [LockingScript](#class-lockingscript), [ScriptTemplateUnlock](#interface-scripttemplateunlock)
|
|
40
|
+
See also: [LockingScript](./script.md#class-lockingscript), [ScriptTemplateUnlock](./script.md#interface-scripttemplateunlock)
|
|
41
41
|
|
|
42
42
|
#### Property lock
|
|
43
43
|
|
|
@@ -46,7 +46,7 @@ Creates a locking script with the given parameters.
|
|
|
46
46
|
```ts
|
|
47
47
|
lock: (...params: any[]) => LockingScript | Promise<LockingScript>
|
|
48
48
|
```
|
|
49
|
-
See also: [LockingScript](#class-lockingscript)
|
|
49
|
+
See also: [LockingScript](./script.md#class-lockingscript)
|
|
50
50
|
|
|
51
51
|
#### Property unlock
|
|
52
52
|
|
|
@@ -59,7 +59,7 @@ This method returns an object containing two functions:
|
|
|
59
59
|
```ts
|
|
60
60
|
unlock: (...params: any[]) => ScriptTemplateUnlock
|
|
61
61
|
```
|
|
62
|
-
See also: [ScriptTemplateUnlock](#interface-scripttemplateunlock)
|
|
62
|
+
See also: [ScriptTemplateUnlock](./script.md#interface-scripttemplateunlock)
|
|
63
63
|
|
|
64
64
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
65
65
|
|
|
@@ -73,7 +73,7 @@ export default interface ScriptTemplateUnlock {
|
|
|
73
73
|
}
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
See also: [UnlockingScript](#class-unlockingscript)
|
|
76
|
+
See also: [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [sign](./compat.md#variable-sign)
|
|
77
77
|
|
|
78
78
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
79
79
|
|
|
@@ -109,7 +109,7 @@ export default class LockingScript extends Script {
|
|
|
109
109
|
}
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
See also: [Script](#class-script)
|
|
112
|
+
See also: [Script](./script.md#class-script)
|
|
113
113
|
|
|
114
114
|
#### Method isLockingScript
|
|
115
115
|
|
|
@@ -150,7 +150,7 @@ export default class P2PKH implements ScriptTemplate {
|
|
|
150
150
|
}
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
See also: [LockingScript](#class-lockingscript), [Script](#class-script), [ScriptTemplate](#interface-scripttemplate), [UnlockingScript](#class-unlockingscript)
|
|
153
|
+
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)
|
|
154
154
|
|
|
155
155
|
#### Method lock
|
|
156
156
|
|
|
@@ -159,7 +159,7 @@ Creates a P2PKH locking script for a given public key hash or address string
|
|
|
159
159
|
```ts
|
|
160
160
|
lock(pubkeyhash: string | number[]): LockingScript
|
|
161
161
|
```
|
|
162
|
-
See also: [LockingScript](#class-lockingscript)
|
|
162
|
+
See also: [LockingScript](./script.md#class-lockingscript)
|
|
163
163
|
|
|
164
164
|
Returns
|
|
165
165
|
|
|
@@ -185,7 +185,7 @@ unlock(privateKey: PrivateKey, signOutputs: "all" | "none" | "single" = "all", a
|
|
|
185
185
|
estimateLength: () => Promise<108>;
|
|
186
186
|
}
|
|
187
187
|
```
|
|
188
|
-
See also: [Script](#class-script), [UnlockingScript](#class-unlockingscript)
|
|
188
|
+
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)
|
|
189
189
|
|
|
190
190
|
Returns
|
|
191
191
|
|
|
@@ -226,7 +226,7 @@ export default class PushDrop implements ScriptTemplate {
|
|
|
226
226
|
}
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
-
See also: [LockingScript](#class-lockingscript), [ScriptTemplate](#interface-scripttemplate), [UnlockingScript](#class-unlockingscript)
|
|
229
|
+
See also: [LockingScript](./script.md#class-lockingscript), [PublicKey](./primitives.md#class-publickey), [ScriptTemplate](./script.md#interface-scripttemplate), [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [WalletInterface](./wallet.md#interface-walletinterface), [WalletProtocol](./wallet.md#type-walletprotocol), [sign](./compat.md#variable-sign)
|
|
230
230
|
|
|
231
231
|
#### Constructor
|
|
232
232
|
|
|
@@ -235,6 +235,7 @@ Constructs a new instance of the PushDrop class.
|
|
|
235
235
|
```ts
|
|
236
236
|
constructor(wallet: WalletInterface, originator?: string)
|
|
237
237
|
```
|
|
238
|
+
See also: [WalletInterface](./wallet.md#interface-walletinterface)
|
|
238
239
|
|
|
239
240
|
Argument Details
|
|
240
241
|
|
|
@@ -254,7 +255,7 @@ static decode(script: LockingScript): {
|
|
|
254
255
|
fields: number[][];
|
|
255
256
|
}
|
|
256
257
|
```
|
|
257
|
-
See also: [LockingScript](#class-lockingscript)
|
|
258
|
+
See also: [LockingScript](./script.md#class-lockingscript), [PublicKey](./primitives.md#class-publickey)
|
|
258
259
|
|
|
259
260
|
Returns
|
|
260
261
|
|
|
@@ -272,7 +273,7 @@ Creates a PushDrop locking script with arbitrary data fields and a public key lo
|
|
|
272
273
|
```ts
|
|
273
274
|
async lock(fields: number[][], protocolID: WalletProtocol, keyID: string, counterparty: string, forSelf = false, includeSignature = true, lockPosition: "before" | "after" = "before"): Promise<LockingScript>
|
|
274
275
|
```
|
|
275
|
-
See also: [LockingScript](#class-lockingscript)
|
|
276
|
+
See also: [LockingScript](./script.md#class-lockingscript), [WalletProtocol](./wallet.md#type-walletprotocol)
|
|
276
277
|
|
|
277
278
|
Returns
|
|
278
279
|
|
|
@@ -303,7 +304,7 @@ unlock(protocolID: WalletProtocol, keyID: string, counterparty: string, signOutp
|
|
|
303
304
|
estimateLength: () => Promise<73>;
|
|
304
305
|
}
|
|
305
306
|
```
|
|
306
|
-
See also: [LockingScript](#class-lockingscript), [UnlockingScript](#class-unlockingscript)
|
|
307
|
+
See also: [LockingScript](./script.md#class-lockingscript), [Transaction](./transaction.md#class-transaction), [UnlockingScript](./script.md#class-unlockingscript), [WalletProtocol](./wallet.md#type-walletprotocol), [sign](./compat.md#variable-sign)
|
|
307
308
|
|
|
308
309
|
Returns
|
|
309
310
|
|
|
@@ -349,7 +350,7 @@ export default class RPuzzle implements ScriptTemplate {
|
|
|
349
350
|
}
|
|
350
351
|
```
|
|
351
352
|
|
|
352
|
-
See also: [LockingScript](#class-lockingscript), [ScriptTemplate](#interface-scripttemplate), [UnlockingScript](#class-unlockingscript)
|
|
353
|
+
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)
|
|
353
354
|
|
|
354
355
|
#### Constructor
|
|
355
356
|
|
|
@@ -369,7 +370,7 @@ Creates an R puzzle locking script for a given R value or R value hash.
|
|
|
369
370
|
```ts
|
|
370
371
|
lock(value: number[]): LockingScript
|
|
371
372
|
```
|
|
372
|
-
See also: [LockingScript](#class-lockingscript)
|
|
373
|
+
See also: [LockingScript](./script.md#class-lockingscript)
|
|
373
374
|
|
|
374
375
|
Returns
|
|
375
376
|
|
|
@@ -395,7 +396,7 @@ unlock(k: BigNumber, privateKey: PrivateKey, signOutputs: "all" | "none" | "sing
|
|
|
395
396
|
estimateLength: () => Promise<108>;
|
|
396
397
|
}
|
|
397
398
|
```
|
|
398
|
-
See also: [UnlockingScript](#class-unlockingscript)
|
|
399
|
+
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)
|
|
399
400
|
|
|
400
401
|
Returns
|
|
401
402
|
|
|
@@ -445,14 +446,14 @@ export default class Script {
|
|
|
445
446
|
}
|
|
446
447
|
```
|
|
447
448
|
|
|
448
|
-
See also: [ScriptChunk](#interface-scriptchunk)
|
|
449
|
+
See also: [BigNumber](./primitives.md#class-bignumber), [ScriptChunk](./script.md#interface-scriptchunk), [toHex](./primitives.md#variable-tohex)
|
|
449
450
|
|
|
450
451
|
#### Constructor
|
|
451
452
|
|
|
452
453
|
```ts
|
|
453
454
|
constructor(chunks: ScriptChunk[] = [])
|
|
454
455
|
```
|
|
455
|
-
See also: [ScriptChunk](#interface-scriptchunk)
|
|
456
|
+
See also: [ScriptChunk](./script.md#interface-scriptchunk)
|
|
456
457
|
|
|
457
458
|
Argument Details
|
|
458
459
|
|
|
@@ -466,7 +467,7 @@ Deletes the given item wherever it appears in the current script.
|
|
|
466
467
|
```ts
|
|
467
468
|
findAndDelete(script: Script): Script
|
|
468
469
|
```
|
|
469
|
-
See also: [Script](#class-script)
|
|
470
|
+
See also: [Script](./script.md#class-script)
|
|
470
471
|
|
|
471
472
|
Returns
|
|
472
473
|
|
|
@@ -482,7 +483,7 @@ Argument Details
|
|
|
482
483
|
```ts
|
|
483
484
|
static fromASM(asm: string): Script
|
|
484
485
|
```
|
|
485
|
-
See also: [Script](#class-script)
|
|
486
|
+
See also: [Script](./script.md#class-script)
|
|
486
487
|
|
|
487
488
|
Returns
|
|
488
489
|
|
|
@@ -504,7 +505,7 @@ const script = Script.fromASM("OP_DUP OP_HASH160 abcd... OP_EQUALVERIFY OP_CHECK
|
|
|
504
505
|
```ts
|
|
505
506
|
static fromBinary(bin: number[]): Script
|
|
506
507
|
```
|
|
507
|
-
See also: [Script](#class-script)
|
|
508
|
+
See also: [Script](./script.md#class-script)
|
|
508
509
|
|
|
509
510
|
Returns
|
|
510
511
|
|
|
@@ -526,7 +527,7 @@ const script = Script.fromBinary([0x76, 0xa9, ...])
|
|
|
526
527
|
```ts
|
|
527
528
|
static fromHex(hex: string): Script
|
|
528
529
|
```
|
|
529
|
-
See also: [Script](#class-script)
|
|
530
|
+
See also: [Script](./script.md#class-script)
|
|
530
531
|
|
|
531
532
|
Returns
|
|
532
533
|
|
|
@@ -578,7 +579,7 @@ True if the script is an unlocking script, otherwise false.
|
|
|
578
579
|
```ts
|
|
579
580
|
removeCodeseparators(): Script
|
|
580
581
|
```
|
|
581
|
-
See also: [Script](#class-script)
|
|
582
|
+
See also: [Script](./script.md#class-script)
|
|
582
583
|
|
|
583
584
|
Returns
|
|
584
585
|
|
|
@@ -589,7 +590,7 @@ This script instance for chaining.
|
|
|
589
590
|
```ts
|
|
590
591
|
setChunkOpCode(i: number, op: number): Script
|
|
591
592
|
```
|
|
592
|
-
See also: [Script](#class-script)
|
|
593
|
+
See also: [Script](./script.md#class-script)
|
|
593
594
|
|
|
594
595
|
Returns
|
|
595
596
|
|
|
@@ -637,7 +638,7 @@ The script in hexadecimal format.
|
|
|
637
638
|
```ts
|
|
638
639
|
writeBin(bin: number[]): Script
|
|
639
640
|
```
|
|
640
|
-
See also: [Script](#class-script)
|
|
641
|
+
See also: [Script](./script.md#class-script)
|
|
641
642
|
|
|
642
643
|
Returns
|
|
643
644
|
|
|
@@ -657,7 +658,7 @@ Throws an error if the data is too large to be pushed.
|
|
|
657
658
|
```ts
|
|
658
659
|
writeBn(bn: BigNumber): Script
|
|
659
660
|
```
|
|
660
|
-
See also: [Script](#class-script)
|
|
661
|
+
See also: [BigNumber](./primitives.md#class-bignumber), [Script](./script.md#class-script)
|
|
661
662
|
|
|
662
663
|
Returns
|
|
663
664
|
|
|
@@ -673,7 +674,7 @@ Argument Details
|
|
|
673
674
|
```ts
|
|
674
675
|
writeNumber(num: number): Script
|
|
675
676
|
```
|
|
676
|
-
See also: [Script](#class-script)
|
|
677
|
+
See also: [Script](./script.md#class-script)
|
|
677
678
|
|
|
678
679
|
Returns
|
|
679
680
|
|
|
@@ -689,7 +690,7 @@ Argument Details
|
|
|
689
690
|
```ts
|
|
690
691
|
writeOpCode(op: number): Script
|
|
691
692
|
```
|
|
692
|
-
See also: [Script](#class-script)
|
|
693
|
+
See also: [Script](./script.md#class-script)
|
|
693
694
|
|
|
694
695
|
Returns
|
|
695
696
|
|
|
@@ -705,7 +706,7 @@ Argument Details
|
|
|
705
706
|
```ts
|
|
706
707
|
writeScript(script: Script): Script
|
|
707
708
|
```
|
|
708
|
-
See also: [Script](#class-script)
|
|
709
|
+
See also: [Script](./script.md#class-script)
|
|
709
710
|
|
|
710
711
|
Returns
|
|
711
712
|
|
|
@@ -798,7 +799,7 @@ export default class Spend {
|
|
|
798
799
|
}
|
|
799
800
|
```
|
|
800
801
|
|
|
801
|
-
See also: [LockingScript](#class-lockingscript), [UnlockingScript](#class-unlockingscript)
|
|
802
|
+
See also: [LockingScript](./script.md#class-lockingscript), [TransactionInput](./transaction.md#interface-transactioninput), [TransactionOutput](./transaction.md#interface-transactionoutput), [UnlockingScript](./script.md#class-unlockingscript)
|
|
802
803
|
|
|
803
804
|
#### Constructor
|
|
804
805
|
|
|
@@ -818,7 +819,7 @@ constructor(params: {
|
|
|
818
819
|
memoryLimit?: number;
|
|
819
820
|
})
|
|
820
821
|
```
|
|
821
|
-
See also: [LockingScript](#class-lockingscript), [UnlockingScript](#class-unlockingscript)
|
|
822
|
+
See also: [LockingScript](./script.md#class-lockingscript), [TransactionInput](./transaction.md#interface-transactioninput), [TransactionOutput](./transaction.md#interface-transactionoutput), [UnlockingScript](./script.md#class-unlockingscript)
|
|
822
823
|
|
|
823
824
|
Argument Details
|
|
824
825
|
|
|
@@ -902,7 +903,7 @@ export default class UnlockingScript extends Script {
|
|
|
902
903
|
}
|
|
903
904
|
```
|
|
904
905
|
|
|
905
|
-
See also: [Script](#class-script)
|
|
906
|
+
See also: [Script](./script.md#class-script)
|
|
906
907
|
|
|
907
908
|
#### Method isLockingScript
|
|
908
909
|
|
|
@@ -102,6 +102,8 @@ export interface UploaderConfig {
|
|
|
102
102
|
}
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
+
See also: [WalletInterface](./wallet.md#interface-walletinterface)
|
|
106
|
+
|
|
105
107
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
106
108
|
|
|
107
109
|
---
|
|
@@ -126,7 +128,7 @@ export class StorageDownloader {
|
|
|
126
128
|
}
|
|
127
129
|
```
|
|
128
130
|
|
|
129
|
-
See also: [DownloadResult](#interface-downloadresult), [DownloaderConfig](#interface-downloaderconfig)
|
|
131
|
+
See also: [DownloadResult](./storage.md#interface-downloadresult), [DownloaderConfig](./storage.md#interface-downloaderconfig)
|
|
130
132
|
|
|
131
133
|
#### Method download
|
|
132
134
|
|
|
@@ -135,7 +137,7 @@ Downloads the content from the UHRP URL after validating the hash for integrity.
|
|
|
135
137
|
```ts
|
|
136
138
|
public async download(uhrpUrl: string): Promise<DownloadResult>
|
|
137
139
|
```
|
|
138
|
-
See also: [DownloadResult](#interface-downloadresult)
|
|
140
|
+
See also: [DownloadResult](./storage.md#interface-downloadresult)
|
|
139
141
|
|
|
140
142
|
Returns
|
|
141
143
|
|
|
@@ -187,7 +189,7 @@ export class StorageUploader {
|
|
|
187
189
|
}
|
|
188
190
|
```
|
|
189
191
|
|
|
190
|
-
See also: [FindFileData](#interface-findfiledata), [RenewFileResult](#interface-renewfileresult), [UploadFileResult](#interface-uploadfileresult), [UploadableFile](#interface-uploadablefile), [UploaderConfig](#interface-uploaderconfig)
|
|
192
|
+
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)
|
|
191
193
|
|
|
192
194
|
#### Constructor
|
|
193
195
|
|
|
@@ -196,7 +198,7 @@ Creates a new StorageUploader instance.
|
|
|
196
198
|
```ts
|
|
197
199
|
constructor(config: UploaderConfig)
|
|
198
200
|
```
|
|
199
|
-
See also: [UploaderConfig](#interface-uploaderconfig)
|
|
201
|
+
See also: [UploaderConfig](./storage.md#interface-uploaderconfig)
|
|
200
202
|
|
|
201
203
|
Argument Details
|
|
202
204
|
|
|
@@ -210,7 +212,7 @@ Retrieves metadata for a file matching the given UHRP URL from the `/find` route
|
|
|
210
212
|
```ts
|
|
211
213
|
public async findFile(uhrpUrl: string): Promise<FindFileData>
|
|
212
214
|
```
|
|
213
|
-
See also: [FindFileData](#interface-findfiledata)
|
|
215
|
+
See also: [FindFileData](./storage.md#interface-findfiledata)
|
|
214
216
|
|
|
215
217
|
Returns
|
|
216
218
|
|
|
@@ -256,7 +258,7 @@ public async publishFile(params: {
|
|
|
256
258
|
retentionPeriod: number;
|
|
257
259
|
}): Promise<UploadFileResult>
|
|
258
260
|
```
|
|
259
|
-
See also: [UploadFileResult](#interface-uploadfileresult), [UploadableFile](#interface-uploadablefile)
|
|
261
|
+
See also: [UploadFileResult](./storage.md#interface-uploadfileresult), [UploadableFile](./storage.md#interface-uploadablefile)
|
|
260
262
|
|
|
261
263
|
Returns
|
|
262
264
|
|
|
@@ -275,7 +277,7 @@ and re-mint the advertisement token on-chain.
|
|
|
275
277
|
```ts
|
|
276
278
|
public async renewFile(uhrpUrl: string, additionalMinutes: number): Promise<RenewFileResult>
|
|
277
279
|
```
|
|
278
|
-
See also: [RenewFileResult](#interface-renewfileresult)
|
|
280
|
+
See also: [RenewFileResult](./storage.md#interface-renewfileresult)
|
|
279
281
|
|
|
280
282
|
Returns
|
|
281
283
|
|
|
@@ -331,7 +333,7 @@ getHashFromURL = (URL: string): number[] => {
|
|
|
331
333
|
}
|
|
332
334
|
```
|
|
333
335
|
|
|
334
|
-
See also: [normalizeURL](#variable-normalizeurl)
|
|
336
|
+
See also: [fromBase58Check](./primitives.md#variable-frombase58check), [normalizeURL](./storage.md#variable-normalizeurl), [toHex](./primitives.md#variable-tohex)
|
|
335
337
|
|
|
336
338
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
337
339
|
|
|
@@ -352,7 +354,7 @@ getURLForFile = (file: Uint8Array | number[]): string => {
|
|
|
352
354
|
}
|
|
353
355
|
```
|
|
354
356
|
|
|
355
|
-
See also: [getURLForHash](#variable-geturlforhash)
|
|
357
|
+
See also: [SHA256](./primitives.md#class-sha256), [getURLForHash](./storage.md#variable-geturlforhash)
|
|
356
358
|
|
|
357
359
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
358
360
|
|
|
@@ -368,6 +370,8 @@ getURLForHash = (hash: number[]): string => {
|
|
|
368
370
|
}
|
|
369
371
|
```
|
|
370
372
|
|
|
373
|
+
See also: [toArray](./primitives.md#variable-toarray), [toBase58Check](./primitives.md#variable-tobase58check)
|
|
374
|
+
|
|
371
375
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
372
376
|
|
|
373
377
|
---
|
|
@@ -385,7 +389,7 @@ isValidURL = (URL: string): boolean => {
|
|
|
385
389
|
}
|
|
386
390
|
```
|
|
387
391
|
|
|
388
|
-
See also: [getHashFromURL](#variable-gethashfromurl)
|
|
392
|
+
See also: [getHashFromURL](./storage.md#variable-gethashfromurl)
|
|
389
393
|
|
|
390
394
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
391
395
|
|
package/docs/reference/totp.md
CHANGED
|
@@ -17,7 +17,7 @@ export interface TOTPOptions {
|
|
|
17
17
|
}
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
See also: [TOTPAlgorithm](#type-totpalgorithm)
|
|
20
|
+
See also: [TOTPAlgorithm](./totp.md#type-totpalgorithm)
|
|
21
21
|
|
|
22
22
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
23
23
|
|
|
@@ -33,7 +33,7 @@ export class TOTP {
|
|
|
33
33
|
}
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
See also: [TOTPOptions](#interface-totpoptions), [TOTPValidateOptions](#type-totpvalidateoptions)
|
|
36
|
+
See also: [TOTPOptions](./totp.md#interface-totpoptions), [TOTPValidateOptions](./totp.md#type-totpvalidateoptions)
|
|
37
37
|
|
|
38
38
|
#### Method generate
|
|
39
39
|
|
|
@@ -42,7 +42,7 @@ Generates a Time-based One-Time Password (TOTP).
|
|
|
42
42
|
```ts
|
|
43
43
|
static generate(secret: number[], options?: TOTPOptions): string
|
|
44
44
|
```
|
|
45
|
-
See also: [TOTPOptions](#interface-totpoptions)
|
|
45
|
+
See also: [TOTPOptions](./totp.md#interface-totpoptions)
|
|
46
46
|
|
|
47
47
|
Returns
|
|
48
48
|
|
|
@@ -62,7 +62,7 @@ Validates a Time-based One-Time Password (TOTP).
|
|
|
62
62
|
```ts
|
|
63
63
|
static validate(secret: number[], passcode: string, options?: TOTPValidateOptions): boolean
|
|
64
64
|
```
|
|
65
|
-
See also: [TOTPValidateOptions](#type-totpvalidateoptions)
|
|
65
|
+
See also: [TOTPValidateOptions](./totp.md#type-totpvalidateoptions)
|
|
66
66
|
|
|
67
67
|
Returns
|
|
68
68
|
|
|
@@ -112,7 +112,7 @@ export type TOTPValidateOptions = TOTPOptions & {
|
|
|
112
112
|
}
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
See also: [TOTPOptions](#interface-totpoptions)
|
|
115
|
+
See also: [TOTPOptions](./totp.md#interface-totpoptions)
|
|
116
116
|
|
|
117
117
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
118
118
|
|