@bsv/sdk 1.3.3 → 1.3.5
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/auth/certificates/Certificate.js.map +1 -1
- package/dist/cjs/src/auth/certificates/MasterCertificate.js.map +1 -1
- package/dist/cjs/src/auth/utils/certificateHelpers.js +2 -2
- package/dist/cjs/src/auth/utils/certificateHelpers.js.map +1 -1
- package/dist/cjs/src/wallet/CachedKeyDeriver.js +11 -14
- package/dist/cjs/src/wallet/CachedKeyDeriver.js.map +1 -1
- package/dist/cjs/src/wallet/KeyDeriver.js +14 -11
- package/dist/cjs/src/wallet/KeyDeriver.js.map +1 -1
- package/dist/cjs/src/wallet/ProtoWallet.js +53 -111
- package/dist/cjs/src/wallet/ProtoWallet.js.map +1 -1
- package/dist/cjs/src/wallet/WalletClient.js.map +1 -1
- package/dist/cjs/src/wallet/index.js +2 -3
- package/dist/cjs/src/wallet/index.js.map +1 -1
- package/dist/cjs/src/wallet/substrates/WalletWireTransceiver.js +1 -0
- package/dist/cjs/src/wallet/substrates/WalletWireTransceiver.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/auth/certificates/Certificate.js.map +1 -1
- package/dist/esm/src/auth/certificates/MasterCertificate.js.map +1 -1
- package/dist/esm/src/auth/utils/certificateHelpers.js +2 -2
- package/dist/esm/src/auth/utils/certificateHelpers.js.map +1 -1
- package/dist/esm/src/wallet/CachedKeyDeriver.js +10 -10
- package/dist/esm/src/wallet/CachedKeyDeriver.js.map +1 -1
- package/dist/esm/src/wallet/KeyDeriver.js +15 -12
- package/dist/esm/src/wallet/KeyDeriver.js.map +1 -1
- package/dist/esm/src/wallet/ProtoWallet.js +53 -76
- package/dist/esm/src/wallet/ProtoWallet.js.map +1 -1
- package/dist/esm/src/wallet/WalletClient.js.map +1 -1
- package/dist/esm/src/wallet/index.js +1 -1
- package/dist/esm/src/wallet/index.js.map +1 -1
- package/dist/esm/src/wallet/substrates/WalletWireTransceiver.js +1 -0
- package/dist/esm/src/wallet/substrates/WalletWireTransceiver.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/auth/certificates/Certificate.d.ts +2 -2
- package/dist/types/src/auth/certificates/Certificate.d.ts.map +1 -1
- package/dist/types/src/auth/certificates/MasterCertificate.d.ts +2 -2
- package/dist/types/src/auth/certificates/MasterCertificate.d.ts.map +1 -1
- package/dist/types/src/auth/utils/certificateHelpers.d.ts +5 -5
- package/dist/types/src/auth/utils/certificateHelpers.d.ts.map +1 -1
- package/dist/types/src/wallet/CachedKeyDeriver.d.ts +16 -15
- package/dist/types/src/wallet/CachedKeyDeriver.d.ts.map +1 -1
- package/dist/types/src/wallet/KeyDeriver.d.ts +74 -18
- package/dist/types/src/wallet/KeyDeriver.d.ts.map +1 -1
- package/dist/types/src/wallet/ProtoWallet.d.ts +31 -407
- package/dist/types/src/wallet/ProtoWallet.d.ts.map +1 -1
- package/dist/types/src/wallet/Wallet.interfaces.d.ts +201 -169
- package/dist/types/src/wallet/Wallet.interfaces.d.ts.map +1 -1
- package/dist/types/src/wallet/WalletClient.d.ts +2 -3
- package/dist/types/src/wallet/WalletClient.d.ts.map +1 -1
- package/dist/types/src/wallet/index.d.ts +1 -1
- package/dist/types/src/wallet/index.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/HTTPWalletJSON.d.ts +1 -1
- package/dist/types/src/wallet/substrates/HTTPWalletJSON.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/WalletWireTransceiver.d.ts +1 -1
- package/dist/types/src/wallet/substrates/WalletWireTransceiver.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/XDM.d.ts +2 -2
- package/dist/types/src/wallet/substrates/XDM.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/window.CWI.d.ts +2 -2
- package/dist/types/src/wallet/substrates/window.CWI.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/docs/auth.md +12 -12
- package/docs/wallet-substrates.md +6 -6
- package/docs/wallet.md +897 -983
- package/package.json +1 -1
- package/src/auth/certificates/Certificate.ts +1 -1
- package/src/auth/certificates/MasterCertificate.ts +3 -2
- package/src/auth/utils/certificateHelpers.ts +5 -5
- package/src/wallet/CachedKeyDeriver.ts +22 -21
- package/src/wallet/KeyDeriver.ts +89 -22
- package/src/wallet/ProtoWallet.ts +105 -550
- package/src/wallet/Wallet.interfaces.ts +259 -176
- package/src/wallet/WalletClient.ts +2 -1
- package/src/wallet/__tests/ProtoWallet.test.ts +0 -53
- package/src/wallet/index.ts +1 -1
- package/src/wallet/substrates/HTTPWalletJSON.ts +1 -1
- package/src/wallet/substrates/WalletWireTransceiver.ts +2 -1
- package/src/wallet/substrates/XDM.ts +2 -2
- package/src/wallet/substrates/window.CWI.ts +2 -2
package/docs/wallet.md
CHANGED
|
@@ -6,25 +6,31 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6
6
|
|
|
7
7
|
| | | |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| [AbortActionArgs](#interface-abortactionargs) | [
|
|
10
|
-
| [AbortActionResult](#interface-abortactionresult) | [
|
|
11
|
-
| [AcquireCertificateArgs](#interface-acquirecertificateargs) | [
|
|
12
|
-
| [AcquireCertificateResult](#interface-acquirecertificateresult) | [
|
|
13
|
-
| [
|
|
14
|
-
| [
|
|
15
|
-
| [
|
|
16
|
-
| [
|
|
17
|
-
| [
|
|
18
|
-
| [
|
|
19
|
-
| [
|
|
20
|
-
| [
|
|
21
|
-
| [
|
|
22
|
-
| [
|
|
23
|
-
| [
|
|
24
|
-
| [
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
9
|
+
| [AbortActionArgs](#interface-abortactionargs) | [GetVersionResult](#interface-getversionresult) | [SendWithResult](#interface-sendwithresult) |
|
|
10
|
+
| [AbortActionResult](#interface-abortactionresult) | [IdentityCertificate](#interface-identitycertificate) | [SignActionArgs](#interface-signactionargs) |
|
|
11
|
+
| [AcquireCertificateArgs](#interface-acquirecertificateargs) | [IdentityCertifier](#interface-identitycertifier) | [SignActionOptions](#interface-signactionoptions) |
|
|
12
|
+
| [AcquireCertificateResult](#interface-acquirecertificateresult) | [InternalizeActionArgs](#interface-internalizeactionargs) | [SignActionResult](#interface-signactionresult) |
|
|
13
|
+
| [AuthenticatedResult](#interface-authenticatedresult) | [InternalizeActionResult](#interface-internalizeactionresult) | [SignActionSpend](#interface-signactionspend) |
|
|
14
|
+
| [BasketInsertion](#interface-basketinsertion) | [InternalizeOutput](#interface-internalizeoutput) | [SignableTransaction](#interface-signabletransaction) |
|
|
15
|
+
| [CertificateResult](#interface-certificateresult) | [KeyDeriverApi](#interface-keyderiverapi) | [VerifyHmacArgs](#interface-verifyhmacargs) |
|
|
16
|
+
| [CreateActionArgs](#interface-createactionargs) | [KeyLinkageResult](#interface-keylinkageresult) | [VerifyHmacResult](#interface-verifyhmacresult) |
|
|
17
|
+
| [CreateActionInput](#interface-createactioninput) | [ListActionsArgs](#interface-listactionsargs) | [VerifySignatureArgs](#interface-verifysignatureargs) |
|
|
18
|
+
| [CreateActionOptions](#interface-createactionoptions) | [ListActionsResult](#interface-listactionsresult) | [VerifySignatureResult](#interface-verifysignatureresult) |
|
|
19
|
+
| [CreateActionOutput](#interface-createactionoutput) | [ListCertificatesArgs](#interface-listcertificatesargs) | [Wallet](#interface-wallet) |
|
|
20
|
+
| [CreateActionResult](#interface-createactionresult) | [ListCertificatesResult](#interface-listcertificatesresult) | [WalletAction](#interface-walletaction) |
|
|
21
|
+
| [CreateHmacArgs](#interface-createhmacargs) | [ListOutputsArgs](#interface-listoutputsargs) | [WalletActionInput](#interface-walletactioninput) |
|
|
22
|
+
| [CreateHmacResult](#interface-createhmacresult) | [ListOutputsResult](#interface-listoutputsresult) | [WalletActionOutput](#interface-walletactionoutput) |
|
|
23
|
+
| [CreateSignatureArgs](#interface-createsignatureargs) | [ProtoWalletApi](#interface-protowalletapi) | [WalletCertificate](#interface-walletcertificate) |
|
|
24
|
+
| [CreateSignatureResult](#interface-createsignatureresult) | [ProveCertificateArgs](#interface-provecertificateargs) | [WalletDecryptArgs](#interface-walletdecryptargs) |
|
|
25
|
+
| [DiscoverByAttributesArgs](#interface-discoverbyattributesargs) | [ProveCertificateResult](#interface-provecertificateresult) | [WalletDecryptResult](#interface-walletdecryptresult) |
|
|
26
|
+
| [DiscoverByIdentityKeyArgs](#interface-discoverbyidentitykeyargs) | [RelinquishCertificateArgs](#interface-relinquishcertificateargs) | [WalletEncryptArgs](#interface-walletencryptargs) |
|
|
27
|
+
| [DiscoverCertificatesResult](#interface-discovercertificatesresult) | [RelinquishCertificateResult](#interface-relinquishcertificateresult) | [WalletEncryptResult](#interface-walletencryptresult) |
|
|
28
|
+
| [GetHeaderArgs](#interface-getheaderargs) | [RelinquishOutputArgs](#interface-relinquishoutputargs) | [WalletEncryptionArgs](#interface-walletencryptionargs) |
|
|
29
|
+
| [GetHeaderResult](#interface-getheaderresult) | [RelinquishOutputResult](#interface-relinquishoutputresult) | [WalletErrorObject](#interface-walleterrorobject) |
|
|
30
|
+
| [GetHeightResult](#interface-getheightresult) | [RevealCounterpartyKeyLinkageArgs](#interface-revealcounterpartykeylinkageargs) | [WalletOutput](#interface-walletoutput) |
|
|
31
|
+
| [GetNetworkResult](#interface-getnetworkresult) | [RevealCounterpartyKeyLinkageResult](#interface-revealcounterpartykeylinkageresult) | [WalletPayment](#interface-walletpayment) |
|
|
32
|
+
| [GetPublicKeyArgs](#interface-getpublickeyargs) | [RevealSpecificKeyLinkageArgs](#interface-revealspecifickeylinkageargs) | [WalletWire](#interface-walletwire) |
|
|
33
|
+
| [GetPublicKeyResult](#interface-getpublickeyresult) | [RevealSpecificKeyLinkageResult](#interface-revealspecifickeylinkageresult) | |
|
|
28
34
|
|
|
29
35
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
30
36
|
|
|
@@ -89,6 +95,17 @@ See also: [WalletCertificate](#interface-walletcertificate)
|
|
|
89
95
|
|
|
90
96
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
91
97
|
|
|
98
|
+
---
|
|
99
|
+
### Interface: AuthenticatedResult
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
export interface AuthenticatedResult {
|
|
103
|
+
authenticated: true;
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
108
|
+
|
|
92
109
|
---
|
|
93
110
|
### Interface: BasketInsertion
|
|
94
111
|
|
|
@@ -104,6 +121,20 @@ See also: [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [OutputT
|
|
|
104
121
|
|
|
105
122
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
106
123
|
|
|
124
|
+
---
|
|
125
|
+
### Interface: CertificateResult
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
export interface CertificateResult extends WalletCertificate {
|
|
129
|
+
keyring?: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
130
|
+
verifier?: string;
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
See also: [Base64String](#type-base64string), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [WalletCertificate](#interface-walletcertificate)
|
|
135
|
+
|
|
136
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
137
|
+
|
|
107
138
|
---
|
|
108
139
|
### Interface: CreateActionArgs
|
|
109
140
|
|
|
@@ -210,6 +241,19 @@ See also: [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryption
|
|
|
210
241
|
|
|
211
242
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
212
243
|
|
|
244
|
+
---
|
|
245
|
+
### Interface: CreateHmacResult
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
export interface CreateHmacResult {
|
|
249
|
+
hmac: Byte[];
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
See also: [Byte](#type-byte)
|
|
254
|
+
|
|
255
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
256
|
+
|
|
213
257
|
---
|
|
214
258
|
### Interface: CreateSignatureArgs
|
|
215
259
|
|
|
@@ -224,6 +268,19 @@ See also: [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryption
|
|
|
224
268
|
|
|
225
269
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
226
270
|
|
|
271
|
+
---
|
|
272
|
+
### Interface: CreateSignatureResult
|
|
273
|
+
|
|
274
|
+
```ts
|
|
275
|
+
export interface CreateSignatureResult {
|
|
276
|
+
signature: Byte[];
|
|
277
|
+
}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
See also: [Byte](#type-byte)
|
|
281
|
+
|
|
282
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
283
|
+
|
|
227
284
|
---
|
|
228
285
|
### Interface: DiscoverByAttributesArgs
|
|
229
286
|
|
|
@@ -270,6 +327,58 @@ See also: [IdentityCertificate](#interface-identitycertificate), [PositiveIntege
|
|
|
270
327
|
|
|
271
328
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
272
329
|
|
|
330
|
+
---
|
|
331
|
+
### Interface: GetHeaderArgs
|
|
332
|
+
|
|
333
|
+
```ts
|
|
334
|
+
export interface GetHeaderArgs {
|
|
335
|
+
height: PositiveInteger;
|
|
336
|
+
}
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
See also: [PositiveInteger](#type-positiveinteger)
|
|
340
|
+
|
|
341
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
### Interface: GetHeaderResult
|
|
345
|
+
|
|
346
|
+
```ts
|
|
347
|
+
export interface GetHeaderResult {
|
|
348
|
+
header: HexString;
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
See also: [HexString](#type-hexstring)
|
|
353
|
+
|
|
354
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
### Interface: GetHeightResult
|
|
358
|
+
|
|
359
|
+
```ts
|
|
360
|
+
export interface GetHeightResult {
|
|
361
|
+
height: PositiveInteger;
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
See also: [PositiveInteger](#type-positiveinteger)
|
|
366
|
+
|
|
367
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
### Interface: GetNetworkResult
|
|
371
|
+
|
|
372
|
+
```ts
|
|
373
|
+
export interface GetNetworkResult {
|
|
374
|
+
network: WalletNetwork;
|
|
375
|
+
}
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
See also: [WalletNetwork](#type-walletnetwork)
|
|
379
|
+
|
|
380
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
381
|
+
|
|
273
382
|
---
|
|
274
383
|
### Interface: GetPublicKeyArgs
|
|
275
384
|
|
|
@@ -288,6 +397,32 @@ See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [WalletEncryptionArg
|
|
|
288
397
|
|
|
289
398
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
290
399
|
|
|
400
|
+
---
|
|
401
|
+
### Interface: GetPublicKeyResult
|
|
402
|
+
|
|
403
|
+
```ts
|
|
404
|
+
export interface GetPublicKeyResult {
|
|
405
|
+
publicKey: PubKeyHex;
|
|
406
|
+
}
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
See also: [PubKeyHex](#type-pubkeyhex)
|
|
410
|
+
|
|
411
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
### Interface: GetVersionResult
|
|
415
|
+
|
|
416
|
+
```ts
|
|
417
|
+
export interface GetVersionResult {
|
|
418
|
+
version: VersionString7To30Bytes;
|
|
419
|
+
}
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
See also: [VersionString7To30Bytes](#type-versionstring7to30bytes)
|
|
423
|
+
|
|
424
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
425
|
+
|
|
291
426
|
---
|
|
292
427
|
### Interface: IdentityCertificate
|
|
293
428
|
|
|
@@ -364,22 +499,162 @@ See also: [BasketInsertion](#interface-basketinsertion), [PositiveIntegerOrZero]
|
|
|
364
499
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
365
500
|
|
|
366
501
|
---
|
|
367
|
-
### Interface:
|
|
502
|
+
### Interface: KeyDeriverApi
|
|
368
503
|
|
|
369
504
|
```ts
|
|
370
|
-
export interface
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
keyID:
|
|
376
|
-
counterparty
|
|
377
|
-
|
|
378
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
505
|
+
export interface KeyDeriverApi {
|
|
506
|
+
rootKey: PrivateKey;
|
|
507
|
+
identityKey: string;
|
|
508
|
+
derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf?: boolean): PublicKey;
|
|
509
|
+
derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey;
|
|
510
|
+
deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey;
|
|
511
|
+
revealCounterpartySecret(counterparty: Counterparty): number[];
|
|
512
|
+
revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[];
|
|
379
513
|
}
|
|
380
514
|
```
|
|
381
515
|
|
|
382
|
-
See also: [
|
|
516
|
+
See also: [Counterparty](#type-counterparty), [PrivateKey](#class-privatekey), [PublicKey](#class-publickey), [SymmetricKey](#class-symmetrickey), [WalletProtocol](#type-walletprotocol)
|
|
517
|
+
|
|
518
|
+
<details>
|
|
519
|
+
|
|
520
|
+
<summary>Interface KeyDeriverApi Details</summary>
|
|
521
|
+
|
|
522
|
+
#### Property identityKey
|
|
523
|
+
|
|
524
|
+
The identity of this key deriver which is normally the public key associated with the `rootKey`
|
|
525
|
+
|
|
526
|
+
```ts
|
|
527
|
+
identityKey: string
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
#### Property rootKey
|
|
531
|
+
|
|
532
|
+
The root key from which all other keys are derived.
|
|
533
|
+
|
|
534
|
+
```ts
|
|
535
|
+
rootKey: PrivateKey
|
|
536
|
+
```
|
|
537
|
+
See also: [PrivateKey](#class-privatekey)
|
|
538
|
+
|
|
539
|
+
#### Method derivePrivateKey
|
|
540
|
+
|
|
541
|
+
Derives a private key based on protocol ID, key ID, and counterparty.
|
|
542
|
+
|
|
543
|
+
```ts
|
|
544
|
+
derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey
|
|
545
|
+
```
|
|
546
|
+
See also: [Counterparty](#type-counterparty), [PrivateKey](#class-privatekey), [WalletProtocol](#type-walletprotocol)
|
|
547
|
+
|
|
548
|
+
Returns
|
|
549
|
+
|
|
550
|
+
- The derived private key.
|
|
551
|
+
|
|
552
|
+
Argument Details
|
|
553
|
+
|
|
554
|
+
+ **protocolID**
|
|
555
|
+
+ The protocol ID including a security level and protocol name.
|
|
556
|
+
+ **keyID**
|
|
557
|
+
+ The key identifier.
|
|
558
|
+
+ **counterparty**
|
|
559
|
+
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
560
|
+
|
|
561
|
+
#### Method derivePublicKey
|
|
562
|
+
|
|
563
|
+
Derives a public key based on protocol ID, key ID, and counterparty.
|
|
564
|
+
|
|
565
|
+
```ts
|
|
566
|
+
derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf?: boolean): PublicKey
|
|
567
|
+
```
|
|
568
|
+
See also: [Counterparty](#type-counterparty), [PublicKey](#class-publickey), [WalletProtocol](#type-walletprotocol)
|
|
569
|
+
|
|
570
|
+
Returns
|
|
571
|
+
|
|
572
|
+
- The derived public key.
|
|
573
|
+
|
|
574
|
+
Argument Details
|
|
575
|
+
|
|
576
|
+
+ **protocolID**
|
|
577
|
+
+ The protocol ID including a security level and protocol name.
|
|
578
|
+
+ **keyID**
|
|
579
|
+
+ The key identifier.
|
|
580
|
+
+ **counterparty**
|
|
581
|
+
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
582
|
+
+ **forSelf**
|
|
583
|
+
+ Optional. false if undefined. Whether deriving for self.
|
|
584
|
+
|
|
585
|
+
#### Method deriveSymmetricKey
|
|
586
|
+
|
|
587
|
+
Derives a symmetric key based on protocol ID, key ID, and counterparty.
|
|
588
|
+
Note: Symmetric keys should not be derivable by everyone due to security risks.
|
|
589
|
+
|
|
590
|
+
```ts
|
|
591
|
+
deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey
|
|
592
|
+
```
|
|
593
|
+
See also: [Counterparty](#type-counterparty), [SymmetricKey](#class-symmetrickey), [WalletProtocol](#type-walletprotocol)
|
|
594
|
+
|
|
595
|
+
Returns
|
|
596
|
+
|
|
597
|
+
- The derived symmetric key.
|
|
598
|
+
|
|
599
|
+
Argument Details
|
|
600
|
+
|
|
601
|
+
+ **protocolID**
|
|
602
|
+
+ The protocol ID including a security level and protocol name.
|
|
603
|
+
+ **keyID**
|
|
604
|
+
+ The key identifier.
|
|
605
|
+
+ **counterparty**
|
|
606
|
+
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
607
|
+
|
|
608
|
+
Throws
|
|
609
|
+
|
|
610
|
+
- Throws an error if attempting to derive a symmetric key for 'anyone'.
|
|
611
|
+
|
|
612
|
+
#### Method revealCounterpartySecret
|
|
613
|
+
|
|
614
|
+
Reveals the shared secret between the root key and the counterparty.
|
|
615
|
+
Note: This should not be used for 'self'.
|
|
616
|
+
|
|
617
|
+
```ts
|
|
618
|
+
revealCounterpartySecret(counterparty: Counterparty): number[]
|
|
619
|
+
```
|
|
620
|
+
See also: [Counterparty](#type-counterparty)
|
|
621
|
+
|
|
622
|
+
Returns
|
|
623
|
+
|
|
624
|
+
- The shared secret as a number array.
|
|
625
|
+
|
|
626
|
+
Argument Details
|
|
627
|
+
|
|
628
|
+
+ **counterparty**
|
|
629
|
+
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
630
|
+
|
|
631
|
+
Throws
|
|
632
|
+
|
|
633
|
+
- Throws an error if attempting to reveal a shared secret for 'self'.
|
|
634
|
+
|
|
635
|
+
#### Method revealSpecificSecret
|
|
636
|
+
|
|
637
|
+
Reveals the specific key association for a given protocol ID, key ID, and counterparty.
|
|
638
|
+
|
|
639
|
+
```ts
|
|
640
|
+
revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[]
|
|
641
|
+
```
|
|
642
|
+
See also: [Counterparty](#type-counterparty), [WalletProtocol](#type-walletprotocol)
|
|
643
|
+
|
|
644
|
+
Returns
|
|
645
|
+
|
|
646
|
+
- The specific key association as a number array.
|
|
647
|
+
|
|
648
|
+
Argument Details
|
|
649
|
+
|
|
650
|
+
+ **counterparty**
|
|
651
|
+
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
652
|
+
+ **protocolID**
|
|
653
|
+
+ The protocol ID including a security level and protocol name.
|
|
654
|
+
+ **keyID**
|
|
655
|
+
+ The key identifier.
|
|
656
|
+
|
|
657
|
+
</details>
|
|
383
658
|
|
|
384
659
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
385
660
|
|
|
@@ -461,11 +736,11 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
461
736
|
```ts
|
|
462
737
|
export interface ListCertificatesResult {
|
|
463
738
|
totalCertificates: PositiveIntegerOrZero;
|
|
464
|
-
certificates:
|
|
739
|
+
certificates: CertificateResult[];
|
|
465
740
|
}
|
|
466
741
|
```
|
|
467
742
|
|
|
468
|
-
See also: [
|
|
743
|
+
See also: [CertificateResult](#interface-certificateresult), [PositiveIntegerOrZero](#type-positiveintegerorzero)
|
|
469
744
|
|
|
470
745
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
471
746
|
|
|
@@ -507,39 +782,159 @@ See also: [BEEF](#type-beef), [PositiveIntegerOrZero](#type-positiveintegerorzer
|
|
|
507
782
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
508
783
|
|
|
509
784
|
---
|
|
510
|
-
### Interface:
|
|
511
|
-
|
|
512
|
-
```ts
|
|
513
|
-
export interface ProveCertificateArgs {
|
|
514
|
-
certificate: WalletCertificate;
|
|
515
|
-
fieldsToReveal: CertificateFieldNameUnder50Bytes[];
|
|
516
|
-
verifier: PubKeyHex;
|
|
517
|
-
privileged?: BooleanDefaultFalse;
|
|
518
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
519
|
-
}
|
|
520
|
-
```
|
|
785
|
+
### Interface: ProtoWalletApi
|
|
521
786
|
|
|
522
|
-
|
|
787
|
+
The ProtoWalletApi interface defines a wallet cryptographic capabilities including:
|
|
788
|
+
key derivation, encryption, decryption, hmac creation and verification, signature generation and verification
|
|
523
789
|
|
|
524
|
-
|
|
790
|
+
Error Handling
|
|
525
791
|
|
|
526
|
-
|
|
527
|
-
|
|
792
|
+
Every method of the `Wallet` interface has a return value of the form `Promise<object>`.
|
|
793
|
+
When an error occurs, an exception object may be thrown which must conform to the `WalletErrorObject` interface.
|
|
794
|
+
Serialization layers can rely on the `isError` property being unique to error objects to
|
|
795
|
+
deserialize and rethrow `WalletErrorObject` conforming objects.
|
|
528
796
|
|
|
529
797
|
```ts
|
|
530
|
-
export interface
|
|
531
|
-
|
|
798
|
+
export interface ProtoWalletApi {
|
|
799
|
+
getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetPublicKeyResult>;
|
|
800
|
+
revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>;
|
|
801
|
+
revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>;
|
|
802
|
+
encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletEncryptResult>;
|
|
803
|
+
decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletDecryptResult>;
|
|
804
|
+
createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateHmacResult>;
|
|
805
|
+
verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifyHmacResult>;
|
|
806
|
+
createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateSignatureResult>;
|
|
807
|
+
verifySignature: (args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifySignatureResult>;
|
|
532
808
|
}
|
|
533
809
|
```
|
|
534
810
|
|
|
535
|
-
See also: [
|
|
811
|
+
See also: [CreateHmacArgs](#interface-createhmacargs), [CreateHmacResult](#interface-createhmacresult), [CreateSignatureArgs](#interface-createsignatureargs), [CreateSignatureResult](#interface-createsignatureresult), [GetPublicKeyArgs](#interface-getpublickeyargs), [GetPublicKeyResult](#interface-getpublickeyresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [RevealCounterpartyKeyLinkageArgs](#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](#interface-revealcounterpartykeylinkageresult), [RevealSpecificKeyLinkageArgs](#interface-revealspecifickeylinkageargs), [RevealSpecificKeyLinkageResult](#interface-revealspecifickeylinkageresult), [VerifyHmacArgs](#interface-verifyhmacargs), [VerifyHmacResult](#interface-verifyhmacresult), [VerifySignatureArgs](#interface-verifysignatureargs), [VerifySignatureResult](#interface-verifysignatureresult), [WalletDecryptArgs](#interface-walletdecryptargs), [WalletDecryptResult](#interface-walletdecryptresult), [WalletEncryptArgs](#interface-walletencryptargs), [WalletEncryptResult](#interface-walletencryptresult), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
536
812
|
|
|
537
|
-
|
|
813
|
+
<details>
|
|
538
814
|
|
|
539
|
-
|
|
540
|
-
### Interface: RelinquishCertificateArgs
|
|
815
|
+
<summary>Interface ProtoWalletApi Details</summary>
|
|
541
816
|
|
|
542
|
-
|
|
817
|
+
#### Property createHmac
|
|
818
|
+
|
|
819
|
+
Creates an HMAC (Hash-based Message Authentication Code) based on the provided data, protocol, key ID, counterparty, and other factors.
|
|
820
|
+
|
|
821
|
+
```ts
|
|
822
|
+
createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateHmacResult>
|
|
823
|
+
```
|
|
824
|
+
See also: [CreateHmacArgs](#interface-createhmacargs), [CreateHmacResult](#interface-createhmacresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
825
|
+
|
|
826
|
+
#### Property createSignature
|
|
827
|
+
|
|
828
|
+
Creates a digital signature for the provided data or hash using a specific protocol, key, and optionally considering privilege and counterparty.
|
|
829
|
+
|
|
830
|
+
```ts
|
|
831
|
+
createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateSignatureResult>
|
|
832
|
+
```
|
|
833
|
+
See also: [CreateSignatureArgs](#interface-createsignatureargs), [CreateSignatureResult](#interface-createsignatureresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
834
|
+
|
|
835
|
+
#### Property decrypt
|
|
836
|
+
|
|
837
|
+
Decrypts the provided ciphertext using derived keys, based on the protocol ID, key ID, counterparty, and other factors.
|
|
838
|
+
|
|
839
|
+
```ts
|
|
840
|
+
decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletDecryptResult>
|
|
841
|
+
```
|
|
842
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [WalletDecryptArgs](#interface-walletdecryptargs), [WalletDecryptResult](#interface-walletdecryptresult)
|
|
843
|
+
|
|
844
|
+
#### Property encrypt
|
|
845
|
+
|
|
846
|
+
Encrypts the provided plaintext data using derived keys, based on the protocol ID, key ID, counterparty, and other factors.
|
|
847
|
+
|
|
848
|
+
```ts
|
|
849
|
+
encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletEncryptResult>
|
|
850
|
+
```
|
|
851
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [WalletEncryptArgs](#interface-walletencryptargs), [WalletEncryptResult](#interface-walletencryptresult)
|
|
852
|
+
|
|
853
|
+
#### Property getPublicKey
|
|
854
|
+
|
|
855
|
+
Retrieves a derived or identity public key based on the requested protocol, key ID, counterparty, and other factors.
|
|
856
|
+
|
|
857
|
+
```ts
|
|
858
|
+
getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetPublicKeyResult>
|
|
859
|
+
```
|
|
860
|
+
See also: [GetPublicKeyArgs](#interface-getpublickeyargs), [GetPublicKeyResult](#interface-getpublickeyresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
861
|
+
|
|
862
|
+
#### Property revealCounterpartyKeyLinkage
|
|
863
|
+
|
|
864
|
+
Reveals the key linkage between ourselves and a counterparty, to a particular verifier, across all interactions with the counterparty.
|
|
865
|
+
|
|
866
|
+
```ts
|
|
867
|
+
revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>
|
|
868
|
+
```
|
|
869
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [RevealCounterpartyKeyLinkageArgs](#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](#interface-revealcounterpartykeylinkageresult)
|
|
870
|
+
|
|
871
|
+
#### Property revealSpecificKeyLinkage
|
|
872
|
+
|
|
873
|
+
Reveals the key linkage between ourselves and a counterparty, to a particular verifier, with respect to a specific interaction.
|
|
874
|
+
|
|
875
|
+
```ts
|
|
876
|
+
revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>
|
|
877
|
+
```
|
|
878
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [RevealSpecificKeyLinkageArgs](#interface-revealspecifickeylinkageargs), [RevealSpecificKeyLinkageResult](#interface-revealspecifickeylinkageresult)
|
|
879
|
+
|
|
880
|
+
#### Property verifyHmac
|
|
881
|
+
|
|
882
|
+
Verifies an HMAC (Hash-based Message Authentication Code) based on the provided data, protocol, key ID, counterparty, and other factors.
|
|
883
|
+
|
|
884
|
+
```ts
|
|
885
|
+
verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifyHmacResult>
|
|
886
|
+
```
|
|
887
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [VerifyHmacArgs](#interface-verifyhmacargs), [VerifyHmacResult](#interface-verifyhmacresult)
|
|
888
|
+
|
|
889
|
+
#### Property verifySignature
|
|
890
|
+
|
|
891
|
+
Verifies a digital signature for the provided data or hash using a specific protocol, key, and optionally considering privilege and counterparty.
|
|
892
|
+
|
|
893
|
+
```ts
|
|
894
|
+
verifySignature: (args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifySignatureResult>
|
|
895
|
+
```
|
|
896
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [VerifySignatureArgs](#interface-verifysignatureargs), [VerifySignatureResult](#interface-verifysignatureresult)
|
|
897
|
+
|
|
898
|
+
</details>
|
|
899
|
+
|
|
900
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
901
|
+
|
|
902
|
+
---
|
|
903
|
+
### Interface: ProveCertificateArgs
|
|
904
|
+
|
|
905
|
+
```ts
|
|
906
|
+
export interface ProveCertificateArgs {
|
|
907
|
+
certificate: Partial<WalletCertificate>;
|
|
908
|
+
fieldsToReveal: CertificateFieldNameUnder50Bytes[];
|
|
909
|
+
verifier: PubKeyHex;
|
|
910
|
+
privileged?: BooleanDefaultFalse;
|
|
911
|
+
privilegedReason?: DescriptionString5to50Bytes;
|
|
912
|
+
}
|
|
913
|
+
```
|
|
914
|
+
|
|
915
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [PubKeyHex](#type-pubkeyhex), [WalletCertificate](#interface-walletcertificate)
|
|
916
|
+
|
|
917
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
918
|
+
|
|
919
|
+
---
|
|
920
|
+
### Interface: ProveCertificateResult
|
|
921
|
+
|
|
922
|
+
```ts
|
|
923
|
+
export interface ProveCertificateResult {
|
|
924
|
+
keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
925
|
+
certificate?: WalletCertificate;
|
|
926
|
+
verifier?: PubKeyHex;
|
|
927
|
+
}
|
|
928
|
+
```
|
|
929
|
+
|
|
930
|
+
See also: [Base64String](#type-base64string), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [PubKeyHex](#type-pubkeyhex), [WalletCertificate](#interface-walletcertificate)
|
|
931
|
+
|
|
932
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
933
|
+
|
|
934
|
+
---
|
|
935
|
+
### Interface: RelinquishCertificateArgs
|
|
936
|
+
|
|
937
|
+
```ts
|
|
543
938
|
export interface RelinquishCertificateArgs {
|
|
544
939
|
type: Base64String;
|
|
545
940
|
serialNumber: Base64String;
|
|
@@ -551,6 +946,42 @@ See also: [Base64String](#type-base64string), [PubKeyHex](#type-pubkeyhex)
|
|
|
551
946
|
|
|
552
947
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
553
948
|
|
|
949
|
+
---
|
|
950
|
+
### Interface: RelinquishCertificateResult
|
|
951
|
+
|
|
952
|
+
```ts
|
|
953
|
+
export interface RelinquishCertificateResult {
|
|
954
|
+
relinquished: true;
|
|
955
|
+
}
|
|
956
|
+
```
|
|
957
|
+
|
|
958
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
959
|
+
|
|
960
|
+
---
|
|
961
|
+
### Interface: RelinquishOutputArgs
|
|
962
|
+
|
|
963
|
+
```ts
|
|
964
|
+
export interface RelinquishOutputArgs {
|
|
965
|
+
basket: BasketStringUnder300Bytes;
|
|
966
|
+
output: OutpointString;
|
|
967
|
+
}
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
See also: [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [OutpointString](#type-outpointstring)
|
|
971
|
+
|
|
972
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
973
|
+
|
|
974
|
+
---
|
|
975
|
+
### Interface: RelinquishOutputResult
|
|
976
|
+
|
|
977
|
+
```ts
|
|
978
|
+
export interface RelinquishOutputResult {
|
|
979
|
+
relinquished: true;
|
|
980
|
+
}
|
|
981
|
+
```
|
|
982
|
+
|
|
983
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
984
|
+
|
|
554
985
|
---
|
|
555
986
|
### Interface: RevealCounterpartyKeyLinkageArgs
|
|
556
987
|
|
|
@@ -584,13 +1015,17 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
584
1015
|
### Interface: RevealSpecificKeyLinkageArgs
|
|
585
1016
|
|
|
586
1017
|
```ts
|
|
587
|
-
export interface RevealSpecificKeyLinkageArgs
|
|
588
|
-
verifier: PubKeyHex;
|
|
1018
|
+
export interface RevealSpecificKeyLinkageArgs {
|
|
589
1019
|
counterparty: WalletCounterparty;
|
|
1020
|
+
verifier: PubKeyHex;
|
|
1021
|
+
protocolID: WalletProtocol;
|
|
1022
|
+
keyID: KeyIDStringUnder800Bytes;
|
|
1023
|
+
privilegedReason?: DescriptionString5to50Bytes;
|
|
1024
|
+
privileged?: BooleanDefaultFalse;
|
|
590
1025
|
}
|
|
591
1026
|
```
|
|
592
1027
|
|
|
593
|
-
See also: [
|
|
1028
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [PubKeyHex](#type-pubkeyhex), [WalletCounterparty](#type-walletcounterparty), [WalletProtocol](#type-walletprotocol)
|
|
594
1029
|
|
|
595
1030
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
596
1031
|
|
|
@@ -615,11 +1050,11 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
615
1050
|
```ts
|
|
616
1051
|
export interface SendWithResult {
|
|
617
1052
|
txid: TXIDHexString;
|
|
618
|
-
status:
|
|
1053
|
+
status: SendWithResultStatus;
|
|
619
1054
|
}
|
|
620
1055
|
```
|
|
621
1056
|
|
|
622
|
-
See also: [TXIDHexString](#type-txidhexstring)
|
|
1057
|
+
See also: [SendWithResultStatus](#type-sendwithresultstatus), [TXIDHexString](#type-txidhexstring)
|
|
623
1058
|
|
|
624
1059
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
625
1060
|
|
|
@@ -711,6 +1146,17 @@ See also: [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryption
|
|
|
711
1146
|
|
|
712
1147
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
713
1148
|
|
|
1149
|
+
---
|
|
1150
|
+
### Interface: VerifyHmacResult
|
|
1151
|
+
|
|
1152
|
+
```ts
|
|
1153
|
+
export interface VerifyHmacResult {
|
|
1154
|
+
valid: true;
|
|
1155
|
+
}
|
|
1156
|
+
```
|
|
1157
|
+
|
|
1158
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1159
|
+
|
|
714
1160
|
---
|
|
715
1161
|
### Interface: VerifySignatureArgs
|
|
716
1162
|
|
|
@@ -727,6 +1173,17 @@ See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [Byte](#type-byte),
|
|
|
727
1173
|
|
|
728
1174
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
729
1175
|
|
|
1176
|
+
---
|
|
1177
|
+
### Interface: VerifySignatureResult
|
|
1178
|
+
|
|
1179
|
+
```ts
|
|
1180
|
+
export interface VerifySignatureResult {
|
|
1181
|
+
valid: true;
|
|
1182
|
+
}
|
|
1183
|
+
```
|
|
1184
|
+
|
|
1185
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1186
|
+
|
|
730
1187
|
---
|
|
731
1188
|
### Interface: Wallet
|
|
732
1189
|
|
|
@@ -738,79 +1195,35 @@ the wallet for a range of functionalities aligned with the Babbage architectural
|
|
|
738
1195
|
Error Handling
|
|
739
1196
|
|
|
740
1197
|
Every method of the `Wallet` interface has a return value of the form `Promise<object>`.
|
|
741
|
-
When an error occurs, an exception object may be thrown which must conform to the `
|
|
1198
|
+
When an error occurs, an exception object may be thrown which must conform to the `WalletErrorObject` interface.
|
|
742
1199
|
Serialization layers can rely on the `isError` property being unique to error objects to
|
|
743
|
-
deserialize and rethrow `
|
|
1200
|
+
deserialize and rethrow `WalletErrorObject` conforming objects.
|
|
744
1201
|
|
|
745
1202
|
```ts
|
|
746
|
-
export interface Wallet {
|
|
1203
|
+
export interface Wallet extends ProtoWalletApi {
|
|
747
1204
|
createAction: (args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateActionResult>;
|
|
748
1205
|
signAction: (args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<SignActionResult>;
|
|
749
1206
|
abortAction: (args: AbortActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AbortActionResult>;
|
|
750
1207
|
listActions: (args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListActionsResult>;
|
|
751
1208
|
internalizeAction: (args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<InternalizeActionResult>;
|
|
752
1209
|
listOutputs: (args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListOutputsResult>;
|
|
753
|
-
relinquishOutput: (args:
|
|
754
|
-
basket: BasketStringUnder300Bytes;
|
|
755
|
-
output: OutpointString;
|
|
756
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
757
|
-
relinquished: true;
|
|
758
|
-
}>;
|
|
759
|
-
getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
760
|
-
publicKey: PubKeyHex;
|
|
761
|
-
}>;
|
|
762
|
-
revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>;
|
|
763
|
-
revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>;
|
|
764
|
-
encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
765
|
-
ciphertext: Byte[];
|
|
766
|
-
}>;
|
|
767
|
-
decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
768
|
-
plaintext: Byte[];
|
|
769
|
-
}>;
|
|
770
|
-
createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
771
|
-
hmac: Byte[];
|
|
772
|
-
}>;
|
|
773
|
-
verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
774
|
-
valid: true;
|
|
775
|
-
}>;
|
|
776
|
-
createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
777
|
-
signature: Byte[];
|
|
778
|
-
}>;
|
|
779
|
-
verifySignature: (args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
780
|
-
valid: true;
|
|
781
|
-
}>;
|
|
1210
|
+
relinquishOutput: (args: RelinquishOutputArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishOutputResult>;
|
|
782
1211
|
acquireCertificate: (args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AcquireCertificateResult>;
|
|
783
1212
|
listCertificates: (args: ListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListCertificatesResult>;
|
|
784
1213
|
proveCertificate: (args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ProveCertificateResult>;
|
|
785
|
-
relinquishCertificate: (args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<
|
|
786
|
-
relinquished: true;
|
|
787
|
-
}>;
|
|
1214
|
+
relinquishCertificate: (args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishCertificateResult>;
|
|
788
1215
|
discoverByIdentityKey: (args: DiscoverByIdentityKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>;
|
|
789
1216
|
discoverByAttributes: (args: DiscoverByAttributesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>;
|
|
790
|
-
isAuthenticated: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<
|
|
791
|
-
|
|
792
|
-
}>;
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
}>;
|
|
796
|
-
getHeight: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
797
|
-
height: PositiveInteger;
|
|
798
|
-
}>;
|
|
799
|
-
getHeaderForHeight: (args: {
|
|
800
|
-
height: PositiveInteger;
|
|
801
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
802
|
-
header: HexString;
|
|
803
|
-
}>;
|
|
804
|
-
getNetwork: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
805
|
-
network: WalletNetwork;
|
|
806
|
-
}>;
|
|
807
|
-
getVersion: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
808
|
-
version: VersionString7To30Bytes;
|
|
809
|
-
}>;
|
|
1217
|
+
isAuthenticated: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>;
|
|
1218
|
+
waitForAuthentication: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>;
|
|
1219
|
+
getHeight: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeightResult>;
|
|
1220
|
+
getHeaderForHeight: (args: GetHeaderArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeaderResult>;
|
|
1221
|
+
getNetwork: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetNetworkResult>;
|
|
1222
|
+
getVersion: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetVersionResult>;
|
|
810
1223
|
}
|
|
811
1224
|
```
|
|
812
1225
|
|
|
813
|
-
See also: [AbortActionArgs](#interface-abortactionargs), [AbortActionResult](#interface-abortactionresult), [AcquireCertificateArgs](#interface-acquirecertificateargs), [AcquireCertificateResult](#interface-acquirecertificateresult), [
|
|
1226
|
+
See also: [AbortActionArgs](#interface-abortactionargs), [AbortActionResult](#interface-abortactionresult), [AcquireCertificateArgs](#interface-acquirecertificateargs), [AcquireCertificateResult](#interface-acquirecertificateresult), [AuthenticatedResult](#interface-authenticatedresult), [CreateActionArgs](#interface-createactionargs), [CreateActionResult](#interface-createactionresult), [DiscoverByAttributesArgs](#interface-discoverbyattributesargs), [DiscoverByIdentityKeyArgs](#interface-discoverbyidentitykeyargs), [DiscoverCertificatesResult](#interface-discovercertificatesresult), [GetHeaderArgs](#interface-getheaderargs), [GetHeaderResult](#interface-getheaderresult), [GetHeightResult](#interface-getheightresult), [GetNetworkResult](#interface-getnetworkresult), [GetVersionResult](#interface-getversionresult), [InternalizeActionArgs](#interface-internalizeactionargs), [InternalizeActionResult](#interface-internalizeactionresult), [ListActionsArgs](#interface-listactionsargs), [ListActionsResult](#interface-listactionsresult), [ListCertificatesArgs](#interface-listcertificatesargs), [ListCertificatesResult](#interface-listcertificatesresult), [ListOutputsArgs](#interface-listoutputsargs), [ListOutputsResult](#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [ProtoWalletApi](#interface-protowalletapi), [ProveCertificateArgs](#interface-provecertificateargs), [ProveCertificateResult](#interface-provecertificateresult), [RelinquishCertificateArgs](#interface-relinquishcertificateargs), [RelinquishCertificateResult](#interface-relinquishcertificateresult), [RelinquishOutputArgs](#interface-relinquishoutputargs), [RelinquishOutputResult](#interface-relinquishoutputresult), [SignActionArgs](#interface-signactionargs), [SignActionResult](#interface-signactionresult)
|
|
814
1227
|
|
|
815
1228
|
<details>
|
|
816
1229
|
|
|
@@ -843,39 +1256,6 @@ createAction: (args: CreateActionArgs, originator?: OriginatorDomainNameStringUn
|
|
|
843
1256
|
```
|
|
844
1257
|
See also: [CreateActionArgs](#interface-createactionargs), [CreateActionResult](#interface-createactionresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
845
1258
|
|
|
846
|
-
#### Property createHmac
|
|
847
|
-
|
|
848
|
-
Creates an HMAC (Hash-based Message Authentication Code) based on the provided data, protocol, key ID, counterparty, and other factors.
|
|
849
|
-
|
|
850
|
-
```ts
|
|
851
|
-
createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
852
|
-
hmac: Byte[];
|
|
853
|
-
}>
|
|
854
|
-
```
|
|
855
|
-
See also: [Byte](#type-byte), [CreateHmacArgs](#interface-createhmacargs), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
856
|
-
|
|
857
|
-
#### Property createSignature
|
|
858
|
-
|
|
859
|
-
Creates a digital signature for the provided data or hash using a specific protocol, key, and optionally considering privilege and counterparty.
|
|
860
|
-
|
|
861
|
-
```ts
|
|
862
|
-
createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
863
|
-
signature: Byte[];
|
|
864
|
-
}>
|
|
865
|
-
```
|
|
866
|
-
See also: [Byte](#type-byte), [CreateSignatureArgs](#interface-createsignatureargs), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
867
|
-
|
|
868
|
-
#### Property decrypt
|
|
869
|
-
|
|
870
|
-
Decrypts the provided ciphertext using derived keys, based on the protocol ID, key ID, counterparty, and other factors.
|
|
871
|
-
|
|
872
|
-
```ts
|
|
873
|
-
decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
874
|
-
plaintext: Byte[];
|
|
875
|
-
}>
|
|
876
|
-
```
|
|
877
|
-
See also: [Byte](#type-byte), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [WalletDecryptArgs](#interface-walletdecryptargs)
|
|
878
|
-
|
|
879
1259
|
#### Property discoverByAttributes
|
|
880
1260
|
|
|
881
1261
|
Discovers identity certificates belonging to other users, where the documents contain specific attributes, issued by a trusted entity.
|
|
@@ -894,73 +1274,41 @@ discoverByIdentityKey: (args: DiscoverByIdentityKeyArgs, originator?: Originator
|
|
|
894
1274
|
```
|
|
895
1275
|
See also: [DiscoverByIdentityKeyArgs](#interface-discoverbyidentitykeyargs), [DiscoverCertificatesResult](#interface-discovercertificatesresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
896
1276
|
|
|
897
|
-
#### Property encrypt
|
|
898
|
-
|
|
899
|
-
Encrypts the provided plaintext data using derived keys, based on the protocol ID, key ID, counterparty, and other factors.
|
|
900
|
-
|
|
901
|
-
```ts
|
|
902
|
-
encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
903
|
-
ciphertext: Byte[];
|
|
904
|
-
}>
|
|
905
|
-
```
|
|
906
|
-
See also: [Byte](#type-byte), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [WalletEncryptArgs](#interface-walletencryptargs)
|
|
907
|
-
|
|
908
1277
|
#### Property getHeaderForHeight
|
|
909
1278
|
|
|
910
1279
|
Retrieves the block header of a block at a specified height.
|
|
911
1280
|
|
|
912
1281
|
```ts
|
|
913
|
-
getHeaderForHeight: (args:
|
|
914
|
-
height: PositiveInteger;
|
|
915
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
916
|
-
header: HexString;
|
|
917
|
-
}>
|
|
1282
|
+
getHeaderForHeight: (args: GetHeaderArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeaderResult>
|
|
918
1283
|
```
|
|
919
|
-
See also: [
|
|
1284
|
+
See also: [GetHeaderArgs](#interface-getheaderargs), [GetHeaderResult](#interface-getheaderresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
920
1285
|
|
|
921
1286
|
#### Property getHeight
|
|
922
1287
|
|
|
923
1288
|
Retrieves the current height of the blockchain.
|
|
924
1289
|
|
|
925
1290
|
```ts
|
|
926
|
-
getHeight: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<
|
|
927
|
-
height: PositiveInteger;
|
|
928
|
-
}>
|
|
1291
|
+
getHeight: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeightResult>
|
|
929
1292
|
```
|
|
930
|
-
See also: [
|
|
1293
|
+
See also: [GetHeightResult](#interface-getheightresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
931
1294
|
|
|
932
1295
|
#### Property getNetwork
|
|
933
1296
|
|
|
934
1297
|
Retrieves the Bitcoin network the client is using (mainnet or testnet).
|
|
935
1298
|
|
|
936
1299
|
```ts
|
|
937
|
-
getNetwork: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<
|
|
938
|
-
network: WalletNetwork;
|
|
939
|
-
}>
|
|
940
|
-
```
|
|
941
|
-
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [WalletNetwork](#type-walletnetwork)
|
|
942
|
-
|
|
943
|
-
#### Property getPublicKey
|
|
944
|
-
|
|
945
|
-
Retrieves a derived or identity public key based on the requested protocol, key ID, counterparty, and other factors.
|
|
946
|
-
|
|
947
|
-
```ts
|
|
948
|
-
getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
949
|
-
publicKey: PubKeyHex;
|
|
950
|
-
}>
|
|
1300
|
+
getNetwork: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetNetworkResult>
|
|
951
1301
|
```
|
|
952
|
-
See also: [
|
|
1302
|
+
See also: [GetNetworkResult](#interface-getnetworkresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
953
1303
|
|
|
954
1304
|
#### Property getVersion
|
|
955
1305
|
|
|
956
1306
|
Retrieves the current version string of the wallet.
|
|
957
1307
|
|
|
958
1308
|
```ts
|
|
959
|
-
getVersion: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<
|
|
960
|
-
version: VersionString7To30Bytes;
|
|
961
|
-
}>
|
|
1309
|
+
getVersion: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetVersionResult>
|
|
962
1310
|
```
|
|
963
|
-
See also: [
|
|
1311
|
+
See also: [GetVersionResult](#interface-getversionresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
964
1312
|
|
|
965
1313
|
#### Property internalizeAction
|
|
966
1314
|
|
|
@@ -976,11 +1324,9 @@ See also: [InternalizeActionArgs](#interface-internalizeactionargs), [Internaliz
|
|
|
976
1324
|
Checks the authentication status of the user.
|
|
977
1325
|
|
|
978
1326
|
```ts
|
|
979
|
-
isAuthenticated: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<
|
|
980
|
-
authenticated: boolean;
|
|
981
|
-
}>
|
|
1327
|
+
isAuthenticated: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>
|
|
982
1328
|
```
|
|
983
|
-
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
1329
|
+
See also: [AuthenticatedResult](#interface-authenticatedresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
984
1330
|
|
|
985
1331
|
#### Property listActions
|
|
986
1332
|
|
|
@@ -1023,43 +1369,18 @@ See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamest
|
|
|
1023
1369
|
Relinquishes an identity certificate, removing it from the wallet regardless of whether the revocation outpoint has become spent.
|
|
1024
1370
|
|
|
1025
1371
|
```ts
|
|
1026
|
-
relinquishCertificate: (args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<
|
|
1027
|
-
relinquished: true;
|
|
1028
|
-
}>
|
|
1372
|
+
relinquishCertificate: (args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishCertificateResult>
|
|
1029
1373
|
```
|
|
1030
|
-
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [RelinquishCertificateArgs](#interface-relinquishcertificateargs)
|
|
1374
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [RelinquishCertificateArgs](#interface-relinquishcertificateargs), [RelinquishCertificateResult](#interface-relinquishcertificateresult)
|
|
1031
1375
|
|
|
1032
1376
|
#### Property relinquishOutput
|
|
1033
1377
|
|
|
1034
1378
|
Relinquish an output out of a basket, removing it from tracking without spending it.
|
|
1035
1379
|
|
|
1036
1380
|
```ts
|
|
1037
|
-
relinquishOutput: (args:
|
|
1038
|
-
basket: BasketStringUnder300Bytes;
|
|
1039
|
-
output: OutpointString;
|
|
1040
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
1041
|
-
relinquished: true;
|
|
1042
|
-
}>
|
|
1043
|
-
```
|
|
1044
|
-
See also: [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [OutpointString](#type-outpointstring)
|
|
1045
|
-
|
|
1046
|
-
#### Property revealCounterpartyKeyLinkage
|
|
1047
|
-
|
|
1048
|
-
Reveals the key linkage between ourselves and a counterparty, to a particular verifier, across all interactions with the counterparty.
|
|
1049
|
-
|
|
1050
|
-
```ts
|
|
1051
|
-
revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>
|
|
1052
|
-
```
|
|
1053
|
-
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [RevealCounterpartyKeyLinkageArgs](#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](#interface-revealcounterpartykeylinkageresult)
|
|
1054
|
-
|
|
1055
|
-
#### Property revealSpecificKeyLinkage
|
|
1056
|
-
|
|
1057
|
-
Reveals the key linkage between ourselves and a counterparty, to a particular verifier, with respect to a specific interaction.
|
|
1058
|
-
|
|
1059
|
-
```ts
|
|
1060
|
-
revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>
|
|
1381
|
+
relinquishOutput: (args: RelinquishOutputArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishOutputResult>
|
|
1061
1382
|
```
|
|
1062
|
-
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [
|
|
1383
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [RelinquishOutputArgs](#interface-relinquishoutputargs), [RelinquishOutputResult](#interface-relinquishoutputresult)
|
|
1063
1384
|
|
|
1064
1385
|
#### Property signAction
|
|
1065
1386
|
|
|
@@ -1070,45 +1391,21 @@ signAction: (args: SignActionArgs, originator?: OriginatorDomainNameStringUnder2
|
|
|
1070
1391
|
```
|
|
1071
1392
|
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [SignActionArgs](#interface-signactionargs), [SignActionResult](#interface-signactionresult)
|
|
1072
1393
|
|
|
1073
|
-
#### Property
|
|
1394
|
+
#### Property waitForAuthentication
|
|
1074
1395
|
|
|
1075
|
-
|
|
1396
|
+
Continuously waits until the user is authenticated, returning the result once confirmed.
|
|
1076
1397
|
|
|
1077
1398
|
```ts
|
|
1078
|
-
|
|
1079
|
-
valid: true;
|
|
1080
|
-
}>
|
|
1399
|
+
waitForAuthentication: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>
|
|
1081
1400
|
```
|
|
1082
|
-
See also: [
|
|
1401
|
+
See also: [AuthenticatedResult](#interface-authenticatedresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
1083
1402
|
|
|
1084
|
-
|
|
1403
|
+
</details>
|
|
1085
1404
|
|
|
1086
|
-
|
|
1405
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1087
1406
|
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
valid: true;
|
|
1091
|
-
}>
|
|
1092
|
-
```
|
|
1093
|
-
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [VerifySignatureArgs](#interface-verifysignatureargs)
|
|
1094
|
-
|
|
1095
|
-
#### Property waitForAuthentication
|
|
1096
|
-
|
|
1097
|
-
Continuously waits until the user is authenticated, returning the result once confirmed.
|
|
1098
|
-
|
|
1099
|
-
```ts
|
|
1100
|
-
waitForAuthentication: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
1101
|
-
authenticated: true;
|
|
1102
|
-
}>
|
|
1103
|
-
```
|
|
1104
|
-
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
1105
|
-
|
|
1106
|
-
</details>
|
|
1107
|
-
|
|
1108
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1109
|
-
|
|
1110
|
-
---
|
|
1111
|
-
### Interface: WalletAction
|
|
1407
|
+
---
|
|
1408
|
+
### Interface: WalletAction
|
|
1112
1409
|
|
|
1113
1410
|
```ts
|
|
1114
1411
|
export interface WalletAction {
|
|
@@ -1199,6 +1496,19 @@ See also: [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryption
|
|
|
1199
1496
|
|
|
1200
1497
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1201
1498
|
|
|
1499
|
+
---
|
|
1500
|
+
### Interface: WalletDecryptResult
|
|
1501
|
+
|
|
1502
|
+
```ts
|
|
1503
|
+
export interface WalletDecryptResult {
|
|
1504
|
+
plaintext: Byte[];
|
|
1505
|
+
}
|
|
1506
|
+
```
|
|
1507
|
+
|
|
1508
|
+
See also: [Byte](#type-byte)
|
|
1509
|
+
|
|
1510
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1511
|
+
|
|
1202
1512
|
---
|
|
1203
1513
|
### Interface: WalletEncryptArgs
|
|
1204
1514
|
|
|
@@ -1212,16 +1522,34 @@ See also: [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryption
|
|
|
1212
1522
|
|
|
1213
1523
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1214
1524
|
|
|
1525
|
+
---
|
|
1526
|
+
### Interface: WalletEncryptResult
|
|
1527
|
+
|
|
1528
|
+
```ts
|
|
1529
|
+
export interface WalletEncryptResult {
|
|
1530
|
+
ciphertext: Byte[];
|
|
1531
|
+
}
|
|
1532
|
+
```
|
|
1533
|
+
|
|
1534
|
+
See also: [Byte](#type-byte)
|
|
1535
|
+
|
|
1536
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1537
|
+
|
|
1215
1538
|
---
|
|
1216
1539
|
### Interface: WalletEncryptionArgs
|
|
1217
1540
|
|
|
1218
1541
|
```ts
|
|
1219
|
-
export interface WalletEncryptionArgs
|
|
1542
|
+
export interface WalletEncryptionArgs {
|
|
1543
|
+
protocolID: WalletProtocol;
|
|
1544
|
+
keyID: KeyIDStringUnder800Bytes;
|
|
1545
|
+
counterparty?: WalletCounterparty;
|
|
1546
|
+
privileged?: BooleanDefaultFalse;
|
|
1547
|
+
privilegedReason?: DescriptionString5to50Bytes;
|
|
1220
1548
|
seekPermission?: BooleanDefaultTrue;
|
|
1221
1549
|
}
|
|
1222
1550
|
```
|
|
1223
1551
|
|
|
1224
|
-
See also: [BooleanDefaultTrue](#type-booleandefaulttrue), [
|
|
1552
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [BooleanDefaultTrue](#type-booleandefaulttrue), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [WalletCounterparty](#type-walletcounterparty), [WalletProtocol](#type-walletprotocol)
|
|
1225
1553
|
|
|
1226
1554
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1227
1555
|
|
|
@@ -1229,9 +1557,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1229
1557
|
### Interface: WalletErrorObject
|
|
1230
1558
|
|
|
1231
1559
|
Every method of the `Wallet` interface has a return value of the form `Promise<object>`.
|
|
1232
|
-
When errors occur, an exception object may be thrown which must conform to the `
|
|
1560
|
+
When errors occur, an exception object may be thrown which must conform to the `WalletErrorObject` interface.
|
|
1233
1561
|
Serialization layers can rely on the `isError` property being unique to error objects.
|
|
1234
|
-
Deserialization should rethrow `
|
|
1562
|
+
Deserialization should rethrow `WalletErrorObject` conforming objects.
|
|
1235
1563
|
|
|
1236
1564
|
```ts
|
|
1237
1565
|
export interface WalletErrorObject extends Error {
|
|
@@ -1248,7 +1576,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1248
1576
|
export interface WalletOutput {
|
|
1249
1577
|
satoshis: SatoshiValue;
|
|
1250
1578
|
lockingScript?: HexString;
|
|
1251
|
-
spendable:
|
|
1579
|
+
spendable: boolean;
|
|
1252
1580
|
customInstructions?: string;
|
|
1253
1581
|
tags?: OutputTagStringUnder300Bytes[];
|
|
1254
1582
|
outpoint: OutpointString;
|
|
@@ -1320,27 +1648,15 @@ export default class CachedKeyDeriver {
|
|
|
1320
1648
|
constructor(rootKey: PrivateKey | "anyone", options?: {
|
|
1321
1649
|
maxCacheSize?: number;
|
|
1322
1650
|
})
|
|
1323
|
-
derivePublicKey(protocolID:
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
SecurityLevel,
|
|
1329
|
-
string
|
|
1330
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): PrivateKey
|
|
1331
|
-
deriveSymmetricKey(protocolID: [
|
|
1332
|
-
SecurityLevel,
|
|
1333
|
-
string
|
|
1334
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): SymmetricKey
|
|
1335
|
-
revealCounterpartySecret(counterparty: PublicKey | string | "self" | "anyone"): number[]
|
|
1336
|
-
revealSpecificSecret(counterparty: PublicKey | string | "self" | "anyone", protocolID: [
|
|
1337
|
-
SecurityLevel,
|
|
1338
|
-
string
|
|
1339
|
-
], keyID: string): number[]
|
|
1651
|
+
derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey
|
|
1652
|
+
derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey
|
|
1653
|
+
deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey
|
|
1654
|
+
revealCounterpartySecret(counterparty: Counterparty): number[]
|
|
1655
|
+
revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[]
|
|
1340
1656
|
}
|
|
1341
1657
|
```
|
|
1342
1658
|
|
|
1343
|
-
See also: [PrivateKey](#class-privatekey), [PublicKey](#class-publickey), [
|
|
1659
|
+
See also: [Counterparty](#type-counterparty), [PrivateKey](#class-privatekey), [PublicKey](#class-publickey), [SymmetricKey](#class-symmetrickey), [WalletProtocol](#type-walletprotocol)
|
|
1344
1660
|
|
|
1345
1661
|
<details>
|
|
1346
1662
|
|
|
@@ -1370,12 +1686,9 @@ Derives a private key based on protocol ID, key ID, and counterparty.
|
|
|
1370
1686
|
Caches the result for future calls with the same parameters.
|
|
1371
1687
|
|
|
1372
1688
|
```ts
|
|
1373
|
-
derivePrivateKey(protocolID:
|
|
1374
|
-
SecurityLevel,
|
|
1375
|
-
string
|
|
1376
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): PrivateKey
|
|
1689
|
+
derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey
|
|
1377
1690
|
```
|
|
1378
|
-
See also: [
|
|
1691
|
+
See also: [Counterparty](#type-counterparty), [PrivateKey](#class-privatekey), [WalletProtocol](#type-walletprotocol)
|
|
1379
1692
|
|
|
1380
1693
|
Returns
|
|
1381
1694
|
|
|
@@ -1396,12 +1709,9 @@ Derives a public key based on protocol ID, key ID, and counterparty.
|
|
|
1396
1709
|
Caches the result for future calls with the same parameters.
|
|
1397
1710
|
|
|
1398
1711
|
```ts
|
|
1399
|
-
derivePublicKey(protocolID:
|
|
1400
|
-
SecurityLevel,
|
|
1401
|
-
string
|
|
1402
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone", forSelf: boolean = false): PublicKey
|
|
1712
|
+
derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey
|
|
1403
1713
|
```
|
|
1404
|
-
See also: [PublicKey](#class-publickey), [
|
|
1714
|
+
See also: [Counterparty](#type-counterparty), [PublicKey](#class-publickey), [WalletProtocol](#type-walletprotocol)
|
|
1405
1715
|
|
|
1406
1716
|
Returns
|
|
1407
1717
|
|
|
@@ -1424,12 +1734,9 @@ Derives a symmetric key based on protocol ID, key ID, and counterparty.
|
|
|
1424
1734
|
Caches the result for future calls with the same parameters.
|
|
1425
1735
|
|
|
1426
1736
|
```ts
|
|
1427
|
-
deriveSymmetricKey(protocolID:
|
|
1428
|
-
SecurityLevel,
|
|
1429
|
-
string
|
|
1430
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): SymmetricKey
|
|
1737
|
+
deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey
|
|
1431
1738
|
```
|
|
1432
|
-
See also: [
|
|
1739
|
+
See also: [Counterparty](#type-counterparty), [SymmetricKey](#class-symmetrickey), [WalletProtocol](#type-walletprotocol)
|
|
1433
1740
|
|
|
1434
1741
|
Returns
|
|
1435
1742
|
|
|
@@ -1454,9 +1761,9 @@ Reveals the shared secret between the root key and the counterparty.
|
|
|
1454
1761
|
Caches the result for future calls with the same parameters.
|
|
1455
1762
|
|
|
1456
1763
|
```ts
|
|
1457
|
-
revealCounterpartySecret(counterparty:
|
|
1764
|
+
revealCounterpartySecret(counterparty: Counterparty): number[]
|
|
1458
1765
|
```
|
|
1459
|
-
See also: [
|
|
1766
|
+
See also: [Counterparty](#type-counterparty)
|
|
1460
1767
|
|
|
1461
1768
|
Returns
|
|
1462
1769
|
|
|
@@ -1477,12 +1784,9 @@ Reveals the specific key association for a given protocol ID, key ID, and counte
|
|
|
1477
1784
|
Caches the result for future calls with the same parameters.
|
|
1478
1785
|
|
|
1479
1786
|
```ts
|
|
1480
|
-
revealSpecificSecret(counterparty:
|
|
1481
|
-
SecurityLevel,
|
|
1482
|
-
string
|
|
1483
|
-
], keyID: string): number[]
|
|
1787
|
+
revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[]
|
|
1484
1788
|
```
|
|
1485
|
-
See also: [
|
|
1789
|
+
See also: [Counterparty](#type-counterparty), [WalletProtocol](#type-walletprotocol)
|
|
1486
1790
|
|
|
1487
1791
|
Returns
|
|
1488
1792
|
|
|
@@ -1681,695 +1985,284 @@ export default class HTTPWalletJSON implements Wallet {
|
|
|
1681
1985
|
async proveCertificate(args: ProveCertificateArgs): Promise<ProveCertificateResult>
|
|
1682
1986
|
async relinquishCertificate(args: {
|
|
1683
1987
|
type: Base64String;
|
|
1684
|
-
serialNumber: Base64String;
|
|
1685
|
-
certifier: PubKeyHex;
|
|
1686
|
-
}): Promise<{
|
|
1687
|
-
relinquished: true;
|
|
1688
|
-
}>
|
|
1689
|
-
async discoverByIdentityKey(args: {
|
|
1690
|
-
seekPermission?: BooleanDefaultTrue;
|
|
1691
|
-
identityKey: PubKeyHex;
|
|
1692
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
1693
|
-
offset?: PositiveIntegerOrZero;
|
|
1694
|
-
}): Promise<DiscoverCertificatesResult>
|
|
1695
|
-
async discoverByAttributes(args: {
|
|
1696
|
-
seekPermission?: BooleanDefaultTrue;
|
|
1697
|
-
attributes: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
1698
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
1699
|
-
offset?: PositiveIntegerOrZero;
|
|
1700
|
-
}): Promise<DiscoverCertificatesResult>
|
|
1701
|
-
async isAuthenticated(args: {}): Promise<{
|
|
1702
|
-
authenticated: boolean;
|
|
1703
|
-
}>
|
|
1704
|
-
async waitForAuthentication(args: {}): Promise<{
|
|
1705
|
-
authenticated: true;
|
|
1706
|
-
}>
|
|
1707
|
-
async getHeight(args: {}): Promise<{
|
|
1708
|
-
height: PositiveInteger;
|
|
1709
|
-
}>
|
|
1710
|
-
async getHeaderForHeight(args: {
|
|
1711
|
-
height: PositiveInteger;
|
|
1712
|
-
}): Promise<{
|
|
1713
|
-
header: HexString;
|
|
1714
|
-
}>
|
|
1715
|
-
async getNetwork(args: {}): Promise<{
|
|
1716
|
-
network: "mainnet" | "testnet";
|
|
1717
|
-
}>
|
|
1718
|
-
async getVersion(args: {}): Promise<{
|
|
1719
|
-
version: VersionString7To30Bytes;
|
|
1720
|
-
}>
|
|
1721
|
-
}
|
|
1722
|
-
```
|
|
1723
|
-
|
|
1724
|
-
See also: [AcquireCertificateArgs](#interface-acquirecertificateargs), [AcquireCertificateResult](#interface-acquirecertificateresult), [Base64String](#type-base64string), [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [BooleanDefaultFalse](#type-booleandefaultfalse), [BooleanDefaultTrue](#type-booleandefaulttrue), [Byte](#type-byte), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [CreateActionArgs](#interface-createactionargs), [CreateActionResult](#interface-createactionresult), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [DiscoverCertificatesResult](#interface-discovercertificatesresult), [HexString](#type-hexstring), [ISOTimestampString](#type-isotimestampstring), [InternalizeActionArgs](#interface-internalizeactionargs), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [ListActionsArgs](#interface-listactionsargs), [ListActionsResult](#interface-listactionsresult), [ListCertificatesResult](#interface-listcertificatesresult), [ListOutputsArgs](#interface-listoutputsargs), [ListOutputsResult](#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [OutpointString](#type-outpointstring), [PositiveInteger](#type-positiveinteger), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](#type-positiveintegerorzero), [ProtocolString5To400Bytes](#type-protocolstring5to400bytes), [ProveCertificateArgs](#interface-provecertificateargs), [ProveCertificateResult](#interface-provecertificateresult), [PubKeyHex](#type-pubkeyhex), [SecurityLevel](#type-securitylevel), [SignActionArgs](#interface-signactionargs), [SignActionResult](#interface-signactionresult), [VersionString7To30Bytes](#type-versionstring7to30bytes), [Wallet](#interface-wallet), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
1725
|
-
|
|
1726
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1727
|
-
|
|
1728
|
-
---
|
|
1729
|
-
### Class: HTTPWalletWire
|
|
1730
|
-
|
|
1731
|
-
```ts
|
|
1732
|
-
export default class HTTPWalletWire implements WalletWire {
|
|
1733
|
-
baseUrl: string;
|
|
1734
|
-
httpClient: typeof fetch;
|
|
1735
|
-
originator: string | undefined;
|
|
1736
|
-
constructor(originator: string | undefined, baseUrl: string = "http://localhost:3301", httpClient = fetch)
|
|
1737
|
-
async transmitToWallet(message: number[]): Promise<number[]>
|
|
1738
|
-
}
|
|
1739
|
-
```
|
|
1740
|
-
|
|
1741
|
-
See also: [WalletWire](#interface-walletwire)
|
|
1742
|
-
|
|
1743
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1744
|
-
|
|
1745
|
-
---
|
|
1746
|
-
### Class: KeyDeriver
|
|
1747
|
-
|
|
1748
|
-
Class responsible for deriving various types of keys using a root private key.
|
|
1749
|
-
It supports deriving public and private keys, symmetric keys, and revealing key linkages.
|
|
1750
|
-
|
|
1751
|
-
```ts
|
|
1752
|
-
export default class KeyDeriver {
|
|
1753
|
-
rootKey: PrivateKey;
|
|
1754
|
-
constructor(rootKey: PrivateKey | "anyone")
|
|
1755
|
-
derivePublicKey(protocolID: [
|
|
1756
|
-
SecurityLevel,
|
|
1757
|
-
string
|
|
1758
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone", forSelf: boolean = false): PublicKey
|
|
1759
|
-
derivePrivateKey(protocolID: [
|
|
1760
|
-
SecurityLevel,
|
|
1761
|
-
string
|
|
1762
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): PrivateKey
|
|
1763
|
-
deriveSymmetricKey(protocolID: [
|
|
1764
|
-
SecurityLevel,
|
|
1765
|
-
string
|
|
1766
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): SymmetricKey
|
|
1767
|
-
revealCounterpartySecret(counterparty: PublicKey | string | "self" | "anyone"): number[]
|
|
1768
|
-
revealSpecificSecret(counterparty: PublicKey | string | "self" | "anyone", protocolID: [
|
|
1769
|
-
SecurityLevel,
|
|
1770
|
-
string
|
|
1771
|
-
], keyID: string): number[]
|
|
1772
|
-
}
|
|
1773
|
-
```
|
|
1774
|
-
|
|
1775
|
-
See also: [PrivateKey](#class-privatekey), [PublicKey](#class-publickey), [SecurityLevel](#type-securitylevel), [SymmetricKey](#class-symmetrickey)
|
|
1776
|
-
|
|
1777
|
-
<details>
|
|
1778
|
-
|
|
1779
|
-
<summary>Class KeyDeriver Details</summary>
|
|
1780
|
-
|
|
1781
|
-
#### Constructor
|
|
1782
|
-
|
|
1783
|
-
Initializes the KeyDeriver instance with a root private key.
|
|
1784
|
-
|
|
1785
|
-
```ts
|
|
1786
|
-
constructor(rootKey: PrivateKey | "anyone")
|
|
1787
|
-
```
|
|
1788
|
-
See also: [PrivateKey](#class-privatekey)
|
|
1789
|
-
|
|
1790
|
-
Argument Details
|
|
1791
|
-
|
|
1792
|
-
+ **rootKey**
|
|
1793
|
-
+ The root private key or the string 'anyone'.
|
|
1794
|
-
|
|
1795
|
-
#### Method derivePrivateKey
|
|
1796
|
-
|
|
1797
|
-
Derives a private key based on protocol ID, key ID, and counterparty.
|
|
1798
|
-
|
|
1799
|
-
```ts
|
|
1800
|
-
derivePrivateKey(protocolID: [
|
|
1801
|
-
SecurityLevel,
|
|
1802
|
-
string
|
|
1803
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): PrivateKey
|
|
1804
|
-
```
|
|
1805
|
-
See also: [PrivateKey](#class-privatekey), [PublicKey](#class-publickey), [SecurityLevel](#type-securitylevel)
|
|
1806
|
-
|
|
1807
|
-
Returns
|
|
1808
|
-
|
|
1809
|
-
- The derived private key.
|
|
1810
|
-
|
|
1811
|
-
Argument Details
|
|
1812
|
-
|
|
1813
|
-
+ **protocolID**
|
|
1814
|
-
+ The protocol ID including a security level and protocol name.
|
|
1815
|
-
+ **keyID**
|
|
1816
|
-
+ The key identifier.
|
|
1817
|
-
+ **counterparty**
|
|
1818
|
-
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
1819
|
-
|
|
1820
|
-
#### Method derivePublicKey
|
|
1821
|
-
|
|
1822
|
-
Derives a public key based on protocol ID, key ID, and counterparty.
|
|
1823
|
-
|
|
1824
|
-
```ts
|
|
1825
|
-
derivePublicKey(protocolID: [
|
|
1826
|
-
SecurityLevel,
|
|
1827
|
-
string
|
|
1828
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone", forSelf: boolean = false): PublicKey
|
|
1829
|
-
```
|
|
1830
|
-
See also: [PublicKey](#class-publickey), [SecurityLevel](#type-securitylevel)
|
|
1831
|
-
|
|
1832
|
-
Returns
|
|
1833
|
-
|
|
1834
|
-
- The derived public key.
|
|
1835
|
-
|
|
1836
|
-
Argument Details
|
|
1837
|
-
|
|
1838
|
-
+ **protocolID**
|
|
1839
|
-
+ The protocol ID including a security level and protocol name.
|
|
1840
|
-
+ **keyID**
|
|
1841
|
-
+ The key identifier.
|
|
1842
|
-
+ **counterparty**
|
|
1843
|
-
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
1844
|
-
+ **forSelf**
|
|
1845
|
-
+ Whether deriving for self.
|
|
1846
|
-
|
|
1847
|
-
#### Method deriveSymmetricKey
|
|
1848
|
-
|
|
1849
|
-
Derives a symmetric key based on protocol ID, key ID, and counterparty.
|
|
1850
|
-
Note: Symmetric keys should not be derivable by everyone due to security risks.
|
|
1851
|
-
|
|
1852
|
-
```ts
|
|
1853
|
-
deriveSymmetricKey(protocolID: [
|
|
1854
|
-
SecurityLevel,
|
|
1855
|
-
string
|
|
1856
|
-
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): SymmetricKey
|
|
1857
|
-
```
|
|
1858
|
-
See also: [PublicKey](#class-publickey), [SecurityLevel](#type-securitylevel), [SymmetricKey](#class-symmetrickey)
|
|
1859
|
-
|
|
1860
|
-
Returns
|
|
1861
|
-
|
|
1862
|
-
- The derived symmetric key.
|
|
1863
|
-
|
|
1864
|
-
Argument Details
|
|
1865
|
-
|
|
1866
|
-
+ **protocolID**
|
|
1867
|
-
+ The protocol ID including a security level and protocol name.
|
|
1868
|
-
+ **keyID**
|
|
1869
|
-
+ The key identifier.
|
|
1870
|
-
+ **counterparty**
|
|
1871
|
-
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
1872
|
-
|
|
1873
|
-
Throws
|
|
1874
|
-
|
|
1875
|
-
- Throws an error if attempting to derive a symmetric key for 'anyone'.
|
|
1876
|
-
|
|
1877
|
-
#### Method revealCounterpartySecret
|
|
1878
|
-
|
|
1879
|
-
Reveals the shared secret between the root key and the counterparty.
|
|
1880
|
-
Note: This should not be used for 'self'.
|
|
1881
|
-
|
|
1882
|
-
```ts
|
|
1883
|
-
revealCounterpartySecret(counterparty: PublicKey | string | "self" | "anyone"): number[]
|
|
1884
|
-
```
|
|
1885
|
-
See also: [PublicKey](#class-publickey)
|
|
1886
|
-
|
|
1887
|
-
Returns
|
|
1888
|
-
|
|
1889
|
-
- The shared secret as a number array.
|
|
1890
|
-
|
|
1891
|
-
Argument Details
|
|
1892
|
-
|
|
1893
|
-
+ **counterparty**
|
|
1894
|
-
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
1895
|
-
|
|
1896
|
-
Throws
|
|
1897
|
-
|
|
1898
|
-
- Throws an error if attempting to reveal a shared secret for 'self'.
|
|
1899
|
-
|
|
1900
|
-
#### Method revealSpecificSecret
|
|
1901
|
-
|
|
1902
|
-
Reveals the specific key association for a given protocol ID, key ID, and counterparty.
|
|
1903
|
-
|
|
1904
|
-
```ts
|
|
1905
|
-
revealSpecificSecret(counterparty: PublicKey | string | "self" | "anyone", protocolID: [
|
|
1906
|
-
SecurityLevel,
|
|
1907
|
-
string
|
|
1908
|
-
], keyID: string): number[]
|
|
1909
|
-
```
|
|
1910
|
-
See also: [PublicKey](#class-publickey), [SecurityLevel](#type-securitylevel)
|
|
1911
|
-
|
|
1912
|
-
Returns
|
|
1913
|
-
|
|
1914
|
-
- The specific key association as a number array.
|
|
1915
|
-
|
|
1916
|
-
Argument Details
|
|
1917
|
-
|
|
1918
|
-
+ **counterparty**
|
|
1919
|
-
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
1920
|
-
+ **protocolID**
|
|
1921
|
-
+ The protocol ID including a security level and protocol name.
|
|
1922
|
-
+ **keyID**
|
|
1923
|
-
+ The key identifier.
|
|
1924
|
-
|
|
1925
|
-
</details>
|
|
1926
|
-
|
|
1927
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1928
|
-
|
|
1929
|
-
---
|
|
1930
|
-
### Class: ProtoWallet
|
|
1931
|
-
|
|
1932
|
-
A ProtoWallet is a structure that fulfills the Wallet interface, capable of performing all foundational cryptographic operations. It can derive keys, create signatures, facilitate encryption and HMAC operations, and reveal key linkages. However, ProtoWallet does not create transactions, manage outputs, interact with the blockchain, enable the management of identity certificates, or store any data.
|
|
1933
|
-
|
|
1934
|
-
```ts
|
|
1935
|
-
export default class ProtoWallet implements Wallet {
|
|
1936
|
-
keyDeriver: KeyDeriver;
|
|
1937
|
-
privilegedError: string = "ProtoWallet is a single-keyring wallet, operating without context about whether its configured keyring is privileged.";
|
|
1938
|
-
constructor(rootKey: PrivateKey | "anyone", KeyDeriverClass = KeyDeriver)
|
|
1939
|
-
async createAction(args: {
|
|
1940
|
-
description: DescriptionString5to50Bytes;
|
|
1941
|
-
inputs?: Array<{
|
|
1942
|
-
tx?: BEEF;
|
|
1943
|
-
outpoint: OutpointString;
|
|
1944
|
-
unlockingScript?: HexString;
|
|
1945
|
-
unlockingScriptLength?: PositiveInteger;
|
|
1946
|
-
inputDescription: DescriptionString5to50Bytes;
|
|
1947
|
-
sequenceNumber?: PositiveIntegerOrZero;
|
|
1948
|
-
}>;
|
|
1949
|
-
outputs?: Array<{
|
|
1950
|
-
lockingScript: HexString;
|
|
1951
|
-
satoshis: SatoshiValue;
|
|
1952
|
-
outputDescription: DescriptionString5to50Bytes;
|
|
1953
|
-
basket?: BasketStringUnder300Bytes;
|
|
1954
|
-
customInstructions?: string;
|
|
1955
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
1956
|
-
}>;
|
|
1957
|
-
lockTime?: PositiveIntegerOrZero;
|
|
1958
|
-
version?: PositiveIntegerOrZero;
|
|
1959
|
-
labels?: LabelStringUnder300Bytes[];
|
|
1960
|
-
options?: {
|
|
1961
|
-
signAndProcess?: BooleanDefaultTrue;
|
|
1962
|
-
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
1963
|
-
trustSelf?: "known";
|
|
1964
|
-
knownTxids?: TXIDHexString[];
|
|
1965
|
-
returnTXIDOnly?: BooleanDefaultFalse;
|
|
1966
|
-
noSend?: BooleanDefaultFalse;
|
|
1967
|
-
noSendChange?: OutpointString[];
|
|
1968
|
-
sendWith?: TXIDHexString[];
|
|
1969
|
-
randomizeOutputs?: BooleanDefaultTrue;
|
|
1970
|
-
};
|
|
1971
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
1972
|
-
txid?: TXIDHexString;
|
|
1973
|
-
tx?: BEEF;
|
|
1974
|
-
noSendChange?: OutpointString[];
|
|
1975
|
-
sendWithResults?: Array<{
|
|
1976
|
-
txid: TXIDHexString;
|
|
1977
|
-
status: "unproven" | "sending" | "failed";
|
|
1978
|
-
}>;
|
|
1979
|
-
signableTransaction?: {
|
|
1980
|
-
tx: BEEF;
|
|
1981
|
-
reference: Base64String;
|
|
1982
|
-
};
|
|
1983
|
-
}>
|
|
1984
|
-
async signAction(args: {
|
|
1985
|
-
spends: Record<PositiveIntegerOrZero, {
|
|
1986
|
-
unlockingScript: HexString;
|
|
1987
|
-
sequenceNumber?: PositiveIntegerOrZero;
|
|
1988
|
-
}>;
|
|
1989
|
-
reference: Base64String;
|
|
1990
|
-
options?: {
|
|
1991
|
-
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
1992
|
-
returnTXIDOnly?: BooleanDefaultFalse;
|
|
1993
|
-
noSend?: BooleanDefaultFalse;
|
|
1994
|
-
noSendChange?: OutpointString[];
|
|
1995
|
-
sendWith?: TXIDHexString[];
|
|
1996
|
-
};
|
|
1997
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
1998
|
-
txid?: TXIDHexString;
|
|
1999
|
-
tx?: BEEF;
|
|
2000
|
-
noSendChange?: OutpointString[];
|
|
2001
|
-
sendWithResults?: Array<{
|
|
2002
|
-
txid: TXIDHexString;
|
|
2003
|
-
status: "unproven" | "sending" | "failed";
|
|
2004
|
-
}>;
|
|
2005
|
-
}>
|
|
2006
|
-
async abortAction(args: {
|
|
2007
|
-
reference: Base64String;
|
|
2008
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2009
|
-
aborted: true;
|
|
2010
|
-
}>
|
|
2011
|
-
async listActions(args: {
|
|
2012
|
-
labels: LabelStringUnder300Bytes[];
|
|
2013
|
-
labelQueryMode?: "any" | "all";
|
|
2014
|
-
includeLabels?: BooleanDefaultFalse;
|
|
2015
|
-
includeInputs?: BooleanDefaultFalse;
|
|
2016
|
-
includeInputSourceLockingScripts?: BooleanDefaultFalse;
|
|
2017
|
-
includeInputUnlockingScripts?: BooleanDefaultFalse;
|
|
2018
|
-
includeOutputs?: BooleanDefaultFalse;
|
|
2019
|
-
includeOutputLockingScripts?: BooleanDefaultFalse;
|
|
2020
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
2021
|
-
offset?: PositiveIntegerOrZero;
|
|
2022
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2023
|
-
totalActions: PositiveIntegerOrZero;
|
|
2024
|
-
actions: Array<{
|
|
2025
|
-
txid: TXIDHexString;
|
|
2026
|
-
satoshis: SatoshiValue;
|
|
2027
|
-
status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal";
|
|
2028
|
-
isOutgoing: boolean;
|
|
2029
|
-
description: DescriptionString5to50Bytes;
|
|
2030
|
-
labels?: LabelStringUnder300Bytes[];
|
|
2031
|
-
version: PositiveIntegerOrZero;
|
|
2032
|
-
lockTime: PositiveIntegerOrZero;
|
|
2033
|
-
inputs?: Array<{
|
|
2034
|
-
sourceOutpoint: OutpointString;
|
|
2035
|
-
sourceSatoshis: SatoshiValue;
|
|
2036
|
-
sourceLockingScript?: HexString;
|
|
2037
|
-
unlockingScript?: HexString;
|
|
2038
|
-
inputDescription: DescriptionString5to50Bytes;
|
|
2039
|
-
sequenceNumber: PositiveIntegerOrZero;
|
|
2040
|
-
}>;
|
|
2041
|
-
outputs?: Array<{
|
|
2042
|
-
outputIndex: PositiveIntegerOrZero;
|
|
2043
|
-
satoshis: SatoshiValue;
|
|
2044
|
-
lockingScript?: HexString;
|
|
2045
|
-
spendable: boolean;
|
|
2046
|
-
outputDescription: DescriptionString5to50Bytes;
|
|
2047
|
-
basket: BasketStringUnder300Bytes;
|
|
2048
|
-
tags: OutputTagStringUnder300Bytes[];
|
|
2049
|
-
customInstructions?: string;
|
|
2050
|
-
}>;
|
|
2051
|
-
}>;
|
|
2052
|
-
}>
|
|
2053
|
-
async internalizeAction(args: {
|
|
2054
|
-
tx: BEEF;
|
|
2055
|
-
outputs: Array<{
|
|
2056
|
-
outputIndex: PositiveIntegerOrZero;
|
|
2057
|
-
protocol: "wallet payment" | "basket insertion";
|
|
2058
|
-
paymentRemittance?: {
|
|
2059
|
-
derivationPrefix: Base64String;
|
|
2060
|
-
derivationSuffix: Base64String;
|
|
2061
|
-
senderIdentityKey: PubKeyHex;
|
|
2062
|
-
};
|
|
2063
|
-
insertionRemittance?: {
|
|
2064
|
-
basket: BasketStringUnder300Bytes;
|
|
2065
|
-
customInstructions?: string;
|
|
2066
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
2067
|
-
};
|
|
2068
|
-
}>;
|
|
2069
|
-
description: DescriptionString5to50Bytes;
|
|
2070
|
-
labels?: LabelStringUnder300Bytes[];
|
|
2071
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2072
|
-
accepted: true;
|
|
2073
|
-
}>
|
|
2074
|
-
async listOutputs(args: {
|
|
2075
|
-
basket: BasketStringUnder300Bytes;
|
|
2076
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
2077
|
-
tagQueryMode?: "all" | "any";
|
|
2078
|
-
include?: "locking scripts" | "entire transactions";
|
|
2079
|
-
includeCustomInstructions?: BooleanDefaultFalse;
|
|
2080
|
-
includeTags?: BooleanDefaultFalse;
|
|
2081
|
-
includeLabels?: BooleanDefaultFalse;
|
|
2082
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
2083
|
-
offset?: PositiveIntegerOrZero;
|
|
2084
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2085
|
-
totalOutputs: PositiveIntegerOrZero;
|
|
2086
|
-
outputs: Array<{
|
|
2087
|
-
outpoint: OutpointString;
|
|
2088
|
-
satoshis: SatoshiValue;
|
|
2089
|
-
lockingScript?: HexString;
|
|
2090
|
-
tx?: BEEF;
|
|
2091
|
-
spendable: true;
|
|
2092
|
-
customInstructions?: string;
|
|
2093
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
2094
|
-
labels?: LabelStringUnder300Bytes[];
|
|
2095
|
-
}>;
|
|
2096
|
-
}>
|
|
2097
|
-
async relinquishOutput(args: {
|
|
2098
|
-
basket: BasketStringUnder300Bytes;
|
|
2099
|
-
output: OutpointString;
|
|
2100
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2101
|
-
relinquished: true;
|
|
2102
|
-
}>
|
|
2103
|
-
async getPublicKey(args: {
|
|
2104
|
-
identityKey?: true;
|
|
2105
|
-
protocolID?: [
|
|
2106
|
-
SecurityLevel,
|
|
2107
|
-
ProtocolString5To400Bytes
|
|
2108
|
-
];
|
|
2109
|
-
keyID?: KeyIDStringUnder800Bytes;
|
|
2110
|
-
privileged?: BooleanDefaultFalse;
|
|
2111
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2112
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2113
|
-
forSelf?: BooleanDefaultFalse;
|
|
2114
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2115
|
-
publicKey: PubKeyHex;
|
|
2116
|
-
}>
|
|
2117
|
-
async revealCounterpartyKeyLinkage(args: {
|
|
2118
|
-
counterparty: PubKeyHex;
|
|
2119
|
-
verifier: PubKeyHex;
|
|
2120
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2121
|
-
privileged?: BooleanDefaultFalse;
|
|
2122
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2123
|
-
prover: PubKeyHex;
|
|
2124
|
-
verifier: PubKeyHex;
|
|
2125
|
-
counterparty: PubKeyHex;
|
|
2126
|
-
revelationTime: ISOTimestampString;
|
|
2127
|
-
encryptedLinkage: Byte[];
|
|
2128
|
-
encryptedLinkageProof: Byte[];
|
|
2129
|
-
}>
|
|
2130
|
-
async revealSpecificKeyLinkage(args: {
|
|
2131
|
-
counterparty: PubKeyHex;
|
|
2132
|
-
verifier: PubKeyHex;
|
|
2133
|
-
protocolID: [
|
|
2134
|
-
SecurityLevel,
|
|
2135
|
-
ProtocolString5To400Bytes
|
|
2136
|
-
];
|
|
2137
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
2138
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2139
|
-
privileged?: BooleanDefaultFalse;
|
|
2140
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2141
|
-
prover: PubKeyHex;
|
|
2142
|
-
verifier: PubKeyHex;
|
|
2143
|
-
counterparty: PubKeyHex;
|
|
2144
|
-
protocolID: [
|
|
2145
|
-
SecurityLevel,
|
|
2146
|
-
ProtocolString5To400Bytes
|
|
2147
|
-
];
|
|
2148
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
2149
|
-
encryptedLinkage: Byte[];
|
|
2150
|
-
encryptedLinkageProof: Byte[];
|
|
2151
|
-
proofType: Byte;
|
|
2152
|
-
}>
|
|
2153
|
-
async encrypt(args: {
|
|
2154
|
-
plaintext: Byte[];
|
|
2155
|
-
protocolID: [
|
|
2156
|
-
SecurityLevel,
|
|
2157
|
-
ProtocolString5To400Bytes
|
|
2158
|
-
];
|
|
2159
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
2160
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2161
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2162
|
-
privileged?: BooleanDefaultFalse;
|
|
2163
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2164
|
-
ciphertext: Byte[];
|
|
2165
|
-
}>
|
|
2166
|
-
async decrypt(args: {
|
|
2167
|
-
ciphertext: Byte[];
|
|
2168
|
-
protocolID: [
|
|
2169
|
-
SecurityLevel,
|
|
2170
|
-
ProtocolString5To400Bytes
|
|
2171
|
-
];
|
|
2172
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
2173
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2174
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2175
|
-
privileged?: BooleanDefaultFalse;
|
|
2176
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2177
|
-
plaintext: Byte[];
|
|
2178
|
-
}>
|
|
2179
|
-
async createHmac(args: {
|
|
2180
|
-
data: Byte[];
|
|
2181
|
-
protocolID: [
|
|
2182
|
-
SecurityLevel,
|
|
2183
|
-
ProtocolString5To400Bytes
|
|
2184
|
-
];
|
|
2185
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
2186
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2187
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2188
|
-
privileged?: BooleanDefaultFalse;
|
|
2189
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2190
|
-
hmac: Byte[];
|
|
2191
|
-
}>
|
|
2192
|
-
async verifyHmac(args: {
|
|
2193
|
-
data: Byte[];
|
|
2194
|
-
hmac: Byte[];
|
|
2195
|
-
protocolID: [
|
|
2196
|
-
SecurityLevel,
|
|
2197
|
-
ProtocolString5To400Bytes
|
|
2198
|
-
];
|
|
2199
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
2200
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2201
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2202
|
-
privileged?: BooleanDefaultFalse;
|
|
2203
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2204
|
-
valid: true;
|
|
2205
|
-
}>
|
|
2206
|
-
async createSignature(args: {
|
|
2207
|
-
data?: Byte[];
|
|
2208
|
-
hashToDirectlySign?: Byte[];
|
|
2209
|
-
protocolID: [
|
|
2210
|
-
SecurityLevel,
|
|
2211
|
-
ProtocolString5To400Bytes
|
|
2212
|
-
];
|
|
2213
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
2214
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2215
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2216
|
-
privileged?: BooleanDefaultFalse;
|
|
2217
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2218
|
-
signature: Byte[];
|
|
2219
|
-
}>
|
|
2220
|
-
async verifySignature(args: {
|
|
2221
|
-
data?: Byte[];
|
|
2222
|
-
hashToDirectlyVerify?: Byte[];
|
|
2223
|
-
signature: Byte[];
|
|
2224
|
-
protocolID: [
|
|
2225
|
-
SecurityLevel,
|
|
2226
|
-
ProtocolString5To400Bytes
|
|
2227
|
-
];
|
|
2228
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
2229
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2230
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2231
|
-
forSelf?: BooleanDefaultFalse;
|
|
2232
|
-
privileged?: BooleanDefaultFalse;
|
|
2233
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2234
|
-
valid: true;
|
|
2235
|
-
}>
|
|
2236
|
-
async acquireCertificate(args: {
|
|
2237
|
-
type: Base64String;
|
|
2238
|
-
certifier: PubKeyHex;
|
|
2239
|
-
acquisitionProtocol: "direct" | "issuance";
|
|
2240
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2241
|
-
serialNumber?: Base64String;
|
|
2242
|
-
revocationOutpoint?: OutpointString;
|
|
2243
|
-
signature?: HexString;
|
|
2244
|
-
certifierUrl?: string;
|
|
2245
|
-
keyringRevealer?: PubKeyHex | "certifier";
|
|
2246
|
-
keyringForSubject?: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2247
|
-
privileged?: BooleanDefaultFalse;
|
|
2248
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2249
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2250
|
-
type: Base64String;
|
|
2251
|
-
subject: PubKeyHex;
|
|
2252
|
-
serialNumber: Base64String;
|
|
2253
|
-
certifier: PubKeyHex;
|
|
2254
|
-
revocationOutpoint: OutpointString;
|
|
2255
|
-
signature: HexString;
|
|
2256
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2257
|
-
}>
|
|
2258
|
-
async listCertificates(args: {
|
|
2259
|
-
certifiers: PubKeyHex[];
|
|
2260
|
-
types: Base64String[];
|
|
2261
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
2262
|
-
offset?: PositiveIntegerOrZero;
|
|
2263
|
-
privileged?: BooleanDefaultFalse;
|
|
2264
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2265
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2266
|
-
totalCertificates: PositiveIntegerOrZero;
|
|
2267
|
-
certificates: Array<{
|
|
2268
|
-
type: Base64String;
|
|
2269
|
-
subject: PubKeyHex;
|
|
2270
|
-
serialNumber: Base64String;
|
|
2271
|
-
certifier: PubKeyHex;
|
|
2272
|
-
revocationOutpoint: OutpointString;
|
|
2273
|
-
signature: HexString;
|
|
2274
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2275
|
-
}>;
|
|
2276
|
-
}>
|
|
2277
|
-
async proveCertificate(args: {
|
|
2278
|
-
certificate: {
|
|
2279
|
-
type: Base64String;
|
|
2280
|
-
subject: PubKeyHex;
|
|
2281
|
-
serialNumber: Base64String;
|
|
2282
|
-
certifier: PubKeyHex;
|
|
2283
|
-
revocationOutpoint: OutpointString;
|
|
2284
|
-
signature: HexString;
|
|
2285
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2286
|
-
};
|
|
2287
|
-
fieldsToReveal: CertificateFieldNameUnder50Bytes[];
|
|
2288
|
-
verifier: PubKeyHex;
|
|
2289
|
-
privileged?: BooleanDefaultFalse;
|
|
2290
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2291
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2292
|
-
keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2293
|
-
}>
|
|
2294
|
-
async relinquishCertificate(args: {
|
|
2295
|
-
type: Base64String;
|
|
2296
|
-
serialNumber: Base64String;
|
|
2297
|
-
certifier: PubKeyHex;
|
|
2298
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2299
|
-
relinquished: true;
|
|
2300
|
-
}>
|
|
2301
|
-
async discoverByIdentityKey(args: {
|
|
2302
|
-
identityKey: PubKeyHex;
|
|
2303
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
2304
|
-
offset?: PositiveIntegerOrZero;
|
|
2305
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2306
|
-
totalCertificates: PositiveIntegerOrZero;
|
|
2307
|
-
certificates: Array<{
|
|
2308
|
-
type: Base64String;
|
|
2309
|
-
subject: PubKeyHex;
|
|
2310
|
-
serialNumber: Base64String;
|
|
2311
|
-
certifier: PubKeyHex;
|
|
2312
|
-
revocationOutpoint: OutpointString;
|
|
2313
|
-
signature: HexString;
|
|
2314
|
-
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2315
|
-
certifierInfo: {
|
|
2316
|
-
name: EntityNameStringMax100Bytes;
|
|
2317
|
-
iconUrl: EntityIconURLStringMax500Bytes;
|
|
2318
|
-
description: DescriptionString5to50Bytes;
|
|
2319
|
-
trust: PositiveIntegerMax10;
|
|
2320
|
-
};
|
|
2321
|
-
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2322
|
-
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2323
|
-
}>;
|
|
1988
|
+
serialNumber: Base64String;
|
|
1989
|
+
certifier: PubKeyHex;
|
|
1990
|
+
}): Promise<{
|
|
1991
|
+
relinquished: true;
|
|
2324
1992
|
}>
|
|
1993
|
+
async discoverByIdentityKey(args: {
|
|
1994
|
+
seekPermission?: BooleanDefaultTrue;
|
|
1995
|
+
identityKey: PubKeyHex;
|
|
1996
|
+
limit?: PositiveIntegerDefault10Max10000;
|
|
1997
|
+
offset?: PositiveIntegerOrZero;
|
|
1998
|
+
}): Promise<DiscoverCertificatesResult>
|
|
2325
1999
|
async discoverByAttributes(args: {
|
|
2000
|
+
seekPermission?: BooleanDefaultTrue;
|
|
2326
2001
|
attributes: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2327
2002
|
limit?: PositiveIntegerDefault10Max10000;
|
|
2328
2003
|
offset?: PositiveIntegerOrZero;
|
|
2329
|
-
}
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
type: Base64String;
|
|
2333
|
-
subject: PubKeyHex;
|
|
2334
|
-
serialNumber: Base64String;
|
|
2335
|
-
certifier: PubKeyHex;
|
|
2336
|
-
revocationOutpoint: OutpointString;
|
|
2337
|
-
signature: HexString;
|
|
2338
|
-
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2339
|
-
certifierInfo: {
|
|
2340
|
-
name: EntityNameStringMax100Bytes;
|
|
2341
|
-
iconUrl: EntityIconURLStringMax500Bytes;
|
|
2342
|
-
description: DescriptionString5to50Bytes;
|
|
2343
|
-
trust: PositiveIntegerMax10;
|
|
2344
|
-
};
|
|
2345
|
-
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2346
|
-
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2347
|
-
}>;
|
|
2348
|
-
}>
|
|
2349
|
-
async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2350
|
-
authenticated: boolean;
|
|
2004
|
+
}): Promise<DiscoverCertificatesResult>
|
|
2005
|
+
async isAuthenticated(args: {}): Promise<{
|
|
2006
|
+
authenticated: true;
|
|
2351
2007
|
}>
|
|
2352
|
-
async waitForAuthentication(args: {}
|
|
2008
|
+
async waitForAuthentication(args: {}): Promise<{
|
|
2353
2009
|
authenticated: true;
|
|
2354
2010
|
}>
|
|
2355
|
-
async getHeight(args: {}
|
|
2011
|
+
async getHeight(args: {}): Promise<{
|
|
2356
2012
|
height: PositiveInteger;
|
|
2357
2013
|
}>
|
|
2358
2014
|
async getHeaderForHeight(args: {
|
|
2359
2015
|
height: PositiveInteger;
|
|
2360
|
-
}
|
|
2016
|
+
}): Promise<{
|
|
2361
2017
|
header: HexString;
|
|
2362
2018
|
}>
|
|
2363
|
-
async getNetwork(args: {}
|
|
2019
|
+
async getNetwork(args: {}): Promise<{
|
|
2364
2020
|
network: "mainnet" | "testnet";
|
|
2365
2021
|
}>
|
|
2366
|
-
async getVersion(args: {}
|
|
2022
|
+
async getVersion(args: {}): Promise<{
|
|
2367
2023
|
version: VersionString7To30Bytes;
|
|
2368
2024
|
}>
|
|
2369
2025
|
}
|
|
2370
2026
|
```
|
|
2371
2027
|
|
|
2372
|
-
See also: [
|
|
2028
|
+
See also: [AcquireCertificateArgs](#interface-acquirecertificateargs), [AcquireCertificateResult](#interface-acquirecertificateresult), [Base64String](#type-base64string), [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [BooleanDefaultFalse](#type-booleandefaultfalse), [BooleanDefaultTrue](#type-booleandefaulttrue), [Byte](#type-byte), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [CreateActionArgs](#interface-createactionargs), [CreateActionResult](#interface-createactionresult), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [DiscoverCertificatesResult](#interface-discovercertificatesresult), [HexString](#type-hexstring), [ISOTimestampString](#type-isotimestampstring), [InternalizeActionArgs](#interface-internalizeactionargs), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [ListActionsArgs](#interface-listactionsargs), [ListActionsResult](#interface-listactionsresult), [ListCertificatesResult](#interface-listcertificatesresult), [ListOutputsArgs](#interface-listoutputsargs), [ListOutputsResult](#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [OutpointString](#type-outpointstring), [PositiveInteger](#type-positiveinteger), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](#type-positiveintegerorzero), [ProtocolString5To400Bytes](#type-protocolstring5to400bytes), [ProveCertificateArgs](#interface-provecertificateargs), [ProveCertificateResult](#interface-provecertificateresult), [PubKeyHex](#type-pubkeyhex), [SecurityLevel](#type-securitylevel), [SignActionArgs](#interface-signactionargs), [SignActionResult](#interface-signactionresult), [VersionString7To30Bytes](#type-versionstring7to30bytes), [Wallet](#interface-wallet), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
2029
|
+
|
|
2030
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
2031
|
+
|
|
2032
|
+
---
|
|
2033
|
+
### Class: HTTPWalletWire
|
|
2034
|
+
|
|
2035
|
+
```ts
|
|
2036
|
+
export default class HTTPWalletWire implements WalletWire {
|
|
2037
|
+
baseUrl: string;
|
|
2038
|
+
httpClient: typeof fetch;
|
|
2039
|
+
originator: string | undefined;
|
|
2040
|
+
constructor(originator: string | undefined, baseUrl: string = "http://localhost:3301", httpClient = fetch)
|
|
2041
|
+
async transmitToWallet(message: number[]): Promise<number[]>
|
|
2042
|
+
}
|
|
2043
|
+
```
|
|
2044
|
+
|
|
2045
|
+
See also: [WalletWire](#interface-walletwire)
|
|
2046
|
+
|
|
2047
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
2048
|
+
|
|
2049
|
+
---
|
|
2050
|
+
### Class: KeyDeriver
|
|
2051
|
+
|
|
2052
|
+
Class responsible for deriving various types of keys using a root private key.
|
|
2053
|
+
It supports deriving public and private keys, symmetric keys, and revealing key linkages.
|
|
2054
|
+
|
|
2055
|
+
```ts
|
|
2056
|
+
export class KeyDeriver implements KeyDeriverApi {
|
|
2057
|
+
rootKey: PrivateKey;
|
|
2058
|
+
identityKey: string;
|
|
2059
|
+
constructor(rootKey: PrivateKey | "anyone")
|
|
2060
|
+
derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey
|
|
2061
|
+
derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey
|
|
2062
|
+
deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey
|
|
2063
|
+
revealCounterpartySecret(counterparty: Counterparty): number[]
|
|
2064
|
+
revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[]
|
|
2065
|
+
}
|
|
2066
|
+
```
|
|
2067
|
+
|
|
2068
|
+
See also: [Counterparty](#type-counterparty), [KeyDeriverApi](#interface-keyderiverapi), [PrivateKey](#class-privatekey), [PublicKey](#class-publickey), [SymmetricKey](#class-symmetrickey), [WalletProtocol](#type-walletprotocol)
|
|
2069
|
+
|
|
2070
|
+
<details>
|
|
2071
|
+
|
|
2072
|
+
<summary>Class KeyDeriver Details</summary>
|
|
2073
|
+
|
|
2074
|
+
#### Constructor
|
|
2075
|
+
|
|
2076
|
+
Initializes the KeyDeriver instance with a root private key.
|
|
2077
|
+
|
|
2078
|
+
```ts
|
|
2079
|
+
constructor(rootKey: PrivateKey | "anyone")
|
|
2080
|
+
```
|
|
2081
|
+
See also: [PrivateKey](#class-privatekey)
|
|
2082
|
+
|
|
2083
|
+
Argument Details
|
|
2084
|
+
|
|
2085
|
+
+ **rootKey**
|
|
2086
|
+
+ The root private key or the string 'anyone'.
|
|
2087
|
+
|
|
2088
|
+
#### Method derivePrivateKey
|
|
2089
|
+
|
|
2090
|
+
Derives a private key based on protocol ID, key ID, and counterparty.
|
|
2091
|
+
|
|
2092
|
+
```ts
|
|
2093
|
+
derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey
|
|
2094
|
+
```
|
|
2095
|
+
See also: [Counterparty](#type-counterparty), [PrivateKey](#class-privatekey), [WalletProtocol](#type-walletprotocol)
|
|
2096
|
+
|
|
2097
|
+
Returns
|
|
2098
|
+
|
|
2099
|
+
- The derived private key.
|
|
2100
|
+
|
|
2101
|
+
Argument Details
|
|
2102
|
+
|
|
2103
|
+
+ **protocolID**
|
|
2104
|
+
+ The protocol ID including a security level and protocol name.
|
|
2105
|
+
+ **keyID**
|
|
2106
|
+
+ The key identifier.
|
|
2107
|
+
+ **counterparty**
|
|
2108
|
+
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
2109
|
+
|
|
2110
|
+
#### Method derivePublicKey
|
|
2111
|
+
|
|
2112
|
+
Derives a public key based on protocol ID, key ID, and counterparty.
|
|
2113
|
+
|
|
2114
|
+
```ts
|
|
2115
|
+
derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey
|
|
2116
|
+
```
|
|
2117
|
+
See also: [Counterparty](#type-counterparty), [PublicKey](#class-publickey), [WalletProtocol](#type-walletprotocol)
|
|
2118
|
+
|
|
2119
|
+
Returns
|
|
2120
|
+
|
|
2121
|
+
- The derived public key.
|
|
2122
|
+
|
|
2123
|
+
Argument Details
|
|
2124
|
+
|
|
2125
|
+
+ **protocolID**
|
|
2126
|
+
+ The protocol ID including a security level and protocol name.
|
|
2127
|
+
+ **keyID**
|
|
2128
|
+
+ The key identifier.
|
|
2129
|
+
+ **counterparty**
|
|
2130
|
+
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
2131
|
+
+ **forSelf**
|
|
2132
|
+
+ Whether deriving for self.
|
|
2133
|
+
|
|
2134
|
+
#### Method deriveSymmetricKey
|
|
2135
|
+
|
|
2136
|
+
Derives a symmetric key based on protocol ID, key ID, and counterparty.
|
|
2137
|
+
Note: Symmetric keys should not be derivable by everyone due to security risks.
|
|
2138
|
+
|
|
2139
|
+
```ts
|
|
2140
|
+
deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey
|
|
2141
|
+
```
|
|
2142
|
+
See also: [Counterparty](#type-counterparty), [SymmetricKey](#class-symmetrickey), [WalletProtocol](#type-walletprotocol)
|
|
2143
|
+
|
|
2144
|
+
Returns
|
|
2145
|
+
|
|
2146
|
+
- The derived symmetric key.
|
|
2147
|
+
|
|
2148
|
+
Argument Details
|
|
2149
|
+
|
|
2150
|
+
+ **protocolID**
|
|
2151
|
+
+ The protocol ID including a security level and protocol name.
|
|
2152
|
+
+ **keyID**
|
|
2153
|
+
+ The key identifier.
|
|
2154
|
+
+ **counterparty**
|
|
2155
|
+
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
2156
|
+
|
|
2157
|
+
Throws
|
|
2158
|
+
|
|
2159
|
+
- Throws an error if attempting to derive a symmetric key for 'anyone'.
|
|
2160
|
+
|
|
2161
|
+
#### Method revealCounterpartySecret
|
|
2162
|
+
|
|
2163
|
+
Reveals the shared secret between the root key and the counterparty.
|
|
2164
|
+
Note: This should not be used for 'self'.
|
|
2165
|
+
|
|
2166
|
+
```ts
|
|
2167
|
+
revealCounterpartySecret(counterparty: Counterparty): number[]
|
|
2168
|
+
```
|
|
2169
|
+
See also: [Counterparty](#type-counterparty)
|
|
2170
|
+
|
|
2171
|
+
Returns
|
|
2172
|
+
|
|
2173
|
+
- The shared secret as a number array.
|
|
2174
|
+
|
|
2175
|
+
Argument Details
|
|
2176
|
+
|
|
2177
|
+
+ **counterparty**
|
|
2178
|
+
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
2179
|
+
|
|
2180
|
+
Throws
|
|
2181
|
+
|
|
2182
|
+
- Throws an error if attempting to reveal a shared secret for 'self'.
|
|
2183
|
+
|
|
2184
|
+
#### Method revealSpecificSecret
|
|
2185
|
+
|
|
2186
|
+
Reveals the specific key association for a given protocol ID, key ID, and counterparty.
|
|
2187
|
+
|
|
2188
|
+
```ts
|
|
2189
|
+
revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[]
|
|
2190
|
+
```
|
|
2191
|
+
See also: [Counterparty](#type-counterparty), [WalletProtocol](#type-walletprotocol)
|
|
2192
|
+
|
|
2193
|
+
Returns
|
|
2194
|
+
|
|
2195
|
+
- The specific key association as a number array.
|
|
2196
|
+
|
|
2197
|
+
Argument Details
|
|
2198
|
+
|
|
2199
|
+
+ **counterparty**
|
|
2200
|
+
+ The counterparty's public key or a predefined value ('self' or 'anyone').
|
|
2201
|
+
+ **protocolID**
|
|
2202
|
+
+ The protocol ID including a security level and protocol name.
|
|
2203
|
+
+ **keyID**
|
|
2204
|
+
+ The key identifier.
|
|
2205
|
+
|
|
2206
|
+
</details>
|
|
2207
|
+
|
|
2208
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
2209
|
+
|
|
2210
|
+
---
|
|
2211
|
+
### Class: ProtoWallet
|
|
2212
|
+
|
|
2213
|
+
A ProtoWallet is precursor to a full wallet, capable of performing all foundational cryptographic operations.
|
|
2214
|
+
It can derive keys, create signatures, facilitate encryption and HMAC operations, and reveal key linkages.
|
|
2215
|
+
|
|
2216
|
+
However, ProtoWallet does not create transactions, manage outputs, interact with the blockchain,
|
|
2217
|
+
enable the management of identity certificates, or store any data.
|
|
2218
|
+
|
|
2219
|
+
```ts
|
|
2220
|
+
export class ProtoWallet implements ProtoWalletApi {
|
|
2221
|
+
keyDeriver: KeyDeriverApi;
|
|
2222
|
+
constructor(rootKeyOrKeyDeriver: PrivateKey | "anyone" | KeyDeriverApi)
|
|
2223
|
+
async isAuthenticated(args: {}, Originator?: OriginatorDomainNameStringUnder250Bytes): Promise<AuthenticatedResult>
|
|
2224
|
+
async waitForAuthentication(args: {}, Originator?: OriginatorDomainNameStringUnder250Bytes): Promise<AuthenticatedResult>
|
|
2225
|
+
async getNetwork(args: {}, Originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetNetworkResult>
|
|
2226
|
+
async getVersion(args: {}, Originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetVersionResult>
|
|
2227
|
+
async getIdentityKey(originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2228
|
+
publicKey: PubKeyHex;
|
|
2229
|
+
}>
|
|
2230
|
+
async getPublicKey(args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2231
|
+
publicKey: PubKeyHex;
|
|
2232
|
+
}>
|
|
2233
|
+
async revealCounterpartyKeyLinkage(args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RevealCounterpartyKeyLinkageResult>
|
|
2234
|
+
async revealSpecificKeyLinkage(args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RevealSpecificKeyLinkageResult>
|
|
2235
|
+
async encrypt(args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<WalletEncryptResult>
|
|
2236
|
+
async decrypt(args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<WalletDecryptResult>
|
|
2237
|
+
async createHmac(args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateHmacResult>
|
|
2238
|
+
async verifyHmac(args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<VerifyHmacResult>
|
|
2239
|
+
async createSignature(args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateSignatureResult>
|
|
2240
|
+
async verifySignature(args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<VerifySignatureResult>
|
|
2241
|
+
}
|
|
2242
|
+
```
|
|
2243
|
+
|
|
2244
|
+
See also: [AuthenticatedResult](#interface-authenticatedresult), [CreateHmacArgs](#interface-createhmacargs), [CreateHmacResult](#interface-createhmacresult), [CreateSignatureArgs](#interface-createsignatureargs), [CreateSignatureResult](#interface-createsignatureresult), [GetNetworkResult](#interface-getnetworkresult), [GetPublicKeyArgs](#interface-getpublickeyargs), [GetVersionResult](#interface-getversionresult), [KeyDeriverApi](#interface-keyderiverapi), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [PrivateKey](#class-privatekey), [ProtoWalletApi](#interface-protowalletapi), [PubKeyHex](#type-pubkeyhex), [RevealCounterpartyKeyLinkageArgs](#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](#interface-revealcounterpartykeylinkageresult), [RevealSpecificKeyLinkageArgs](#interface-revealspecifickeylinkageargs), [RevealSpecificKeyLinkageResult](#interface-revealspecifickeylinkageresult), [VerifyHmacArgs](#interface-verifyhmacargs), [VerifyHmacResult](#interface-verifyhmacresult), [VerifySignatureArgs](#interface-verifysignatureargs), [VerifySignatureResult](#interface-verifysignatureresult), [WalletDecryptArgs](#interface-walletdecryptargs), [WalletDecryptResult](#interface-walletdecryptresult), [WalletEncryptArgs](#interface-walletencryptargs), [WalletEncryptResult](#interface-walletencryptresult), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
2245
|
+
|
|
2246
|
+
<details>
|
|
2247
|
+
|
|
2248
|
+
<summary>Class ProtoWallet Details</summary>
|
|
2249
|
+
|
|
2250
|
+
#### Method getIdentityKey
|
|
2251
|
+
|
|
2252
|
+
Convenience method to obtain the identityKey.
|
|
2253
|
+
|
|
2254
|
+
```ts
|
|
2255
|
+
async getIdentityKey(originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2256
|
+
publicKey: PubKeyHex;
|
|
2257
|
+
}>
|
|
2258
|
+
```
|
|
2259
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [PubKeyHex](#type-pubkeyhex)
|
|
2260
|
+
|
|
2261
|
+
Returns
|
|
2262
|
+
|
|
2263
|
+
`await this.getPublicKey({ identityKey: true }, originator)`
|
|
2264
|
+
|
|
2265
|
+
</details>
|
|
2373
2266
|
|
|
2374
2267
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
2375
2268
|
|
|
@@ -2562,9 +2455,7 @@ export default class WalletClient implements Wallet {
|
|
|
2562
2455
|
limit?: PositiveIntegerDefault10Max10000;
|
|
2563
2456
|
offset?: PositiveIntegerOrZero;
|
|
2564
2457
|
}): Promise<DiscoverCertificatesResult>
|
|
2565
|
-
async isAuthenticated(args: {} = {}): Promise<
|
|
2566
|
-
authenticated: boolean;
|
|
2567
|
-
}>
|
|
2458
|
+
async isAuthenticated(args: {} = {}): Promise<AuthenticatedResult>
|
|
2568
2459
|
async waitForAuthentication(args: {} = {}): Promise<{
|
|
2569
2460
|
authenticated: true;
|
|
2570
2461
|
}>
|
|
@@ -2585,7 +2476,7 @@ export default class WalletClient implements Wallet {
|
|
|
2585
2476
|
}
|
|
2586
2477
|
```
|
|
2587
2478
|
|
|
2588
|
-
See also: [AcquireCertificateArgs](#interface-acquirecertificateargs), [AcquireCertificateResult](#interface-acquirecertificateresult), [Base64String](#type-base64string), [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [BooleanDefaultFalse](#type-booleandefaultfalse), [Byte](#type-byte), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [CreateActionArgs](#interface-createactionargs), [CreateActionResult](#interface-createactionresult), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [DiscoverCertificatesResult](#interface-discovercertificatesresult), [HexString](#type-hexstring), [ISOTimestampString](#type-isotimestampstring), [InternalizeActionArgs](#interface-internalizeactionargs), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [ListActionsArgs](#interface-listactionsargs), [ListActionsResult](#interface-listactionsresult), [ListCertificatesResult](#interface-listcertificatesresult), [ListOutputsArgs](#interface-listoutputsargs), [ListOutputsResult](#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [OutpointString](#type-outpointstring), [PositiveInteger](#type-positiveinteger), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](#type-positiveintegerorzero), [ProtocolString5To400Bytes](#type-protocolstring5to400bytes), [ProveCertificateArgs](#interface-provecertificateargs), [ProveCertificateResult](#interface-provecertificateresult), [PubKeyHex](#type-pubkeyhex), [SecurityLevel](#type-securitylevel), [SignActionArgs](#interface-signactionargs), [SignActionResult](#interface-signactionresult), [VersionString7To30Bytes](#type-versionstring7to30bytes), [Wallet](#interface-wallet), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
2479
|
+
See also: [AcquireCertificateArgs](#interface-acquirecertificateargs), [AcquireCertificateResult](#interface-acquirecertificateresult), [AuthenticatedResult](#interface-authenticatedresult), [Base64String](#type-base64string), [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [BooleanDefaultFalse](#type-booleandefaultfalse), [Byte](#type-byte), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [CreateActionArgs](#interface-createactionargs), [CreateActionResult](#interface-createactionresult), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [DiscoverCertificatesResult](#interface-discovercertificatesresult), [HexString](#type-hexstring), [ISOTimestampString](#type-isotimestampstring), [InternalizeActionArgs](#interface-internalizeactionargs), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [ListActionsArgs](#interface-listactionsargs), [ListActionsResult](#interface-listactionsresult), [ListCertificatesResult](#interface-listcertificatesresult), [ListOutputsArgs](#interface-listoutputsargs), [ListOutputsResult](#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [OutpointString](#type-outpointstring), [PositiveInteger](#type-positiveinteger), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](#type-positiveintegerorzero), [ProtocolString5To400Bytes](#type-protocolstring5to400bytes), [ProveCertificateArgs](#interface-provecertificateargs), [ProveCertificateResult](#interface-provecertificateresult), [PubKeyHex](#type-pubkeyhex), [SecurityLevel](#type-securitylevel), [SignActionArgs](#interface-signactionargs), [SignActionResult](#interface-signactionresult), [VersionString7To30Bytes](#type-versionstring7to30bytes), [Wallet](#interface-wallet), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
2589
2480
|
|
|
2590
2481
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
2591
2482
|
|
|
@@ -2816,7 +2707,7 @@ export default class WalletWireTransceiver implements Wallet {
|
|
|
2816
2707
|
offset?: PositiveIntegerOrZero;
|
|
2817
2708
|
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>
|
|
2818
2709
|
async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2819
|
-
authenticated:
|
|
2710
|
+
authenticated: true;
|
|
2820
2711
|
}>
|
|
2821
2712
|
async waitForAuthentication(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2822
2713
|
authenticated: true;
|
|
@@ -3001,7 +2892,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
3001
2892
|
satoshis: SatoshiValue;
|
|
3002
2893
|
lockingScript?: HexString;
|
|
3003
2894
|
tx?: BEEF;
|
|
3004
|
-
spendable:
|
|
2895
|
+
spendable: boolean;
|
|
3005
2896
|
customInstructions?: string;
|
|
3006
2897
|
tags?: OutputTagStringUnder300Bytes[];
|
|
3007
2898
|
labels?: LabelStringUnder300Bytes[];
|
|
@@ -3259,7 +3150,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
3259
3150
|
}>;
|
|
3260
3151
|
}>
|
|
3261
3152
|
async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3262
|
-
authenticated:
|
|
3153
|
+
authenticated: true;
|
|
3263
3154
|
}>
|
|
3264
3155
|
async waitForAuthentication(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3265
3156
|
authenticated: true;
|
|
@@ -3445,7 +3336,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
3445
3336
|
satoshis: SatoshiValue;
|
|
3446
3337
|
lockingScript?: HexString;
|
|
3447
3338
|
tx?: BEEF;
|
|
3448
|
-
spendable:
|
|
3339
|
+
spendable: boolean;
|
|
3449
3340
|
customInstructions?: string;
|
|
3450
3341
|
tags?: OutputTagStringUnder300Bytes[];
|
|
3451
3342
|
labels?: LabelStringUnder300Bytes[];
|
|
@@ -3703,7 +3594,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
3703
3594
|
}>;
|
|
3704
3595
|
}>
|
|
3705
3596
|
async isAuthenticated(args: {}): Promise<{
|
|
3706
|
-
authenticated:
|
|
3597
|
+
authenticated: true;
|
|
3707
3598
|
}>
|
|
3708
3599
|
async waitForAuthentication(args: {}): Promise<{
|
|
3709
3600
|
authenticated: true;
|
|
@@ -3736,19 +3627,20 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
3736
3627
|
|
|
3737
3628
|
| | | |
|
|
3738
3629
|
| --- | --- | --- |
|
|
3739
|
-
| [AcquisitionProtocol](#type-acquisitionprotocol) | [EntityNameStringMax100Bytes](#type-entitynamestringmax100bytes) | [
|
|
3740
|
-
| [ActionStatus](#type-actionstatus) | [ErrorCodeString10To40Bytes](#type-errorcodestring10to40bytes) | [
|
|
3741
|
-
| [AtomicBEEF](#type-atomicbeef) | [ErrorDescriptionString20To200Bytes](#type-errordescriptionstring20to200bytes) | [
|
|
3742
|
-
| [BEEF](#type-beef) | [HexString](#type-hexstring) | [
|
|
3743
|
-
| [Base64String](#type-base64string) | [ISOTimestampString](#type-isotimestampstring) | [
|
|
3744
|
-
| [BasketStringUnder300Bytes](#type-basketstringunder300bytes) | [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes) | [
|
|
3630
|
+
| [AcquisitionProtocol](#type-acquisitionprotocol) | [EntityNameStringMax100Bytes](#type-entitynamestringmax100bytes) | [PositiveIntegerOrZero](#type-positiveintegerorzero) |
|
|
3631
|
+
| [ActionStatus](#type-actionstatus) | [ErrorCodeString10To40Bytes](#type-errorcodestring10to40bytes) | [ProtocolString5To400Bytes](#type-protocolstring5to400bytes) |
|
|
3632
|
+
| [AtomicBEEF](#type-atomicbeef) | [ErrorDescriptionString20To200Bytes](#type-errordescriptionstring20to200bytes) | [PubKeyHex](#type-pubkeyhex) |
|
|
3633
|
+
| [BEEF](#type-beef) | [HexString](#type-hexstring) | [SatoshiValue](#type-satoshivalue) |
|
|
3634
|
+
| [Base64String](#type-base64string) | [ISOTimestampString](#type-isotimestampstring) | [SecurityLevel](#type-securitylevel) |
|
|
3635
|
+
| [BasketStringUnder300Bytes](#type-basketstringunder300bytes) | [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes) | [SendWithResultStatus](#type-sendwithresultstatus) |
|
|
3745
3636
|
| [BooleanDefaultFalse](#type-booleandefaultfalse) | [KeyringRevealer](#type-keyringrevealer) | [TXIDHexString](#type-txidhexstring) |
|
|
3746
3637
|
| [BooleanDefaultTrue](#type-booleandefaulttrue) | [LabelStringUnder300Bytes](#type-labelstringunder300bytes) | [TrustSelf](#type-trustself) |
|
|
3747
3638
|
| [Byte](#type-byte) | [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes) | [VersionString7To30Bytes](#type-versionstring7to30bytes) |
|
|
3748
3639
|
| [CallType](#type-calltype) | [OutpointString](#type-outpointstring) | [WalletCounterparty](#type-walletcounterparty) |
|
|
3749
3640
|
| [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes) | [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes) | [WalletErrorCode](#type-walleterrorcode) |
|
|
3750
|
-
| [
|
|
3751
|
-
| [
|
|
3641
|
+
| [Counterparty](#type-counterparty) | [PositiveInteger](#type-positiveinteger) | [WalletNetwork](#type-walletnetwork) |
|
|
3642
|
+
| [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes) | [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000) | [WalletProtocol](#type-walletprotocol) |
|
|
3643
|
+
| [EntityIconURLStringMax500Bytes](#type-entityiconurlstringmax500bytes) | [PositiveIntegerMax10](#type-positiveintegermax10) | |
|
|
3752
3644
|
|
|
3753
3645
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
3754
3646
|
|
|
@@ -3856,6 +3748,17 @@ export type CertificateFieldNameUnder50Bytes = string
|
|
|
3856
3748
|
|
|
3857
3749
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
3858
3750
|
|
|
3751
|
+
---
|
|
3752
|
+
### Type: Counterparty
|
|
3753
|
+
|
|
3754
|
+
```ts
|
|
3755
|
+
export type Counterparty = PublicKey | PubKeyHex | "self" | "anyone"
|
|
3756
|
+
```
|
|
3757
|
+
|
|
3758
|
+
See also: [PubKeyHex](#type-pubkeyhex), [PublicKey](#class-publickey)
|
|
3759
|
+
|
|
3760
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
3761
|
+
|
|
3859
3762
|
---
|
|
3860
3763
|
### Type: DescriptionString5to50Bytes
|
|
3861
3764
|
|
|
@@ -4055,6 +3958,15 @@ export type SecurityLevel = 0 | 1 | 2
|
|
|
4055
3958
|
|
|
4056
3959
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4057
3960
|
|
|
3961
|
+
---
|
|
3962
|
+
### Type: SendWithResultStatus
|
|
3963
|
+
|
|
3964
|
+
```ts
|
|
3965
|
+
export type SendWithResultStatus = "unproven" | "sending" | "failed"
|
|
3966
|
+
```
|
|
3967
|
+
|
|
3968
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
3969
|
+
|
|
4058
3970
|
---
|
|
4059
3971
|
### Type: TXIDHexString
|
|
4060
3972
|
|
|
@@ -4146,6 +4058,8 @@ export enum SecurityLevels {
|
|
|
4146
4058
|
}
|
|
4147
4059
|
```
|
|
4148
4060
|
|
|
4061
|
+
See also: [Counterparty](#type-counterparty)
|
|
4062
|
+
|
|
4149
4063
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4150
4064
|
|
|
4151
4065
|
---
|