@bsv/sdk 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/package.json +2 -2
- package/dist/cjs/src/overlay-tools/LookupResolver.js +8 -5
- package/dist/cjs/src/overlay-tools/LookupResolver.js.map +1 -1
- package/dist/cjs/src/overlay-tools/SHIPBroadcaster.js +6 -4
- package/dist/cjs/src/overlay-tools/SHIPBroadcaster.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/overlay-tools/LookupResolver.js +8 -5
- package/dist/esm/src/overlay-tools/LookupResolver.js.map +1 -1
- package/dist/esm/src/overlay-tools/SHIPBroadcaster.js +6 -4
- package/dist/esm/src/overlay-tools/SHIPBroadcaster.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/overlay-tools/LookupResolver.d.ts +10 -3
- package/dist/types/src/overlay-tools/LookupResolver.d.ts.map +1 -1
- package/dist/types/src/overlay-tools/SHIPBroadcaster.d.ts.map +1 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/docs/compat.md +166 -135
- package/docs/messages.md +63 -55
- package/docs/overlay-tools.md +137 -92
- package/docs/primitives.md +4095 -3812
- package/docs/script.md +506 -467
- package/docs/totp.md +8 -0
- package/docs/transaction.md +822 -735
- package/docs/wallet.md +1025 -849
- package/package.json +2 -2
- package/src/overlay-tools/LookupResolver.ts +22 -6
- package/src/overlay-tools/SHIPBroadcaster.ts +7 -4
- package/src/overlay-tools/__tests/LookupResolver.test.ts +83 -42
- package/src/overlay-tools/__tests/SHIPBroadcaster.test.ts +9 -9
package/docs/wallet.md
CHANGED
|
@@ -30,92 +30,78 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
-
### Interface:
|
|
33
|
+
### Interface: AbortActionArgs
|
|
34
34
|
|
|
35
35
|
```ts
|
|
36
|
-
export interface
|
|
37
|
-
|
|
38
|
-
inputDescription: DescriptionString5to50Bytes;
|
|
39
|
-
unlockingScript?: HexString;
|
|
40
|
-
unlockingScriptLength?: PositiveInteger;
|
|
41
|
-
sequenceNumber?: PositiveIntegerOrZero;
|
|
36
|
+
export interface AbortActionArgs {
|
|
37
|
+
reference: Base64String;
|
|
42
38
|
}
|
|
43
39
|
```
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
### Interface: CreateActionOutput
|
|
49
|
-
|
|
50
|
-
```ts
|
|
51
|
-
export interface CreateActionOutput {
|
|
52
|
-
lockingScript: HexString;
|
|
53
|
-
satoshis: SatoshiValue;
|
|
54
|
-
outputDescription: DescriptionString5to50Bytes;
|
|
55
|
-
basket?: BasketStringUnder300Bytes;
|
|
56
|
-
customInstructions?: string;
|
|
57
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
58
|
-
}
|
|
59
|
-
```
|
|
41
|
+
See also: [Base64String](#type-base64string)
|
|
60
42
|
|
|
61
43
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
62
44
|
|
|
63
45
|
---
|
|
64
|
-
### Interface:
|
|
46
|
+
### Interface: AbortActionResult
|
|
65
47
|
|
|
66
48
|
```ts
|
|
67
|
-
export interface
|
|
68
|
-
|
|
69
|
-
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
70
|
-
trustSelf?: TrustSelf;
|
|
71
|
-
knownTxids?: TXIDHexString[];
|
|
72
|
-
returnTXIDOnly?: BooleanDefaultFalse;
|
|
73
|
-
noSend?: BooleanDefaultFalse;
|
|
74
|
-
noSendChange?: OutpointString[];
|
|
75
|
-
sendWith?: TXIDHexString[];
|
|
76
|
-
randomizeOutputs?: BooleanDefaultTrue;
|
|
49
|
+
export interface AbortActionResult {
|
|
50
|
+
aborted: true;
|
|
77
51
|
}
|
|
78
52
|
```
|
|
79
53
|
|
|
80
54
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
81
55
|
|
|
82
56
|
---
|
|
83
|
-
### Interface:
|
|
57
|
+
### Interface: AcquireCertificateArgs
|
|
84
58
|
|
|
85
59
|
```ts
|
|
86
|
-
export interface
|
|
87
|
-
|
|
88
|
-
|
|
60
|
+
export interface AcquireCertificateArgs {
|
|
61
|
+
type: Base64String;
|
|
62
|
+
certifier: PubKeyHex;
|
|
63
|
+
acquisitionProtocol: AcquisitionProtocol;
|
|
64
|
+
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
65
|
+
serialNumber?: Base64String;
|
|
66
|
+
revocationOutpoint?: OutpointString;
|
|
67
|
+
signature?: HexString;
|
|
68
|
+
certifierUrl?: string;
|
|
69
|
+
keyringRevealer?: KeyringRevealer;
|
|
70
|
+
keyringForSubject?: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
71
|
+
privileged?: BooleanDefaultFalse;
|
|
72
|
+
privilegedReason?: DescriptionString5to50Bytes;
|
|
89
73
|
}
|
|
90
74
|
```
|
|
91
75
|
|
|
76
|
+
See also: [AcquisitionProtocol](#type-acquisitionprotocol), [Base64String](#type-base64string), [BooleanDefaultFalse](#type-booleandefaultfalse), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [HexString](#type-hexstring), [KeyringRevealer](#type-keyringrevealer), [OutpointString](#type-outpointstring), [PubKeyHex](#type-pubkeyhex)
|
|
77
|
+
|
|
92
78
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
93
79
|
|
|
94
80
|
---
|
|
95
|
-
### Interface:
|
|
81
|
+
### Interface: AcquireCertificateResult
|
|
96
82
|
|
|
97
83
|
```ts
|
|
98
|
-
export interface
|
|
99
|
-
tx: AtomicBEEF;
|
|
100
|
-
reference: Base64String;
|
|
84
|
+
export interface AcquireCertificateResult extends WalletCertificate {
|
|
101
85
|
}
|
|
102
86
|
```
|
|
103
87
|
|
|
88
|
+
See also: [WalletCertificate](#interface-walletcertificate)
|
|
89
|
+
|
|
104
90
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
105
91
|
|
|
106
92
|
---
|
|
107
|
-
### Interface:
|
|
93
|
+
### Interface: BasketInsertion
|
|
108
94
|
|
|
109
95
|
```ts
|
|
110
|
-
export interface
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
sendWithResults?: Array<SendWithResult>;
|
|
115
|
-
signableTransaction?: SignableTransaction;
|
|
96
|
+
export interface BasketInsertion {
|
|
97
|
+
basket: BasketStringUnder300Bytes;
|
|
98
|
+
customInstructions?: string;
|
|
99
|
+
tags?: OutputTagStringUnder300Bytes[];
|
|
116
100
|
}
|
|
117
101
|
```
|
|
118
102
|
|
|
103
|
+
See also: [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes)
|
|
104
|
+
|
|
119
105
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
120
106
|
|
|
121
107
|
---
|
|
@@ -134,224 +120,203 @@ export interface CreateActionArgs {
|
|
|
134
120
|
}
|
|
135
121
|
```
|
|
136
122
|
|
|
123
|
+
See also: [BEEF](#type-beef), [CreateActionInput](#interface-createactioninput), [CreateActionOptions](#interface-createactionoptions), [CreateActionOutput](#interface-createactionoutput), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [LabelStringUnder300Bytes](#type-labelstringunder300bytes), [PositiveIntegerOrZero](#type-positiveintegerorzero)
|
|
124
|
+
|
|
137
125
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
138
126
|
|
|
139
127
|
---
|
|
140
|
-
### Interface:
|
|
128
|
+
### Interface: CreateActionInput
|
|
141
129
|
|
|
142
130
|
```ts
|
|
143
|
-
export interface
|
|
144
|
-
|
|
131
|
+
export interface CreateActionInput {
|
|
132
|
+
outpoint: OutpointString;
|
|
133
|
+
inputDescription: DescriptionString5to50Bytes;
|
|
134
|
+
unlockingScript?: HexString;
|
|
135
|
+
unlockingScriptLength?: PositiveInteger;
|
|
145
136
|
sequenceNumber?: PositiveIntegerOrZero;
|
|
146
137
|
}
|
|
147
138
|
```
|
|
148
139
|
|
|
140
|
+
See also: [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [HexString](#type-hexstring), [OutpointString](#type-outpointstring), [PositiveInteger](#type-positiveinteger), [PositiveIntegerOrZero](#type-positiveintegerorzero)
|
|
141
|
+
|
|
149
142
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
150
143
|
|
|
151
144
|
---
|
|
152
|
-
### Interface:
|
|
145
|
+
### Interface: CreateActionOptions
|
|
153
146
|
|
|
154
147
|
```ts
|
|
155
|
-
export interface
|
|
148
|
+
export interface CreateActionOptions {
|
|
149
|
+
signAndProcess?: BooleanDefaultTrue;
|
|
156
150
|
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
151
|
+
trustSelf?: TrustSelf;
|
|
152
|
+
knownTxids?: TXIDHexString[];
|
|
157
153
|
returnTXIDOnly?: BooleanDefaultFalse;
|
|
158
154
|
noSend?: BooleanDefaultFalse;
|
|
155
|
+
noSendChange?: OutpointString[];
|
|
159
156
|
sendWith?: TXIDHexString[];
|
|
157
|
+
randomizeOutputs?: BooleanDefaultTrue;
|
|
160
158
|
}
|
|
161
159
|
```
|
|
162
160
|
|
|
161
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [BooleanDefaultTrue](#type-booleandefaulttrue), [OutpointString](#type-outpointstring), [TXIDHexString](#type-txidhexstring), [TrustSelf](#type-trustself)
|
|
162
|
+
|
|
163
163
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
164
164
|
|
|
165
165
|
---
|
|
166
|
-
### Interface:
|
|
166
|
+
### Interface: CreateActionOutput
|
|
167
167
|
|
|
168
168
|
```ts
|
|
169
|
-
export interface
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
export interface CreateActionOutput {
|
|
170
|
+
lockingScript: HexString;
|
|
171
|
+
satoshis: SatoshiValue;
|
|
172
|
+
outputDescription: DescriptionString5to50Bytes;
|
|
173
|
+
basket?: BasketStringUnder300Bytes;
|
|
174
|
+
customInstructions?: string;
|
|
175
|
+
tags?: OutputTagStringUnder300Bytes[];
|
|
173
176
|
}
|
|
174
177
|
```
|
|
175
178
|
|
|
179
|
+
See also: [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [HexString](#type-hexstring), [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes), [SatoshiValue](#type-satoshivalue)
|
|
180
|
+
|
|
176
181
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
177
182
|
|
|
178
183
|
---
|
|
179
|
-
### Interface:
|
|
184
|
+
### Interface: CreateActionResult
|
|
180
185
|
|
|
181
186
|
```ts
|
|
182
|
-
export interface
|
|
187
|
+
export interface CreateActionResult {
|
|
183
188
|
txid?: TXIDHexString;
|
|
184
189
|
tx?: AtomicBEEF;
|
|
190
|
+
noSendChange?: OutpointString[];
|
|
185
191
|
sendWithResults?: Array<SendWithResult>;
|
|
192
|
+
signableTransaction?: SignableTransaction;
|
|
186
193
|
}
|
|
187
194
|
```
|
|
188
195
|
|
|
196
|
+
See also: [AtomicBEEF](#type-atomicbeef), [OutpointString](#type-outpointstring), [SendWithResult](#interface-sendwithresult), [SignableTransaction](#interface-signabletransaction), [TXIDHexString](#type-txidhexstring)
|
|
197
|
+
|
|
189
198
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
190
199
|
|
|
191
200
|
---
|
|
192
|
-
### Interface:
|
|
201
|
+
### Interface: CreateHmacArgs
|
|
193
202
|
|
|
194
203
|
```ts
|
|
195
|
-
export interface
|
|
196
|
-
|
|
204
|
+
export interface CreateHmacArgs extends WalletEncryptionArgs {
|
|
205
|
+
data: Byte[];
|
|
197
206
|
}
|
|
198
207
|
```
|
|
199
208
|
|
|
209
|
+
See also: [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryptionargs)
|
|
210
|
+
|
|
200
211
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
201
212
|
|
|
202
213
|
---
|
|
203
|
-
### Interface:
|
|
214
|
+
### Interface: CreateSignatureArgs
|
|
204
215
|
|
|
205
216
|
```ts
|
|
206
|
-
export interface
|
|
207
|
-
|
|
217
|
+
export interface CreateSignatureArgs extends WalletEncryptionArgs {
|
|
218
|
+
data?: Byte[];
|
|
219
|
+
hashToDirectlySign?: Byte[];
|
|
208
220
|
}
|
|
209
221
|
```
|
|
210
222
|
|
|
223
|
+
See also: [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryptionargs)
|
|
224
|
+
|
|
211
225
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
212
226
|
|
|
213
227
|
---
|
|
214
|
-
### Interface:
|
|
228
|
+
### Interface: DiscoverByAttributesArgs
|
|
215
229
|
|
|
216
230
|
```ts
|
|
217
|
-
export interface
|
|
218
|
-
|
|
219
|
-
labelQueryMode?: "any" | "all";
|
|
220
|
-
includeLabels?: BooleanDefaultFalse;
|
|
221
|
-
includeInputs?: BooleanDefaultFalse;
|
|
222
|
-
includeInputSourceLockingScripts?: BooleanDefaultFalse;
|
|
223
|
-
includeInputUnlockingScripts?: BooleanDefaultFalse;
|
|
224
|
-
includeOutputs?: BooleanDefaultFalse;
|
|
225
|
-
includeOutputLockingScripts?: BooleanDefaultFalse;
|
|
231
|
+
export interface DiscoverByAttributesArgs {
|
|
232
|
+
attributes: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
226
233
|
limit?: PositiveIntegerDefault10Max10000;
|
|
227
234
|
offset?: PositiveIntegerOrZero;
|
|
228
235
|
seekPermission?: BooleanDefaultTrue;
|
|
229
236
|
}
|
|
230
237
|
```
|
|
231
238
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
---
|
|
235
|
-
### Interface: WalletActionInput
|
|
236
|
-
|
|
237
|
-
```ts
|
|
238
|
-
export interface WalletActionInput {
|
|
239
|
-
sourceOutpoint: OutpointString;
|
|
240
|
-
sourceSatoshis: SatoshiValue;
|
|
241
|
-
sourceLockingScript?: HexString;
|
|
242
|
-
unlockingScript?: HexString;
|
|
243
|
-
inputDescription: DescriptionString5to50Bytes;
|
|
244
|
-
sequenceNumber: PositiveIntegerOrZero;
|
|
245
|
-
}
|
|
246
|
-
```
|
|
239
|
+
See also: [BooleanDefaultTrue](#type-booleandefaulttrue), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](#type-positiveintegerorzero)
|
|
247
240
|
|
|
248
241
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
249
242
|
|
|
250
243
|
---
|
|
251
|
-
### Interface:
|
|
244
|
+
### Interface: DiscoverByIdentityKeyArgs
|
|
252
245
|
|
|
253
246
|
```ts
|
|
254
|
-
export interface
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
tags: OutputTagStringUnder300Bytes[];
|
|
260
|
-
outputIndex: PositiveIntegerOrZero;
|
|
261
|
-
outputDescription: DescriptionString5to50Bytes;
|
|
262
|
-
basket: BasketStringUnder300Bytes;
|
|
247
|
+
export interface DiscoverByIdentityKeyArgs {
|
|
248
|
+
identityKey: PubKeyHex;
|
|
249
|
+
limit?: PositiveIntegerDefault10Max10000;
|
|
250
|
+
offset?: PositiveIntegerOrZero;
|
|
251
|
+
seekPermission?: BooleanDefaultTrue;
|
|
263
252
|
}
|
|
264
253
|
```
|
|
265
254
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
### Interface: WalletOutput
|
|
270
|
-
|
|
271
|
-
```ts
|
|
272
|
-
export interface WalletOutput {
|
|
273
|
-
satoshis: SatoshiValue;
|
|
274
|
-
lockingScript?: HexString;
|
|
275
|
-
spendable: true;
|
|
276
|
-
customInstructions?: string;
|
|
277
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
278
|
-
outpoint: OutpointString;
|
|
279
|
-
labels?: LabelStringUnder300Bytes[];
|
|
280
|
-
}
|
|
281
|
-
```
|
|
255
|
+
See also: [BooleanDefaultTrue](#type-booleandefaulttrue), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](#type-positiveintegerorzero), [PubKeyHex](#type-pubkeyhex)
|
|
282
256
|
|
|
283
257
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
284
258
|
|
|
285
259
|
---
|
|
286
|
-
### Interface:
|
|
260
|
+
### Interface: DiscoverCertificatesResult
|
|
287
261
|
|
|
288
262
|
```ts
|
|
289
|
-
export interface
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
status: ActionStatus;
|
|
293
|
-
isOutgoing: boolean;
|
|
294
|
-
description: DescriptionString5to50Bytes;
|
|
295
|
-
labels?: LabelStringUnder300Bytes[];
|
|
296
|
-
version: PositiveIntegerOrZero;
|
|
297
|
-
lockTime: PositiveIntegerOrZero;
|
|
298
|
-
inputs?: Array<WalletActionInput>;
|
|
299
|
-
outputs?: Array<WalletActionOutput>;
|
|
263
|
+
export interface DiscoverCertificatesResult {
|
|
264
|
+
totalCertificates: PositiveIntegerOrZero;
|
|
265
|
+
certificates: Array<IdentityCertificate>;
|
|
300
266
|
}
|
|
301
267
|
```
|
|
302
268
|
|
|
269
|
+
See also: [IdentityCertificate](#interface-identitycertificate), [PositiveIntegerOrZero](#type-positiveintegerorzero)
|
|
270
|
+
|
|
303
271
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
304
272
|
|
|
305
273
|
---
|
|
306
|
-
### Interface:
|
|
307
|
-
|
|
308
|
-
```ts
|
|
309
|
-
export interface ListActionsResult {
|
|
310
|
-
totalActions: PositiveIntegerOrZero;
|
|
311
|
-
actions: Array<WalletAction>;
|
|
312
|
-
}
|
|
313
|
-
```
|
|
274
|
+
### Interface: GetPublicKeyArgs
|
|
314
275
|
|
|
315
|
-
|
|
276
|
+
When `identityKey` is true, `WalletEncryptionArgs` are not used.
|
|
316
277
|
|
|
317
|
-
|
|
318
|
-
### Interface: WalletPayment
|
|
278
|
+
When `identityKey` is undefined, `WalletEncryptionArgs` are required.
|
|
319
279
|
|
|
320
280
|
```ts
|
|
321
|
-
export interface
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
senderIdentityKey: PubKeyHex;
|
|
281
|
+
export interface GetPublicKeyArgs extends Partial<WalletEncryptionArgs> {
|
|
282
|
+
identityKey?: true;
|
|
283
|
+
forSelf?: BooleanDefaultFalse;
|
|
325
284
|
}
|
|
326
285
|
```
|
|
327
286
|
|
|
287
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [WalletEncryptionArgs](#interface-walletencryptionargs)
|
|
288
|
+
|
|
328
289
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
329
290
|
|
|
330
291
|
---
|
|
331
|
-
### Interface:
|
|
292
|
+
### Interface: IdentityCertificate
|
|
332
293
|
|
|
333
294
|
```ts
|
|
334
|
-
export interface
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
295
|
+
export interface IdentityCertificate extends WalletCertificate {
|
|
296
|
+
certifierInfo: IdentityCertifier;
|
|
297
|
+
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
298
|
+
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
338
299
|
}
|
|
339
300
|
```
|
|
340
301
|
|
|
302
|
+
See also: [Base64String](#type-base64string), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [IdentityCertifier](#interface-identitycertifier), [WalletCertificate](#interface-walletcertificate)
|
|
303
|
+
|
|
341
304
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
342
305
|
|
|
343
306
|
---
|
|
344
|
-
### Interface:
|
|
307
|
+
### Interface: IdentityCertifier
|
|
345
308
|
|
|
346
309
|
```ts
|
|
347
|
-
export interface
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
310
|
+
export interface IdentityCertifier {
|
|
311
|
+
name: EntityNameStringMax100Bytes;
|
|
312
|
+
iconUrl: EntityIconURLStringMax500Bytes;
|
|
313
|
+
description: DescriptionString5to50Bytes;
|
|
314
|
+
trust: PositiveIntegerMax10;
|
|
352
315
|
}
|
|
353
316
|
```
|
|
354
317
|
|
|
318
|
+
See also: [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [EntityIconURLStringMax500Bytes](#type-entityiconurlstringmax500bytes), [EntityNameStringMax100Bytes](#type-entitynamestringmax100bytes), [PositiveIntegerMax10](#type-positiveintegermax10)
|
|
319
|
+
|
|
355
320
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
356
321
|
|
|
357
322
|
---
|
|
@@ -367,6 +332,8 @@ export interface InternalizeActionArgs {
|
|
|
367
332
|
}
|
|
368
333
|
```
|
|
369
334
|
|
|
335
|
+
See also: [AtomicBEEF](#type-atomicbeef), [BooleanDefaultTrue](#type-booleandefaulttrue), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [InternalizeOutput](#interface-internalizeoutput), [LabelStringUnder300Bytes](#type-labelstringunder300bytes)
|
|
336
|
+
|
|
370
337
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
371
338
|
|
|
372
339
|
---
|
|
@@ -381,35 +348,18 @@ export interface InternalizeActionResult {
|
|
|
381
348
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
382
349
|
|
|
383
350
|
---
|
|
384
|
-
### Interface:
|
|
351
|
+
### Interface: InternalizeOutput
|
|
385
352
|
|
|
386
353
|
```ts
|
|
387
|
-
export interface
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
includeCustomInstructions?: BooleanDefaultFalse;
|
|
393
|
-
includeTags?: BooleanDefaultFalse;
|
|
394
|
-
includeLabels?: BooleanDefaultFalse;
|
|
395
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
396
|
-
offset?: PositiveIntegerOrZero;
|
|
397
|
-
seekPermission?: BooleanDefaultTrue;
|
|
354
|
+
export interface InternalizeOutput {
|
|
355
|
+
outputIndex: PositiveIntegerOrZero;
|
|
356
|
+
protocol: "wallet payment" | "basket insertion";
|
|
357
|
+
paymentRemittance?: WalletPayment;
|
|
358
|
+
insertionRemittance?: BasketInsertion;
|
|
398
359
|
}
|
|
399
360
|
```
|
|
400
361
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
---
|
|
404
|
-
### Interface: ListOutputsResult
|
|
405
|
-
|
|
406
|
-
```ts
|
|
407
|
-
export interface ListOutputsResult {
|
|
408
|
-
totalOutputs: PositiveIntegerOrZero;
|
|
409
|
-
BEEF?: BEEF;
|
|
410
|
-
outputs: Array<WalletOutput>;
|
|
411
|
-
}
|
|
412
|
-
```
|
|
362
|
+
See also: [BasketInsertion](#interface-basketinsertion), [PositiveIntegerOrZero](#type-positiveintegerorzero), [WalletPayment](#interface-walletpayment)
|
|
413
363
|
|
|
414
364
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
415
365
|
|
|
@@ -426,57 +376,7 @@ export interface KeyLinkageArgs {
|
|
|
426
376
|
}
|
|
427
377
|
```
|
|
428
378
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
---
|
|
432
|
-
### Interface: WalletEncryptionArgs
|
|
433
|
-
|
|
434
|
-
```ts
|
|
435
|
-
export interface WalletEncryptionArgs extends KeyLinkageArgs {
|
|
436
|
-
seekPermission?: BooleanDefaultTrue;
|
|
437
|
-
}
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
441
|
-
|
|
442
|
-
---
|
|
443
|
-
### Interface: GetPublicKeyArgs
|
|
444
|
-
|
|
445
|
-
When `identityKey` is true, `WalletEncryptionArgs` are not used.
|
|
446
|
-
|
|
447
|
-
When `identityKey` is undefined, `WalletEncryptionArgs` are required.
|
|
448
|
-
|
|
449
|
-
```ts
|
|
450
|
-
export interface GetPublicKeyArgs extends Partial<WalletEncryptionArgs> {
|
|
451
|
-
identityKey?: true;
|
|
452
|
-
forSelf?: BooleanDefaultFalse;
|
|
453
|
-
}
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
457
|
-
|
|
458
|
-
---
|
|
459
|
-
### Interface: RevealCounterpartyKeyLinkageArgs
|
|
460
|
-
|
|
461
|
-
```ts
|
|
462
|
-
export interface RevealCounterpartyKeyLinkageArgs {
|
|
463
|
-
counterparty: PubKeyHex;
|
|
464
|
-
verifier: PubKeyHex;
|
|
465
|
-
privileged?: BooleanDefaultFalse;
|
|
466
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
467
|
-
}
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
471
|
-
|
|
472
|
-
---
|
|
473
|
-
### Interface: RevealSpecificKeyLinkageArgs
|
|
474
|
-
|
|
475
|
-
```ts
|
|
476
|
-
export interface RevealSpecificKeyLinkageArgs extends KeyLinkageArgs {
|
|
477
|
-
verifier: PubKeyHex;
|
|
478
|
-
}
|
|
479
|
-
```
|
|
379
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [WalletCounterparty](#type-walletcounterparty), [WalletProtocol](#type-walletprotocol)
|
|
480
380
|
|
|
481
381
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
482
382
|
|
|
@@ -493,300 +393,334 @@ export interface KeyLinkageResult {
|
|
|
493
393
|
}
|
|
494
394
|
```
|
|
495
395
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
---
|
|
499
|
-
### Interface: RevealCounterpartyKeyLinkageResult
|
|
500
|
-
|
|
501
|
-
```ts
|
|
502
|
-
export interface RevealCounterpartyKeyLinkageResult extends KeyLinkageResult {
|
|
503
|
-
revelationTime: ISOTimestampString;
|
|
504
|
-
}
|
|
505
|
-
```
|
|
396
|
+
See also: [Byte](#type-byte), [PubKeyHex](#type-pubkeyhex)
|
|
506
397
|
|
|
507
398
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
508
399
|
|
|
509
400
|
---
|
|
510
|
-
### Interface:
|
|
401
|
+
### Interface: ListActionsArgs
|
|
511
402
|
|
|
512
403
|
```ts
|
|
513
|
-
export interface
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
404
|
+
export interface ListActionsArgs {
|
|
405
|
+
labels: LabelStringUnder300Bytes[];
|
|
406
|
+
labelQueryMode?: "any" | "all";
|
|
407
|
+
includeLabels?: BooleanDefaultFalse;
|
|
408
|
+
includeInputs?: BooleanDefaultFalse;
|
|
409
|
+
includeInputSourceLockingScripts?: BooleanDefaultFalse;
|
|
410
|
+
includeInputUnlockingScripts?: BooleanDefaultFalse;
|
|
411
|
+
includeOutputs?: BooleanDefaultFalse;
|
|
412
|
+
includeOutputLockingScripts?: BooleanDefaultFalse;
|
|
413
|
+
limit?: PositiveIntegerDefault10Max10000;
|
|
414
|
+
offset?: PositiveIntegerOrZero;
|
|
415
|
+
seekPermission?: BooleanDefaultTrue;
|
|
517
416
|
}
|
|
518
417
|
```
|
|
519
418
|
|
|
419
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [BooleanDefaultTrue](#type-booleandefaulttrue), [LabelStringUnder300Bytes](#type-labelstringunder300bytes), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](#type-positiveintegerorzero)
|
|
420
|
+
|
|
520
421
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
521
422
|
|
|
522
423
|
---
|
|
523
|
-
### Interface:
|
|
424
|
+
### Interface: ListActionsResult
|
|
524
425
|
|
|
525
426
|
```ts
|
|
526
|
-
export interface
|
|
527
|
-
|
|
427
|
+
export interface ListActionsResult {
|
|
428
|
+
totalActions: PositiveIntegerOrZero;
|
|
429
|
+
actions: Array<WalletAction>;
|
|
528
430
|
}
|
|
529
431
|
```
|
|
530
432
|
|
|
433
|
+
See also: [PositiveIntegerOrZero](#type-positiveintegerorzero), [WalletAction](#interface-walletaction)
|
|
434
|
+
|
|
531
435
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
532
436
|
|
|
533
437
|
---
|
|
534
|
-
### Interface:
|
|
438
|
+
### Interface: ListCertificatesArgs
|
|
535
439
|
|
|
536
440
|
```ts
|
|
537
|
-
export interface
|
|
538
|
-
|
|
441
|
+
export interface ListCertificatesArgs {
|
|
442
|
+
certifiers: PubKeyHex[];
|
|
443
|
+
types: Base64String[];
|
|
444
|
+
limit?: PositiveIntegerDefault10Max10000;
|
|
445
|
+
offset?: PositiveIntegerOrZero;
|
|
446
|
+
privileged?: BooleanDefaultFalse;
|
|
447
|
+
privilegedReason?: DescriptionString5to50Bytes;
|
|
539
448
|
}
|
|
540
449
|
```
|
|
541
450
|
|
|
451
|
+
See also: [Base64String](#type-base64string), [BooleanDefaultFalse](#type-booleandefaultfalse), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](#type-positiveintegerorzero), [PubKeyHex](#type-pubkeyhex)
|
|
452
|
+
|
|
542
453
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
543
454
|
|
|
544
455
|
---
|
|
545
|
-
### Interface:
|
|
456
|
+
### Interface: ListCertificatesResult
|
|
546
457
|
|
|
547
458
|
```ts
|
|
548
|
-
export interface
|
|
549
|
-
|
|
459
|
+
export interface ListCertificatesResult {
|
|
460
|
+
totalCertificates: PositiveIntegerOrZero;
|
|
461
|
+
certificates: Array<WalletCertificate>;
|
|
550
462
|
}
|
|
551
463
|
```
|
|
552
464
|
|
|
465
|
+
See also: [PositiveIntegerOrZero](#type-positiveintegerorzero), [WalletCertificate](#interface-walletcertificate)
|
|
466
|
+
|
|
553
467
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
554
468
|
|
|
555
469
|
---
|
|
556
|
-
### Interface:
|
|
470
|
+
### Interface: ListOutputsArgs
|
|
557
471
|
|
|
558
472
|
```ts
|
|
559
|
-
export interface
|
|
560
|
-
|
|
561
|
-
|
|
473
|
+
export interface ListOutputsArgs {
|
|
474
|
+
basket: BasketStringUnder300Bytes;
|
|
475
|
+
tags?: OutputTagStringUnder300Bytes[];
|
|
476
|
+
tagQueryMode?: "all" | "any";
|
|
477
|
+
include?: "locking scripts" | "entire transactions";
|
|
478
|
+
includeCustomInstructions?: BooleanDefaultFalse;
|
|
479
|
+
includeTags?: BooleanDefaultFalse;
|
|
480
|
+
includeLabels?: BooleanDefaultFalse;
|
|
481
|
+
limit?: PositiveIntegerDefault10Max10000;
|
|
482
|
+
offset?: PositiveIntegerOrZero;
|
|
483
|
+
seekPermission?: BooleanDefaultTrue;
|
|
562
484
|
}
|
|
563
485
|
```
|
|
564
486
|
|
|
487
|
+
See also: [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [BooleanDefaultFalse](#type-booleandefaultfalse), [BooleanDefaultTrue](#type-booleandefaulttrue), [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](#type-positiveintegerorzero)
|
|
488
|
+
|
|
565
489
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
566
490
|
|
|
567
491
|
---
|
|
568
|
-
### Interface:
|
|
492
|
+
### Interface: ListOutputsResult
|
|
569
493
|
|
|
570
494
|
```ts
|
|
571
|
-
export interface
|
|
572
|
-
|
|
573
|
-
|
|
495
|
+
export interface ListOutputsResult {
|
|
496
|
+
totalOutputs: PositiveIntegerOrZero;
|
|
497
|
+
BEEF?: BEEF;
|
|
498
|
+
outputs: Array<WalletOutput>;
|
|
574
499
|
}
|
|
575
500
|
```
|
|
576
501
|
|
|
502
|
+
See also: [BEEF](#type-beef), [PositiveIntegerOrZero](#type-positiveintegerorzero), [WalletOutput](#interface-walletoutput)
|
|
503
|
+
|
|
577
504
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
578
505
|
|
|
579
506
|
---
|
|
580
|
-
### Interface:
|
|
507
|
+
### Interface: ProveCertificateArgs
|
|
581
508
|
|
|
582
509
|
```ts
|
|
583
|
-
export interface
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
510
|
+
export interface ProveCertificateArgs {
|
|
511
|
+
certificate: WalletCertificate;
|
|
512
|
+
fieldsToReveal: CertificateFieldNameUnder50Bytes[];
|
|
513
|
+
verifier: PubKeyHex;
|
|
514
|
+
privileged?: BooleanDefaultFalse;
|
|
515
|
+
privilegedReason?: DescriptionString5to50Bytes;
|
|
588
516
|
}
|
|
589
517
|
```
|
|
590
518
|
|
|
519
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [PubKeyHex](#type-pubkeyhex), [WalletCertificate](#interface-walletcertificate)
|
|
520
|
+
|
|
591
521
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
592
522
|
|
|
593
523
|
---
|
|
594
|
-
### Interface:
|
|
524
|
+
### Interface: ProveCertificateResult
|
|
595
525
|
|
|
596
526
|
```ts
|
|
597
|
-
export interface
|
|
598
|
-
|
|
599
|
-
certifier: PubKeyHex;
|
|
600
|
-
acquisitionProtocol: AcquisitionProtocol;
|
|
601
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
602
|
-
serialNumber?: Base64String;
|
|
603
|
-
revocationOutpoint?: OutpointString;
|
|
604
|
-
signature?: HexString;
|
|
605
|
-
certifierUrl?: string;
|
|
606
|
-
keyringRevealer?: KeyringRevealer;
|
|
607
|
-
keyringForSubject?: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
608
|
-
privileged?: BooleanDefaultFalse;
|
|
609
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
527
|
+
export interface ProveCertificateResult {
|
|
528
|
+
keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
610
529
|
}
|
|
611
530
|
```
|
|
612
531
|
|
|
532
|
+
See also: [Base64String](#type-base64string), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes)
|
|
533
|
+
|
|
613
534
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
614
535
|
|
|
615
536
|
---
|
|
616
|
-
### Interface:
|
|
537
|
+
### Interface: RelinquishCertificateArgs
|
|
617
538
|
|
|
618
539
|
```ts
|
|
619
|
-
export interface
|
|
540
|
+
export interface RelinquishCertificateArgs {
|
|
620
541
|
type: Base64String;
|
|
621
|
-
subject: PubKeyHex;
|
|
622
542
|
serialNumber: Base64String;
|
|
623
543
|
certifier: PubKeyHex;
|
|
624
|
-
revocationOutpoint: OutpointString;
|
|
625
|
-
signature: HexString;
|
|
626
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
627
544
|
}
|
|
628
545
|
```
|
|
629
546
|
|
|
547
|
+
See also: [Base64String](#type-base64string), [PubKeyHex](#type-pubkeyhex)
|
|
548
|
+
|
|
630
549
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
631
550
|
|
|
632
551
|
---
|
|
633
|
-
### Interface:
|
|
552
|
+
### Interface: RevealCounterpartyKeyLinkageArgs
|
|
634
553
|
|
|
635
554
|
```ts
|
|
636
|
-
export interface
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
555
|
+
export interface RevealCounterpartyKeyLinkageArgs {
|
|
556
|
+
counterparty: PubKeyHex;
|
|
557
|
+
verifier: PubKeyHex;
|
|
558
|
+
privileged?: BooleanDefaultFalse;
|
|
559
|
+
privilegedReason?: DescriptionString5to50Bytes;
|
|
641
560
|
}
|
|
642
561
|
```
|
|
643
562
|
|
|
563
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [PubKeyHex](#type-pubkeyhex)
|
|
564
|
+
|
|
644
565
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
645
566
|
|
|
646
567
|
---
|
|
647
|
-
### Interface:
|
|
568
|
+
### Interface: RevealCounterpartyKeyLinkageResult
|
|
648
569
|
|
|
649
570
|
```ts
|
|
650
|
-
export interface
|
|
651
|
-
|
|
652
|
-
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
653
|
-
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
571
|
+
export interface RevealCounterpartyKeyLinkageResult extends KeyLinkageResult {
|
|
572
|
+
revelationTime: ISOTimestampString;
|
|
654
573
|
}
|
|
655
574
|
```
|
|
656
575
|
|
|
576
|
+
See also: [ISOTimestampString](#type-isotimestampstring), [KeyLinkageResult](#interface-keylinkageresult)
|
|
577
|
+
|
|
657
578
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
658
579
|
|
|
659
580
|
---
|
|
660
|
-
### Interface:
|
|
581
|
+
### Interface: RevealSpecificKeyLinkageArgs
|
|
661
582
|
|
|
662
583
|
```ts
|
|
663
|
-
export interface
|
|
584
|
+
export interface RevealSpecificKeyLinkageArgs extends KeyLinkageArgs {
|
|
585
|
+
verifier: PubKeyHex;
|
|
664
586
|
}
|
|
665
587
|
```
|
|
666
588
|
|
|
589
|
+
See also: [KeyLinkageArgs](#interface-keylinkageargs), [PubKeyHex](#type-pubkeyhex)
|
|
590
|
+
|
|
667
591
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
668
592
|
|
|
669
593
|
---
|
|
670
|
-
### Interface:
|
|
594
|
+
### Interface: RevealSpecificKeyLinkageResult
|
|
671
595
|
|
|
672
596
|
```ts
|
|
673
|
-
export interface
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
offset?: PositiveIntegerOrZero;
|
|
678
|
-
privileged?: BooleanDefaultFalse;
|
|
679
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
597
|
+
export interface RevealSpecificKeyLinkageResult extends KeyLinkageResult {
|
|
598
|
+
protocolID: WalletProtocol;
|
|
599
|
+
keyID: KeyIDStringUnder800Bytes;
|
|
600
|
+
proofType: Byte;
|
|
680
601
|
}
|
|
681
602
|
```
|
|
682
603
|
|
|
604
|
+
See also: [Byte](#type-byte), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [KeyLinkageResult](#interface-keylinkageresult), [WalletProtocol](#type-walletprotocol)
|
|
605
|
+
|
|
683
606
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
684
607
|
|
|
685
608
|
---
|
|
686
|
-
### Interface:
|
|
609
|
+
### Interface: SendWithResult
|
|
687
610
|
|
|
688
611
|
```ts
|
|
689
|
-
export interface
|
|
690
|
-
|
|
691
|
-
|
|
612
|
+
export interface SendWithResult {
|
|
613
|
+
txid: TXIDHexString;
|
|
614
|
+
status: "unproven" | "sending" | "failed";
|
|
692
615
|
}
|
|
693
616
|
```
|
|
694
617
|
|
|
618
|
+
See also: [TXIDHexString](#type-txidhexstring)
|
|
619
|
+
|
|
695
620
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
696
621
|
|
|
697
622
|
---
|
|
698
|
-
### Interface:
|
|
623
|
+
### Interface: SignActionArgs
|
|
699
624
|
|
|
700
625
|
```ts
|
|
701
|
-
export interface
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
privileged?: BooleanDefaultFalse;
|
|
706
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
626
|
+
export interface SignActionArgs {
|
|
627
|
+
spends: Record<PositiveIntegerOrZero, SignActionSpend>;
|
|
628
|
+
reference: Base64String;
|
|
629
|
+
options?: SignActionOptions;
|
|
707
630
|
}
|
|
708
631
|
```
|
|
709
632
|
|
|
633
|
+
See also: [Base64String](#type-base64string), [PositiveIntegerOrZero](#type-positiveintegerorzero), [SignActionOptions](#interface-signactionoptions), [SignActionSpend](#interface-signactionspend)
|
|
634
|
+
|
|
710
635
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
711
636
|
|
|
712
637
|
---
|
|
713
|
-
### Interface:
|
|
638
|
+
### Interface: SignActionOptions
|
|
714
639
|
|
|
715
640
|
```ts
|
|
716
|
-
export interface
|
|
717
|
-
|
|
641
|
+
export interface SignActionOptions {
|
|
642
|
+
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
643
|
+
returnTXIDOnly?: BooleanDefaultFalse;
|
|
644
|
+
noSend?: BooleanDefaultFalse;
|
|
645
|
+
sendWith?: TXIDHexString[];
|
|
718
646
|
}
|
|
719
647
|
```
|
|
720
648
|
|
|
649
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [BooleanDefaultTrue](#type-booleandefaulttrue), [TXIDHexString](#type-txidhexstring)
|
|
650
|
+
|
|
721
651
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
722
652
|
|
|
723
653
|
---
|
|
724
|
-
### Interface:
|
|
654
|
+
### Interface: SignActionResult
|
|
725
655
|
|
|
726
656
|
```ts
|
|
727
|
-
export interface
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
657
|
+
export interface SignActionResult {
|
|
658
|
+
txid?: TXIDHexString;
|
|
659
|
+
tx?: AtomicBEEF;
|
|
660
|
+
sendWithResults?: Array<SendWithResult>;
|
|
731
661
|
}
|
|
732
662
|
```
|
|
733
663
|
|
|
664
|
+
See also: [AtomicBEEF](#type-atomicbeef), [SendWithResult](#interface-sendwithresult), [TXIDHexString](#type-txidhexstring)
|
|
665
|
+
|
|
734
666
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
735
667
|
|
|
736
668
|
---
|
|
737
|
-
### Interface:
|
|
669
|
+
### Interface: SignActionSpend
|
|
738
670
|
|
|
739
671
|
```ts
|
|
740
|
-
export interface
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
offset?: PositiveIntegerOrZero;
|
|
744
|
-
seekPermission?: BooleanDefaultTrue;
|
|
672
|
+
export interface SignActionSpend {
|
|
673
|
+
unlockingScript: HexString;
|
|
674
|
+
sequenceNumber?: PositiveIntegerOrZero;
|
|
745
675
|
}
|
|
746
676
|
```
|
|
747
677
|
|
|
678
|
+
See also: [HexString](#type-hexstring), [PositiveIntegerOrZero](#type-positiveintegerorzero)
|
|
679
|
+
|
|
748
680
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
749
681
|
|
|
750
682
|
---
|
|
751
|
-
### Interface:
|
|
683
|
+
### Interface: SignableTransaction
|
|
752
684
|
|
|
753
685
|
```ts
|
|
754
|
-
export interface
|
|
755
|
-
|
|
756
|
-
|
|
686
|
+
export interface SignableTransaction {
|
|
687
|
+
tx: AtomicBEEF;
|
|
688
|
+
reference: Base64String;
|
|
757
689
|
}
|
|
758
690
|
```
|
|
759
691
|
|
|
692
|
+
See also: [AtomicBEEF](#type-atomicbeef), [Base64String](#type-base64string)
|
|
693
|
+
|
|
760
694
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
761
695
|
|
|
762
696
|
---
|
|
763
|
-
### Interface:
|
|
697
|
+
### Interface: VerifyHmacArgs
|
|
764
698
|
|
|
765
699
|
```ts
|
|
766
|
-
export interface
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
offset?: PositiveIntegerOrZero;
|
|
770
|
-
seekPermission?: BooleanDefaultTrue;
|
|
700
|
+
export interface VerifyHmacArgs extends WalletEncryptionArgs {
|
|
701
|
+
data: Byte[];
|
|
702
|
+
hmac: Byte[];
|
|
771
703
|
}
|
|
772
704
|
```
|
|
773
705
|
|
|
706
|
+
See also: [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryptionargs)
|
|
707
|
+
|
|
774
708
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
775
709
|
|
|
776
710
|
---
|
|
777
|
-
### Interface:
|
|
778
|
-
|
|
779
|
-
Every method of the `Wallet` interface has a return value of the form `Promise<object>`.
|
|
780
|
-
When errors occur, an exception object may be thrown which must conform to the `WalletError` interface.
|
|
781
|
-
Serialization layers can rely on the `isError` property being unique to error objects.
|
|
782
|
-
Deserialization should rethrow `WalletError` conforming objects.
|
|
711
|
+
### Interface: VerifySignatureArgs
|
|
783
712
|
|
|
784
713
|
```ts
|
|
785
|
-
export interface
|
|
786
|
-
|
|
714
|
+
export interface VerifySignatureArgs extends WalletEncryptionArgs {
|
|
715
|
+
data?: Byte[];
|
|
716
|
+
hashToDirectlyVerify?: Byte[];
|
|
717
|
+
signature: Byte[];
|
|
718
|
+
forSelf?: BooleanDefaultFalse;
|
|
787
719
|
}
|
|
788
720
|
```
|
|
789
721
|
|
|
722
|
+
See also: [BooleanDefaultFalse](#type-booleandefaultfalse), [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryptionargs)
|
|
723
|
+
|
|
790
724
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
791
725
|
|
|
792
726
|
---
|
|
@@ -872,6 +806,8 @@ export interface Wallet {
|
|
|
872
806
|
}
|
|
873
807
|
```
|
|
874
808
|
|
|
809
|
+
See also: [AbortActionArgs](#interface-abortactionargs), [AbortActionResult](#interface-abortactionresult), [AcquireCertificateArgs](#interface-acquirecertificateargs), [AcquireCertificateResult](#interface-acquirecertificateresult), [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [Byte](#type-byte), [CreateActionArgs](#interface-createactionargs), [CreateActionResult](#interface-createactionresult), [CreateHmacArgs](#interface-createhmacargs), [CreateSignatureArgs](#interface-createsignatureargs), [DiscoverByAttributesArgs](#interface-discoverbyattributesargs), [DiscoverByIdentityKeyArgs](#interface-discoverbyidentitykeyargs), [DiscoverCertificatesResult](#interface-discovercertificatesresult), [GetPublicKeyArgs](#interface-getpublickeyargs), [HexString](#type-hexstring), [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), [OutpointString](#type-outpointstring), [PositiveInteger](#type-positiveinteger), [ProveCertificateArgs](#interface-provecertificateargs), [ProveCertificateResult](#interface-provecertificateresult), [PubKeyHex](#type-pubkeyhex), [RelinquishCertificateArgs](#interface-relinquishcertificateargs), [RevealCounterpartyKeyLinkageArgs](#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](#interface-revealcounterpartykeylinkageresult), [RevealSpecificKeyLinkageArgs](#interface-revealspecifickeylinkageargs), [RevealSpecificKeyLinkageResult](#interface-revealspecifickeylinkageresult), [SignActionArgs](#interface-signactionargs), [SignActionResult](#interface-signactionresult), [VerifyHmacArgs](#interface-verifyhmacargs), [VerifySignatureArgs](#interface-verifysignatureargs), [VersionString7To30Bytes](#type-versionstring7to30bytes), [WalletDecryptArgs](#interface-walletdecryptargs), [WalletEncryptArgs](#interface-walletencryptargs), [WalletNetwork](#type-walletnetwork), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
810
|
+
|
|
875
811
|
<details>
|
|
876
812
|
|
|
877
813
|
<summary>Interface Wallet Details</summary>
|
|
@@ -883,6 +819,7 @@ Aborts a transaction that is in progress and has not yet been finalized or sent
|
|
|
883
819
|
```ts
|
|
884
820
|
abortAction: (args: AbortActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AbortActionResult>
|
|
885
821
|
```
|
|
822
|
+
See also: [AbortActionArgs](#interface-abortactionargs), [AbortActionResult](#interface-abortactionresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
886
823
|
|
|
887
824
|
#### Property acquireCertificate
|
|
888
825
|
|
|
@@ -891,6 +828,7 @@ Acquires an identity certificate, whether by acquiring one from the certifier or
|
|
|
891
828
|
```ts
|
|
892
829
|
acquireCertificate: (args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AcquireCertificateResult>
|
|
893
830
|
```
|
|
831
|
+
See also: [AcquireCertificateArgs](#interface-acquirecertificateargs), [AcquireCertificateResult](#interface-acquirecertificateresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
894
832
|
|
|
895
833
|
#### Property createAction
|
|
896
834
|
|
|
@@ -899,6 +837,7 @@ Creates a new Bitcoin transaction based on the provided inputs, outputs, labels,
|
|
|
899
837
|
```ts
|
|
900
838
|
createAction: (args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateActionResult>
|
|
901
839
|
```
|
|
840
|
+
See also: [CreateActionArgs](#interface-createactionargs), [CreateActionResult](#interface-createactionresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
902
841
|
|
|
903
842
|
#### Property createHmac
|
|
904
843
|
|
|
@@ -909,6 +848,7 @@ createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder2
|
|
|
909
848
|
hmac: Byte[];
|
|
910
849
|
}>
|
|
911
850
|
```
|
|
851
|
+
See also: [Byte](#type-byte), [CreateHmacArgs](#interface-createhmacargs), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
912
852
|
|
|
913
853
|
#### Property createSignature
|
|
914
854
|
|
|
@@ -919,6 +859,7 @@ createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameSt
|
|
|
919
859
|
signature: Byte[];
|
|
920
860
|
}>
|
|
921
861
|
```
|
|
862
|
+
See also: [Byte](#type-byte), [CreateSignatureArgs](#interface-createsignatureargs), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
922
863
|
|
|
923
864
|
#### Property decrypt
|
|
924
865
|
|
|
@@ -929,6 +870,7 @@ decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder2
|
|
|
929
870
|
plaintext: Byte[];
|
|
930
871
|
}>
|
|
931
872
|
```
|
|
873
|
+
See also: [Byte](#type-byte), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [WalletDecryptArgs](#interface-walletdecryptargs)
|
|
932
874
|
|
|
933
875
|
#### Property discoverByAttributes
|
|
934
876
|
|
|
@@ -937,6 +879,7 @@ Discovers identity certificates belonging to other users, where the documents co
|
|
|
937
879
|
```ts
|
|
938
880
|
discoverByAttributes: (args: DiscoverByAttributesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>
|
|
939
881
|
```
|
|
882
|
+
See also: [DiscoverByAttributesArgs](#interface-discoverbyattributesargs), [DiscoverCertificatesResult](#interface-discovercertificatesresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
940
883
|
|
|
941
884
|
#### Property discoverByIdentityKey
|
|
942
885
|
|
|
@@ -945,6 +888,7 @@ Discovers identity certificates, issued to a given identity key by a trusted ent
|
|
|
945
888
|
```ts
|
|
946
889
|
discoverByIdentityKey: (args: DiscoverByIdentityKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>
|
|
947
890
|
```
|
|
891
|
+
See also: [DiscoverByIdentityKeyArgs](#interface-discoverbyidentitykeyargs), [DiscoverCertificatesResult](#interface-discovercertificatesresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
948
892
|
|
|
949
893
|
#### Property encrypt
|
|
950
894
|
|
|
@@ -955,6 +899,7 @@ encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder2
|
|
|
955
899
|
ciphertext: Byte[];
|
|
956
900
|
}>
|
|
957
901
|
```
|
|
902
|
+
See also: [Byte](#type-byte), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [WalletEncryptArgs](#interface-walletencryptargs)
|
|
958
903
|
|
|
959
904
|
#### Property getHeaderForHeight
|
|
960
905
|
|
|
@@ -967,6 +912,7 @@ getHeaderForHeight: (args: {
|
|
|
967
912
|
header: HexString;
|
|
968
913
|
}>
|
|
969
914
|
```
|
|
915
|
+
See also: [HexString](#type-hexstring), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [PositiveInteger](#type-positiveinteger)
|
|
970
916
|
|
|
971
917
|
#### Property getHeight
|
|
972
918
|
|
|
@@ -977,6 +923,7 @@ getHeight: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => P
|
|
|
977
923
|
height: PositiveInteger;
|
|
978
924
|
}>
|
|
979
925
|
```
|
|
926
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [PositiveInteger](#type-positiveinteger)
|
|
980
927
|
|
|
981
928
|
#### Property getNetwork
|
|
982
929
|
|
|
@@ -987,6 +934,7 @@ getNetwork: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) =>
|
|
|
987
934
|
network: WalletNetwork;
|
|
988
935
|
}>
|
|
989
936
|
```
|
|
937
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [WalletNetwork](#type-walletnetwork)
|
|
990
938
|
|
|
991
939
|
#### Property getPublicKey
|
|
992
940
|
|
|
@@ -997,6 +945,7 @@ getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUn
|
|
|
997
945
|
publicKey: PubKeyHex;
|
|
998
946
|
}>
|
|
999
947
|
```
|
|
948
|
+
See also: [GetPublicKeyArgs](#interface-getpublickeyargs), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [PubKeyHex](#type-pubkeyhex)
|
|
1000
949
|
|
|
1001
950
|
#### Property getVersion
|
|
1002
951
|
|
|
@@ -1007,6 +956,7 @@ getVersion: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) =>
|
|
|
1007
956
|
version: VersionString7To30Bytes;
|
|
1008
957
|
}>
|
|
1009
958
|
```
|
|
959
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [VersionString7To30Bytes](#type-versionstring7to30bytes)
|
|
1010
960
|
|
|
1011
961
|
#### Property internalizeAction
|
|
1012
962
|
|
|
@@ -1015,6 +965,7 @@ Submits a transaction to be internalized and optionally labeled, outputs paid to
|
|
|
1015
965
|
```ts
|
|
1016
966
|
internalizeAction: (args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<InternalizeActionResult>
|
|
1017
967
|
```
|
|
968
|
+
See also: [InternalizeActionArgs](#interface-internalizeactionargs), [InternalizeActionResult](#interface-internalizeactionresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
1018
969
|
|
|
1019
970
|
#### Property isAuthenticated
|
|
1020
971
|
|
|
@@ -1025,6 +976,7 @@ isAuthenticated: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes
|
|
|
1025
976
|
authenticated: boolean;
|
|
1026
977
|
}>
|
|
1027
978
|
```
|
|
979
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
1028
980
|
|
|
1029
981
|
#### Property listActions
|
|
1030
982
|
|
|
@@ -1033,6 +985,7 @@ Lists all transactions matching the specified labels.
|
|
|
1033
985
|
```ts
|
|
1034
986
|
listActions: (args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListActionsResult>
|
|
1035
987
|
```
|
|
988
|
+
See also: [ListActionsArgs](#interface-listactionsargs), [ListActionsResult](#interface-listactionsresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
1036
989
|
|
|
1037
990
|
#### Property listCertificates
|
|
1038
991
|
|
|
@@ -1041,6 +994,7 @@ Lists identity certificates belonging to the user, filtered by certifier(s) and
|
|
|
1041
994
|
```ts
|
|
1042
995
|
listCertificates: (args: ListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListCertificatesResult>
|
|
1043
996
|
```
|
|
997
|
+
See also: [ListCertificatesArgs](#interface-listcertificatesargs), [ListCertificatesResult](#interface-listcertificatesresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
1044
998
|
|
|
1045
999
|
#### Property listOutputs
|
|
1046
1000
|
|
|
@@ -1049,6 +1003,7 @@ Lists the spendable outputs kept within a specific basket, optionally tagged wit
|
|
|
1049
1003
|
```ts
|
|
1050
1004
|
listOutputs: (args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListOutputsResult>
|
|
1051
1005
|
```
|
|
1006
|
+
See also: [ListOutputsArgs](#interface-listoutputsargs), [ListOutputsResult](#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
1052
1007
|
|
|
1053
1008
|
#### Property proveCertificate
|
|
1054
1009
|
|
|
@@ -1057,6 +1012,7 @@ Proves select fields of an identity certificate, as specified, when requested by
|
|
|
1057
1012
|
```ts
|
|
1058
1013
|
proveCertificate: (args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ProveCertificateResult>
|
|
1059
1014
|
```
|
|
1015
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [ProveCertificateArgs](#interface-provecertificateargs), [ProveCertificateResult](#interface-provecertificateresult)
|
|
1060
1016
|
|
|
1061
1017
|
#### Property relinquishCertificate
|
|
1062
1018
|
|
|
@@ -1067,6 +1023,7 @@ relinquishCertificate: (args: RelinquishCertificateArgs, originator?: Originator
|
|
|
1067
1023
|
relinquished: true;
|
|
1068
1024
|
}>
|
|
1069
1025
|
```
|
|
1026
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [RelinquishCertificateArgs](#interface-relinquishcertificateargs)
|
|
1070
1027
|
|
|
1071
1028
|
#### Property relinquishOutput
|
|
1072
1029
|
|
|
@@ -1080,6 +1037,7 @@ relinquishOutput: (args: {
|
|
|
1080
1037
|
relinquished: true;
|
|
1081
1038
|
}>
|
|
1082
1039
|
```
|
|
1040
|
+
See also: [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [OutpointString](#type-outpointstring)
|
|
1083
1041
|
|
|
1084
1042
|
#### Property revealCounterpartyKeyLinkage
|
|
1085
1043
|
|
|
@@ -1088,6 +1046,7 @@ Reveals the key linkage between ourselves and a counterparty, to a particular ve
|
|
|
1088
1046
|
```ts
|
|
1089
1047
|
revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>
|
|
1090
1048
|
```
|
|
1049
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [RevealCounterpartyKeyLinkageArgs](#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](#interface-revealcounterpartykeylinkageresult)
|
|
1091
1050
|
|
|
1092
1051
|
#### Property revealSpecificKeyLinkage
|
|
1093
1052
|
|
|
@@ -1096,6 +1055,7 @@ Reveals the key linkage between ourselves and a counterparty, to a particular ve
|
|
|
1096
1055
|
```ts
|
|
1097
1056
|
revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>
|
|
1098
1057
|
```
|
|
1058
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [RevealSpecificKeyLinkageArgs](#interface-revealspecifickeylinkageargs), [RevealSpecificKeyLinkageResult](#interface-revealspecifickeylinkageresult)
|
|
1099
1059
|
|
|
1100
1060
|
#### Property signAction
|
|
1101
1061
|
|
|
@@ -1104,38 +1064,210 @@ Signs a transaction previously created using `createAction`.
|
|
|
1104
1064
|
```ts
|
|
1105
1065
|
signAction: (args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<SignActionResult>
|
|
1106
1066
|
```
|
|
1067
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [SignActionArgs](#interface-signactionargs), [SignActionResult](#interface-signactionresult)
|
|
1107
1068
|
|
|
1108
1069
|
#### Property verifyHmac
|
|
1109
1070
|
|
|
1110
1071
|
Verifies an HMAC (Hash-based Message Authentication Code) based on the provided data, protocol, key ID, counterparty, and other factors.
|
|
1111
1072
|
|
|
1112
1073
|
```ts
|
|
1113
|
-
verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
1114
|
-
valid: true;
|
|
1115
|
-
}>
|
|
1074
|
+
verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
1075
|
+
valid: true;
|
|
1076
|
+
}>
|
|
1077
|
+
```
|
|
1078
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [VerifyHmacArgs](#interface-verifyhmacargs)
|
|
1079
|
+
|
|
1080
|
+
#### Property verifySignature
|
|
1081
|
+
|
|
1082
|
+
Verifies a digital signature for the provided data or hash using a specific protocol, key, and optionally considering privilege and counterparty.
|
|
1083
|
+
|
|
1084
|
+
```ts
|
|
1085
|
+
verifySignature: (args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
1086
|
+
valid: true;
|
|
1087
|
+
}>
|
|
1088
|
+
```
|
|
1089
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [VerifySignatureArgs](#interface-verifysignatureargs)
|
|
1090
|
+
|
|
1091
|
+
#### Property waitForAuthentication
|
|
1092
|
+
|
|
1093
|
+
Continuously waits until the user is authenticated, returning the result once confirmed.
|
|
1094
|
+
|
|
1095
|
+
```ts
|
|
1096
|
+
waitForAuthentication: (args: {}, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<{
|
|
1097
|
+
authenticated: true;
|
|
1098
|
+
}>
|
|
1099
|
+
```
|
|
1100
|
+
See also: [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes)
|
|
1101
|
+
|
|
1102
|
+
</details>
|
|
1103
|
+
|
|
1104
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1105
|
+
|
|
1106
|
+
---
|
|
1107
|
+
### Interface: WalletAction
|
|
1108
|
+
|
|
1109
|
+
```ts
|
|
1110
|
+
export interface WalletAction {
|
|
1111
|
+
txid: TXIDHexString;
|
|
1112
|
+
satoshis: SatoshiValue;
|
|
1113
|
+
status: ActionStatus;
|
|
1114
|
+
isOutgoing: boolean;
|
|
1115
|
+
description: DescriptionString5to50Bytes;
|
|
1116
|
+
labels?: LabelStringUnder300Bytes[];
|
|
1117
|
+
version: PositiveIntegerOrZero;
|
|
1118
|
+
lockTime: PositiveIntegerOrZero;
|
|
1119
|
+
inputs?: Array<WalletActionInput>;
|
|
1120
|
+
outputs?: Array<WalletActionOutput>;
|
|
1121
|
+
}
|
|
1122
|
+
```
|
|
1123
|
+
|
|
1124
|
+
See also: [ActionStatus](#type-actionstatus), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [LabelStringUnder300Bytes](#type-labelstringunder300bytes), [PositiveIntegerOrZero](#type-positiveintegerorzero), [SatoshiValue](#type-satoshivalue), [TXIDHexString](#type-txidhexstring), [WalletActionInput](#interface-walletactioninput), [WalletActionOutput](#interface-walletactionoutput)
|
|
1125
|
+
|
|
1126
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1127
|
+
|
|
1128
|
+
---
|
|
1129
|
+
### Interface: WalletActionInput
|
|
1130
|
+
|
|
1131
|
+
```ts
|
|
1132
|
+
export interface WalletActionInput {
|
|
1133
|
+
sourceOutpoint: OutpointString;
|
|
1134
|
+
sourceSatoshis: SatoshiValue;
|
|
1135
|
+
sourceLockingScript?: HexString;
|
|
1136
|
+
unlockingScript?: HexString;
|
|
1137
|
+
inputDescription: DescriptionString5to50Bytes;
|
|
1138
|
+
sequenceNumber: PositiveIntegerOrZero;
|
|
1139
|
+
}
|
|
1140
|
+
```
|
|
1141
|
+
|
|
1142
|
+
See also: [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [HexString](#type-hexstring), [OutpointString](#type-outpointstring), [PositiveIntegerOrZero](#type-positiveintegerorzero), [SatoshiValue](#type-satoshivalue)
|
|
1143
|
+
|
|
1144
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1145
|
+
|
|
1146
|
+
---
|
|
1147
|
+
### Interface: WalletActionOutput
|
|
1148
|
+
|
|
1149
|
+
```ts
|
|
1150
|
+
export interface WalletActionOutput {
|
|
1151
|
+
satoshis: SatoshiValue;
|
|
1152
|
+
lockingScript?: HexString;
|
|
1153
|
+
spendable: boolean;
|
|
1154
|
+
customInstructions?: string;
|
|
1155
|
+
tags: OutputTagStringUnder300Bytes[];
|
|
1156
|
+
outputIndex: PositiveIntegerOrZero;
|
|
1157
|
+
outputDescription: DescriptionString5to50Bytes;
|
|
1158
|
+
basket: BasketStringUnder300Bytes;
|
|
1159
|
+
}
|
|
1160
|
+
```
|
|
1161
|
+
|
|
1162
|
+
See also: [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [HexString](#type-hexstring), [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes), [PositiveIntegerOrZero](#type-positiveintegerorzero), [SatoshiValue](#type-satoshivalue)
|
|
1163
|
+
|
|
1164
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1165
|
+
|
|
1166
|
+
---
|
|
1167
|
+
### Interface: WalletCertificate
|
|
1168
|
+
|
|
1169
|
+
```ts
|
|
1170
|
+
export interface WalletCertificate {
|
|
1171
|
+
type: Base64String;
|
|
1172
|
+
subject: PubKeyHex;
|
|
1173
|
+
serialNumber: Base64String;
|
|
1174
|
+
certifier: PubKeyHex;
|
|
1175
|
+
revocationOutpoint: OutpointString;
|
|
1176
|
+
signature: HexString;
|
|
1177
|
+
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
1178
|
+
}
|
|
1179
|
+
```
|
|
1180
|
+
|
|
1181
|
+
See also: [Base64String](#type-base64string), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [HexString](#type-hexstring), [OutpointString](#type-outpointstring), [PubKeyHex](#type-pubkeyhex)
|
|
1182
|
+
|
|
1183
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1184
|
+
|
|
1185
|
+
---
|
|
1186
|
+
### Interface: WalletDecryptArgs
|
|
1187
|
+
|
|
1188
|
+
```ts
|
|
1189
|
+
export interface WalletDecryptArgs extends WalletEncryptionArgs {
|
|
1190
|
+
ciphertext: Byte[];
|
|
1191
|
+
}
|
|
1192
|
+
```
|
|
1193
|
+
|
|
1194
|
+
See also: [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryptionargs)
|
|
1195
|
+
|
|
1196
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1197
|
+
|
|
1198
|
+
---
|
|
1199
|
+
### Interface: WalletEncryptArgs
|
|
1200
|
+
|
|
1201
|
+
```ts
|
|
1202
|
+
export interface WalletEncryptArgs extends WalletEncryptionArgs {
|
|
1203
|
+
plaintext: Byte[];
|
|
1204
|
+
}
|
|
1205
|
+
```
|
|
1206
|
+
|
|
1207
|
+
See also: [Byte](#type-byte), [WalletEncryptionArgs](#interface-walletencryptionargs)
|
|
1208
|
+
|
|
1209
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1210
|
+
|
|
1211
|
+
---
|
|
1212
|
+
### Interface: WalletEncryptionArgs
|
|
1213
|
+
|
|
1214
|
+
```ts
|
|
1215
|
+
export interface WalletEncryptionArgs extends KeyLinkageArgs {
|
|
1216
|
+
seekPermission?: BooleanDefaultTrue;
|
|
1217
|
+
}
|
|
1218
|
+
```
|
|
1219
|
+
|
|
1220
|
+
See also: [BooleanDefaultTrue](#type-booleandefaulttrue), [KeyLinkageArgs](#interface-keylinkageargs)
|
|
1221
|
+
|
|
1222
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1223
|
+
|
|
1224
|
+
---
|
|
1225
|
+
### Interface: WalletErrorObject
|
|
1226
|
+
|
|
1227
|
+
Every method of the `Wallet` interface has a return value of the form `Promise<object>`.
|
|
1228
|
+
When errors occur, an exception object may be thrown which must conform to the `WalletError` interface.
|
|
1229
|
+
Serialization layers can rely on the `isError` property being unique to error objects.
|
|
1230
|
+
Deserialization should rethrow `WalletError` conforming objects.
|
|
1231
|
+
|
|
1232
|
+
```ts
|
|
1233
|
+
export interface WalletErrorObject extends Error {
|
|
1234
|
+
isError: true;
|
|
1235
|
+
}
|
|
1116
1236
|
```
|
|
1117
1237
|
|
|
1118
|
-
|
|
1238
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1119
1239
|
|
|
1120
|
-
|
|
1240
|
+
---
|
|
1241
|
+
### Interface: WalletOutput
|
|
1121
1242
|
|
|
1122
1243
|
```ts
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1244
|
+
export interface WalletOutput {
|
|
1245
|
+
satoshis: SatoshiValue;
|
|
1246
|
+
lockingScript?: HexString;
|
|
1247
|
+
spendable: true;
|
|
1248
|
+
customInstructions?: string;
|
|
1249
|
+
tags?: OutputTagStringUnder300Bytes[];
|
|
1250
|
+
outpoint: OutpointString;
|
|
1251
|
+
labels?: LabelStringUnder300Bytes[];
|
|
1252
|
+
}
|
|
1126
1253
|
```
|
|
1127
1254
|
|
|
1128
|
-
|
|
1255
|
+
See also: [HexString](#type-hexstring), [LabelStringUnder300Bytes](#type-labelstringunder300bytes), [OutpointString](#type-outpointstring), [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes), [SatoshiValue](#type-satoshivalue)
|
|
1129
1256
|
|
|
1130
|
-
|
|
1257
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1258
|
+
|
|
1259
|
+
---
|
|
1260
|
+
### Interface: WalletPayment
|
|
1131
1261
|
|
|
1132
1262
|
```ts
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1263
|
+
export interface WalletPayment {
|
|
1264
|
+
derivationPrefix: Base64String;
|
|
1265
|
+
derivationSuffix: Base64String;
|
|
1266
|
+
senderIdentityKey: PubKeyHex;
|
|
1267
|
+
}
|
|
1136
1268
|
```
|
|
1137
1269
|
|
|
1138
|
-
|
|
1270
|
+
See also: [Base64String](#type-base64string), [PubKeyHex](#type-pubkeyhex)
|
|
1139
1271
|
|
|
1140
1272
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1141
1273
|
|
|
@@ -1172,15 +1304,17 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1172
1304
|
|
|
1173
1305
|
---
|
|
1174
1306
|
|
|
1175
|
-
### Class:
|
|
1307
|
+
### Class: CachedKeyDeriver
|
|
1176
1308
|
|
|
1177
|
-
|
|
1178
|
-
|
|
1309
|
+
A cached version of KeyDeriver that caches the results of key derivation methods.
|
|
1310
|
+
This is useful for optimizing performance when the same keys are derived multiple times.
|
|
1311
|
+
It supports configurable cache size with sane defaults and maintains cache entries using LRU (Least Recently Used) eviction policy.
|
|
1179
1312
|
|
|
1180
1313
|
```ts
|
|
1181
|
-
export default class
|
|
1182
|
-
rootKey: PrivateKey
|
|
1183
|
-
|
|
1314
|
+
export default class CachedKeyDeriver {
|
|
1315
|
+
constructor(rootKey: PrivateKey | "anyone", options?: {
|
|
1316
|
+
maxCacheSize?: number;
|
|
1317
|
+
})
|
|
1184
1318
|
derivePublicKey(protocolID: [
|
|
1185
1319
|
0 | 1 | 2,
|
|
1186
1320
|
string
|
|
@@ -1201,26 +1335,34 @@ export default class KeyDeriver {
|
|
|
1201
1335
|
}
|
|
1202
1336
|
```
|
|
1203
1337
|
|
|
1338
|
+
See also: [PrivateKey](#class-privatekey), [PublicKey](#class-publickey), [SymmetricKey](#class-symmetrickey)
|
|
1339
|
+
|
|
1204
1340
|
<details>
|
|
1205
1341
|
|
|
1206
|
-
<summary>Class
|
|
1342
|
+
<summary>Class CachedKeyDeriver Details</summary>
|
|
1207
1343
|
|
|
1208
1344
|
#### Constructor
|
|
1209
1345
|
|
|
1210
|
-
Initializes the
|
|
1346
|
+
Initializes the CachedKeyDeriver instance with a root private key and optional cache settings.
|
|
1211
1347
|
|
|
1212
1348
|
```ts
|
|
1213
|
-
constructor(rootKey: PrivateKey | "anyone"
|
|
1349
|
+
constructor(rootKey: PrivateKey | "anyone", options?: {
|
|
1350
|
+
maxCacheSize?: number;
|
|
1351
|
+
})
|
|
1214
1352
|
```
|
|
1353
|
+
See also: [PrivateKey](#class-privatekey)
|
|
1215
1354
|
|
|
1216
1355
|
Argument Details
|
|
1217
1356
|
|
|
1218
1357
|
+ **rootKey**
|
|
1219
1358
|
+ The root private key or the string 'anyone'.
|
|
1359
|
+
+ **options**
|
|
1360
|
+
+ Optional settings for the cache.
|
|
1220
1361
|
|
|
1221
1362
|
#### Method derivePrivateKey
|
|
1222
1363
|
|
|
1223
1364
|
Derives a private key based on protocol ID, key ID, and counterparty.
|
|
1365
|
+
Caches the result for future calls with the same parameters.
|
|
1224
1366
|
|
|
1225
1367
|
```ts
|
|
1226
1368
|
derivePrivateKey(protocolID: [
|
|
@@ -1228,6 +1370,7 @@ derivePrivateKey(protocolID: [
|
|
|
1228
1370
|
string
|
|
1229
1371
|
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): PrivateKey
|
|
1230
1372
|
```
|
|
1373
|
+
See also: [PrivateKey](#class-privatekey), [PublicKey](#class-publickey)
|
|
1231
1374
|
|
|
1232
1375
|
Returns
|
|
1233
1376
|
|
|
@@ -1245,6 +1388,7 @@ Argument Details
|
|
|
1245
1388
|
#### Method derivePublicKey
|
|
1246
1389
|
|
|
1247
1390
|
Derives a public key based on protocol ID, key ID, and counterparty.
|
|
1391
|
+
Caches the result for future calls with the same parameters.
|
|
1248
1392
|
|
|
1249
1393
|
```ts
|
|
1250
1394
|
derivePublicKey(protocolID: [
|
|
@@ -1252,6 +1396,7 @@ derivePublicKey(protocolID: [
|
|
|
1252
1396
|
string
|
|
1253
1397
|
], keyID: string, counterparty: PublicKey | string | "self" | "anyone", forSelf: boolean = false): PublicKey
|
|
1254
1398
|
```
|
|
1399
|
+
See also: [PublicKey](#class-publickey)
|
|
1255
1400
|
|
|
1256
1401
|
Returns
|
|
1257
1402
|
|
|
@@ -1271,7 +1416,7 @@ Argument Details
|
|
|
1271
1416
|
#### Method deriveSymmetricKey
|
|
1272
1417
|
|
|
1273
1418
|
Derives a symmetric key based on protocol ID, key ID, and counterparty.
|
|
1274
|
-
|
|
1419
|
+
Caches the result for future calls with the same parameters.
|
|
1275
1420
|
|
|
1276
1421
|
```ts
|
|
1277
1422
|
deriveSymmetricKey(protocolID: [
|
|
@@ -1279,6 +1424,7 @@ deriveSymmetricKey(protocolID: [
|
|
|
1279
1424
|
string
|
|
1280
1425
|
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): SymmetricKey
|
|
1281
1426
|
```
|
|
1427
|
+
See also: [PublicKey](#class-publickey), [SymmetricKey](#class-symmetrickey)
|
|
1282
1428
|
|
|
1283
1429
|
Returns
|
|
1284
1430
|
|
|
@@ -1300,11 +1446,12 @@ Throws
|
|
|
1300
1446
|
#### Method revealCounterpartySecret
|
|
1301
1447
|
|
|
1302
1448
|
Reveals the shared secret between the root key and the counterparty.
|
|
1303
|
-
|
|
1449
|
+
Caches the result for future calls with the same parameters.
|
|
1304
1450
|
|
|
1305
1451
|
```ts
|
|
1306
1452
|
revealCounterpartySecret(counterparty: PublicKey | string | "self" | "anyone"): number[]
|
|
1307
1453
|
```
|
|
1454
|
+
See also: [PublicKey](#class-publickey)
|
|
1308
1455
|
|
|
1309
1456
|
Returns
|
|
1310
1457
|
|
|
@@ -1322,6 +1469,7 @@ Throws
|
|
|
1322
1469
|
#### Method revealSpecificSecret
|
|
1323
1470
|
|
|
1324
1471
|
Reveals the specific key association for a given protocol ID, key ID, and counterparty.
|
|
1472
|
+
Caches the result for future calls with the same parameters.
|
|
1325
1473
|
|
|
1326
1474
|
```ts
|
|
1327
1475
|
revealSpecificSecret(counterparty: PublicKey | string | "self" | "anyone", protocolID: [
|
|
@@ -1329,6 +1477,7 @@ revealSpecificSecret(counterparty: PublicKey | string | "self" | "anyone", proto
|
|
|
1329
1477
|
string
|
|
1330
1478
|
], keyID: string): number[]
|
|
1331
1479
|
```
|
|
1480
|
+
See also: [PublicKey](#class-publickey)
|
|
1332
1481
|
|
|
1333
1482
|
Returns
|
|
1334
1483
|
|
|
@@ -1348,17 +1497,32 @@ Argument Details
|
|
|
1348
1497
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1349
1498
|
|
|
1350
1499
|
---
|
|
1351
|
-
### Class:
|
|
1500
|
+
### Class: HTTPWalletWire
|
|
1352
1501
|
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1502
|
+
```ts
|
|
1503
|
+
export default class HTTPWalletWire implements WalletWire {
|
|
1504
|
+
baseUrl: string;
|
|
1505
|
+
httpClient: typeof fetch;
|
|
1506
|
+
originator: string | undefined;
|
|
1507
|
+
constructor(originator: string | undefined, baseUrl: string = "http://localhost:3301", httpClient = fetch)
|
|
1508
|
+
async transmitToWallet(message: number[]): Promise<number[]>
|
|
1509
|
+
}
|
|
1510
|
+
```
|
|
1511
|
+
|
|
1512
|
+
See also: [WalletWire](#interface-walletwire)
|
|
1513
|
+
|
|
1514
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1515
|
+
|
|
1516
|
+
---
|
|
1517
|
+
### Class: KeyDeriver
|
|
1518
|
+
|
|
1519
|
+
Class responsible for deriving various types of keys using a root private key.
|
|
1520
|
+
It supports deriving public and private keys, symmetric keys, and revealing key linkages.
|
|
1356
1521
|
|
|
1357
1522
|
```ts
|
|
1358
|
-
export default class
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
})
|
|
1523
|
+
export default class KeyDeriver {
|
|
1524
|
+
rootKey: PrivateKey;
|
|
1525
|
+
constructor(rootKey: PrivateKey | "anyone")
|
|
1362
1526
|
derivePublicKey(protocolID: [
|
|
1363
1527
|
0 | 1 | 2,
|
|
1364
1528
|
string
|
|
@@ -1379,31 +1543,29 @@ export default class CachedKeyDeriver {
|
|
|
1379
1543
|
}
|
|
1380
1544
|
```
|
|
1381
1545
|
|
|
1546
|
+
See also: [PrivateKey](#class-privatekey), [PublicKey](#class-publickey), [SymmetricKey](#class-symmetrickey)
|
|
1547
|
+
|
|
1382
1548
|
<details>
|
|
1383
1549
|
|
|
1384
|
-
<summary>Class
|
|
1550
|
+
<summary>Class KeyDeriver Details</summary>
|
|
1385
1551
|
|
|
1386
1552
|
#### Constructor
|
|
1387
1553
|
|
|
1388
|
-
Initializes the
|
|
1554
|
+
Initializes the KeyDeriver instance with a root private key.
|
|
1389
1555
|
|
|
1390
1556
|
```ts
|
|
1391
|
-
constructor(rootKey: PrivateKey | "anyone"
|
|
1392
|
-
maxCacheSize?: number;
|
|
1393
|
-
})
|
|
1557
|
+
constructor(rootKey: PrivateKey | "anyone")
|
|
1394
1558
|
```
|
|
1559
|
+
See also: [PrivateKey](#class-privatekey)
|
|
1395
1560
|
|
|
1396
1561
|
Argument Details
|
|
1397
1562
|
|
|
1398
1563
|
+ **rootKey**
|
|
1399
1564
|
+ The root private key or the string 'anyone'.
|
|
1400
|
-
+ **options**
|
|
1401
|
-
+ Optional settings for the cache.
|
|
1402
1565
|
|
|
1403
1566
|
#### Method derivePrivateKey
|
|
1404
1567
|
|
|
1405
1568
|
Derives a private key based on protocol ID, key ID, and counterparty.
|
|
1406
|
-
Caches the result for future calls with the same parameters.
|
|
1407
1569
|
|
|
1408
1570
|
```ts
|
|
1409
1571
|
derivePrivateKey(protocolID: [
|
|
@@ -1411,6 +1573,7 @@ derivePrivateKey(protocolID: [
|
|
|
1411
1573
|
string
|
|
1412
1574
|
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): PrivateKey
|
|
1413
1575
|
```
|
|
1576
|
+
See also: [PrivateKey](#class-privatekey), [PublicKey](#class-publickey)
|
|
1414
1577
|
|
|
1415
1578
|
Returns
|
|
1416
1579
|
|
|
@@ -1428,7 +1591,6 @@ Argument Details
|
|
|
1428
1591
|
#### Method derivePublicKey
|
|
1429
1592
|
|
|
1430
1593
|
Derives a public key based on protocol ID, key ID, and counterparty.
|
|
1431
|
-
Caches the result for future calls with the same parameters.
|
|
1432
1594
|
|
|
1433
1595
|
```ts
|
|
1434
1596
|
derivePublicKey(protocolID: [
|
|
@@ -1436,6 +1598,7 @@ derivePublicKey(protocolID: [
|
|
|
1436
1598
|
string
|
|
1437
1599
|
], keyID: string, counterparty: PublicKey | string | "self" | "anyone", forSelf: boolean = false): PublicKey
|
|
1438
1600
|
```
|
|
1601
|
+
See also: [PublicKey](#class-publickey)
|
|
1439
1602
|
|
|
1440
1603
|
Returns
|
|
1441
1604
|
|
|
@@ -1455,7 +1618,7 @@ Argument Details
|
|
|
1455
1618
|
#### Method deriveSymmetricKey
|
|
1456
1619
|
|
|
1457
1620
|
Derives a symmetric key based on protocol ID, key ID, and counterparty.
|
|
1458
|
-
|
|
1621
|
+
Note: Symmetric keys should not be derivable by everyone due to security risks.
|
|
1459
1622
|
|
|
1460
1623
|
```ts
|
|
1461
1624
|
deriveSymmetricKey(protocolID: [
|
|
@@ -1463,6 +1626,7 @@ deriveSymmetricKey(protocolID: [
|
|
|
1463
1626
|
string
|
|
1464
1627
|
], keyID: string, counterparty: PublicKey | string | "self" | "anyone"): SymmetricKey
|
|
1465
1628
|
```
|
|
1629
|
+
See also: [PublicKey](#class-publickey), [SymmetricKey](#class-symmetrickey)
|
|
1466
1630
|
|
|
1467
1631
|
Returns
|
|
1468
1632
|
|
|
@@ -1484,11 +1648,12 @@ Throws
|
|
|
1484
1648
|
#### Method revealCounterpartySecret
|
|
1485
1649
|
|
|
1486
1650
|
Reveals the shared secret between the root key and the counterparty.
|
|
1487
|
-
|
|
1651
|
+
Note: This should not be used for 'self'.
|
|
1488
1652
|
|
|
1489
1653
|
```ts
|
|
1490
1654
|
revealCounterpartySecret(counterparty: PublicKey | string | "self" | "anyone"): number[]
|
|
1491
1655
|
```
|
|
1656
|
+
See also: [PublicKey](#class-publickey)
|
|
1492
1657
|
|
|
1493
1658
|
Returns
|
|
1494
1659
|
|
|
@@ -1506,7 +1671,6 @@ Throws
|
|
|
1506
1671
|
#### Method revealSpecificSecret
|
|
1507
1672
|
|
|
1508
1673
|
Reveals the specific key association for a given protocol ID, key ID, and counterparty.
|
|
1509
|
-
Caches the result for future calls with the same parameters.
|
|
1510
1674
|
|
|
1511
1675
|
```ts
|
|
1512
1676
|
revealSpecificSecret(counterparty: PublicKey | string | "self" | "anyone", protocolID: [
|
|
@@ -1514,6 +1678,7 @@ revealSpecificSecret(counterparty: PublicKey | string | "self" | "anyone", proto
|
|
|
1514
1678
|
string
|
|
1515
1679
|
], keyID: string): number[]
|
|
1516
1680
|
```
|
|
1681
|
+
See also: [PublicKey](#class-publickey)
|
|
1517
1682
|
|
|
1518
1683
|
Returns
|
|
1519
1684
|
|
|
@@ -1532,19 +1697,6 @@ Argument Details
|
|
|
1532
1697
|
|
|
1533
1698
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1534
1699
|
|
|
1535
|
-
---
|
|
1536
|
-
### Class: WalletError
|
|
1537
|
-
|
|
1538
|
-
```ts
|
|
1539
|
-
export class WalletError extends Error {
|
|
1540
|
-
code: number;
|
|
1541
|
-
isError: boolean = true;
|
|
1542
|
-
constructor(message: string, code = 1, stack?: string)
|
|
1543
|
-
}
|
|
1544
|
-
```
|
|
1545
|
-
|
|
1546
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1547
|
-
|
|
1548
1700
|
---
|
|
1549
1701
|
### Class: ProtoWallet
|
|
1550
1702
|
|
|
@@ -1988,177 +2140,37 @@ export default class ProtoWallet implements Wallet {
|
|
|
1988
2140
|
}
|
|
1989
2141
|
```
|
|
1990
2142
|
|
|
2143
|
+
See also: [BEEF](#type-beef), [Base64String](#type-base64string), [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [BooleanDefaultFalse](#type-booleandefaultfalse), [BooleanDefaultTrue](#type-booleandefaulttrue), [Byte](#type-byte), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [EntityIconURLStringMax500Bytes](#type-entityiconurlstringmax500bytes), [EntityNameStringMax100Bytes](#type-entitynamestringmax100bytes), [HexString](#type-hexstring), [ISOTimestampString](#type-isotimestampstring), [KeyDeriver](#class-keyderiver), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [LabelStringUnder300Bytes](#type-labelstringunder300bytes), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [OutpointString](#type-outpointstring), [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes), [PositiveInteger](#type-positiveinteger), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerMax10](#type-positiveintegermax10), [PositiveIntegerOrZero](#type-positiveintegerorzero), [PrivateKey](#class-privatekey), [ProtocolString5To400Bytes](#type-protocolstring5to400bytes), [PubKeyHex](#type-pubkeyhex), [SatoshiValue](#type-satoshivalue), [TXIDHexString](#type-txidhexstring), [VersionString7To30Bytes](#type-versionstring7to30bytes), [Wallet](#interface-wallet), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
2144
|
+
|
|
1991
2145
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1992
2146
|
|
|
1993
2147
|
---
|
|
1994
|
-
### Class:
|
|
2148
|
+
### Class: WalletClient
|
|
1995
2149
|
|
|
1996
|
-
|
|
2150
|
+
The SDK is how applications communicate with wallets over a communications substrate.
|
|
1997
2151
|
|
|
1998
2152
|
```ts
|
|
1999
|
-
export default class
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
}>;
|
|
2011
|
-
outputs?: Array<{
|
|
2012
|
-
lockingScript: HexString;
|
|
2013
|
-
satoshis: SatoshiValue;
|
|
2014
|
-
outputDescription: DescriptionString5to50Bytes;
|
|
2015
|
-
basket?: BasketStringUnder300Bytes;
|
|
2016
|
-
customInstructions?: string;
|
|
2017
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
2018
|
-
}>;
|
|
2019
|
-
lockTime?: PositiveIntegerOrZero;
|
|
2020
|
-
version?: PositiveIntegerOrZero;
|
|
2021
|
-
labels?: LabelStringUnder300Bytes[];
|
|
2022
|
-
options?: {
|
|
2023
|
-
signAndProcess?: BooleanDefaultTrue;
|
|
2024
|
-
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
2025
|
-
trustSelf?: "known";
|
|
2026
|
-
knownTxids?: TXIDHexString[];
|
|
2027
|
-
returnTXIDOnly?: BooleanDefaultFalse;
|
|
2028
|
-
noSend?: BooleanDefaultFalse;
|
|
2029
|
-
noSendChange?: OutpointString[];
|
|
2030
|
-
sendWith?: TXIDHexString[];
|
|
2031
|
-
};
|
|
2032
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2033
|
-
txid?: TXIDHexString;
|
|
2034
|
-
tx?: BEEF;
|
|
2035
|
-
noSendChange?: OutpointString[];
|
|
2036
|
-
sendWithResults?: Array<{
|
|
2037
|
-
txid: TXIDHexString;
|
|
2038
|
-
status: "unproven" | "sending" | "failed";
|
|
2039
|
-
}>;
|
|
2040
|
-
signableTransaction?: {
|
|
2041
|
-
tx: BEEF;
|
|
2042
|
-
reference: Base64String;
|
|
2043
|
-
};
|
|
2044
|
-
}>
|
|
2045
|
-
async signAction(args: {
|
|
2046
|
-
spends: Record<PositiveIntegerOrZero, {
|
|
2047
|
-
unlockingScript: HexString;
|
|
2048
|
-
sequenceNumber?: PositiveIntegerOrZero;
|
|
2049
|
-
}>;
|
|
2050
|
-
reference: Base64String;
|
|
2051
|
-
options?: {
|
|
2052
|
-
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
2053
|
-
returnTXIDOnly?: BooleanDefaultFalse;
|
|
2054
|
-
noSend?: BooleanDefaultFalse;
|
|
2055
|
-
noSendChange?: OutpointString[];
|
|
2056
|
-
sendWith: TXIDHexString[];
|
|
2057
|
-
};
|
|
2058
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2059
|
-
txid?: TXIDHexString;
|
|
2060
|
-
tx?: BEEF;
|
|
2061
|
-
noSendChange?: OutpointString[];
|
|
2062
|
-
sendWithResults?: Array<{
|
|
2063
|
-
txid: TXIDHexString;
|
|
2064
|
-
status: "unproven" | "sending" | "failed";
|
|
2065
|
-
}>;
|
|
2066
|
-
}>
|
|
2067
|
-
async abortAction(args: {
|
|
2068
|
-
reference: Base64String;
|
|
2069
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2070
|
-
aborted: true;
|
|
2071
|
-
}>
|
|
2072
|
-
async listActions(args: {
|
|
2073
|
-
labels: LabelStringUnder300Bytes[];
|
|
2074
|
-
labelQueryMode?: "any" | "all";
|
|
2075
|
-
includeLabels?: BooleanDefaultFalse;
|
|
2076
|
-
includeInputs?: BooleanDefaultFalse;
|
|
2077
|
-
includeInputSourceLockingScripts?: BooleanDefaultFalse;
|
|
2078
|
-
includeInputUnlockingScripts?: BooleanDefaultFalse;
|
|
2079
|
-
includeOutputs?: BooleanDefaultFalse;
|
|
2080
|
-
includeOutputLockingScripts?: BooleanDefaultFalse;
|
|
2081
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
2082
|
-
offset?: PositiveIntegerOrZero;
|
|
2083
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2084
|
-
totalActions: PositiveIntegerOrZero;
|
|
2085
|
-
actions: Array<{
|
|
2086
|
-
txid: TXIDHexString;
|
|
2087
|
-
satoshis: SatoshiValue;
|
|
2088
|
-
status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal";
|
|
2089
|
-
isOutgoing: boolean;
|
|
2090
|
-
description: DescriptionString5to50Bytes;
|
|
2091
|
-
labels?: LabelStringUnder300Bytes[];
|
|
2092
|
-
version: PositiveIntegerOrZero;
|
|
2093
|
-
lockTime: PositiveIntegerOrZero;
|
|
2094
|
-
inputs?: Array<{
|
|
2095
|
-
sourceOutpoint: OutpointString;
|
|
2096
|
-
sourceSatoshis: SatoshiValue;
|
|
2097
|
-
sourceLockingScript?: HexString;
|
|
2098
|
-
unlockingScript?: HexString;
|
|
2099
|
-
inputDescription: DescriptionString5to50Bytes;
|
|
2100
|
-
sequenceNumber: PositiveIntegerOrZero;
|
|
2101
|
-
}>;
|
|
2102
|
-
outputs?: Array<{
|
|
2103
|
-
outputIndex: PositiveIntegerOrZero;
|
|
2104
|
-
satoshis: SatoshiValue;
|
|
2105
|
-
lockingScript?: HexString;
|
|
2106
|
-
spendable: boolean;
|
|
2107
|
-
outputDescription: DescriptionString5to50Bytes;
|
|
2108
|
-
basket: BasketStringUnder300Bytes;
|
|
2109
|
-
tags: OutputTagStringUnder300Bytes[];
|
|
2110
|
-
customInstructions?: string;
|
|
2111
|
-
}>;
|
|
2112
|
-
}>;
|
|
2153
|
+
export default class WalletClient implements Wallet {
|
|
2154
|
+
public substrate: "auto" | Wallet;
|
|
2155
|
+
originator?: OriginatorDomainNameStringUnder250Bytes;
|
|
2156
|
+
constructor(substrate: "auto" | "Cicada" | "XDM" | "window.CWI" | Wallet = "auto", originator?: OriginatorDomainNameStringUnder250Bytes)
|
|
2157
|
+
async connectToSubstrate()
|
|
2158
|
+
async createAction(args: CreateActionArgs): Promise<CreateActionResult>
|
|
2159
|
+
async signAction(args: SignActionArgs): Promise<SignActionResult>
|
|
2160
|
+
async abortAction(args: {
|
|
2161
|
+
reference: Base64String;
|
|
2162
|
+
}): Promise<{
|
|
2163
|
+
aborted: true;
|
|
2113
2164
|
}>
|
|
2114
|
-
async
|
|
2115
|
-
|
|
2116
|
-
outputs: Array<{
|
|
2117
|
-
outputIndex: PositiveIntegerOrZero;
|
|
2118
|
-
protocol: "wallet payment" | "basket insertion";
|
|
2119
|
-
paymentRemittance?: {
|
|
2120
|
-
derivationPrefix: Base64String;
|
|
2121
|
-
derivationSuffix: Base64String;
|
|
2122
|
-
senderIdentityKey: PubKeyHex;
|
|
2123
|
-
};
|
|
2124
|
-
insertionRemittance?: {
|
|
2125
|
-
basket: BasketStringUnder300Bytes;
|
|
2126
|
-
customInstructions?: string;
|
|
2127
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
2128
|
-
};
|
|
2129
|
-
}>;
|
|
2130
|
-
description: DescriptionString5to50Bytes;
|
|
2131
|
-
labels?: LabelStringUnder300Bytes[];
|
|
2132
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2165
|
+
async listActions(args: ListActionsArgs): Promise<ListActionsResult>
|
|
2166
|
+
async internalizeAction(args: InternalizeActionArgs): Promise<{
|
|
2133
2167
|
accepted: true;
|
|
2134
2168
|
}>
|
|
2135
|
-
async listOutputs(args:
|
|
2136
|
-
basket: BasketStringUnder300Bytes;
|
|
2137
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
2138
|
-
tagQueryMode?: "all" | "any";
|
|
2139
|
-
include?: "locking scripts" | "entire transactions";
|
|
2140
|
-
includeCustomInstructions?: BooleanDefaultFalse;
|
|
2141
|
-
includeTags?: BooleanDefaultFalse;
|
|
2142
|
-
includeLabels?: BooleanDefaultFalse;
|
|
2143
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
2144
|
-
offset?: PositiveIntegerOrZero;
|
|
2145
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2146
|
-
totalOutputs: PositiveIntegerOrZero;
|
|
2147
|
-
outputs: Array<{
|
|
2148
|
-
outpoint: OutpointString;
|
|
2149
|
-
satoshis: SatoshiValue;
|
|
2150
|
-
lockingScript?: HexString;
|
|
2151
|
-
tx?: BEEF;
|
|
2152
|
-
spendable: true;
|
|
2153
|
-
customInstructions?: string;
|
|
2154
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
2155
|
-
labels?: LabelStringUnder300Bytes[];
|
|
2156
|
-
}>;
|
|
2157
|
-
}>
|
|
2169
|
+
async listOutputs(args: ListOutputsArgs): Promise<ListOutputsResult>
|
|
2158
2170
|
async relinquishOutput(args: {
|
|
2159
2171
|
basket: BasketStringUnder300Bytes;
|
|
2160
2172
|
output: OutpointString;
|
|
2161
|
-
}
|
|
2173
|
+
}): Promise<{
|
|
2162
2174
|
relinquished: true;
|
|
2163
2175
|
}>
|
|
2164
2176
|
async getPublicKey(args: {
|
|
@@ -2172,7 +2184,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
2172
2184
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2173
2185
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2174
2186
|
forSelf?: BooleanDefaultFalse;
|
|
2175
|
-
}
|
|
2187
|
+
}): Promise<{
|
|
2176
2188
|
publicKey: PubKeyHex;
|
|
2177
2189
|
}>
|
|
2178
2190
|
async revealCounterpartyKeyLinkage(args: {
|
|
@@ -2180,7 +2192,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
2180
2192
|
verifier: PubKeyHex;
|
|
2181
2193
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2182
2194
|
privileged?: BooleanDefaultFalse;
|
|
2183
|
-
}
|
|
2195
|
+
}): Promise<{
|
|
2184
2196
|
prover: PubKeyHex;
|
|
2185
2197
|
verifier: PubKeyHex;
|
|
2186
2198
|
counterparty: PubKeyHex;
|
|
@@ -2198,7 +2210,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
2198
2210
|
keyID: KeyIDStringUnder800Bytes;
|
|
2199
2211
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2200
2212
|
privileged?: BooleanDefaultFalse;
|
|
2201
|
-
}
|
|
2213
|
+
}): Promise<{
|
|
2202
2214
|
prover: PubKeyHex;
|
|
2203
2215
|
verifier: PubKeyHex;
|
|
2204
2216
|
counterparty: PubKeyHex;
|
|
@@ -2221,7 +2233,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
2221
2233
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2222
2234
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2223
2235
|
privileged?: BooleanDefaultFalse;
|
|
2224
|
-
}
|
|
2236
|
+
}): Promise<{
|
|
2225
2237
|
ciphertext: Byte[];
|
|
2226
2238
|
}>
|
|
2227
2239
|
async decrypt(args: {
|
|
@@ -2234,7 +2246,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
2234
2246
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2235
2247
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2236
2248
|
privileged?: BooleanDefaultFalse;
|
|
2237
|
-
}
|
|
2249
|
+
}): Promise<{
|
|
2238
2250
|
plaintext: Byte[];
|
|
2239
2251
|
}>
|
|
2240
2252
|
async createHmac(args: {
|
|
@@ -2247,7 +2259,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
2247
2259
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2248
2260
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2249
2261
|
privileged?: BooleanDefaultFalse;
|
|
2250
|
-
}
|
|
2262
|
+
}): Promise<{
|
|
2251
2263
|
hmac: Byte[];
|
|
2252
2264
|
}>
|
|
2253
2265
|
async verifyHmac(args: {
|
|
@@ -2261,7 +2273,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
2261
2273
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2262
2274
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2263
2275
|
privileged?: BooleanDefaultFalse;
|
|
2264
|
-
}
|
|
2276
|
+
}): Promise<{
|
|
2265
2277
|
valid: true;
|
|
2266
2278
|
}>
|
|
2267
2279
|
async createSignature(args: {
|
|
@@ -2275,7 +2287,7 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
2275
2287
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2276
2288
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2277
2289
|
privileged?: BooleanDefaultFalse;
|
|
2278
|
-
}
|
|
2290
|
+
}): Promise<{
|
|
2279
2291
|
signature: Byte[];
|
|
2280
2292
|
}>
|
|
2281
2293
|
async verifySignature(args: {
|
|
@@ -2291,30 +2303,10 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
2291
2303
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2292
2304
|
forSelf?: BooleanDefaultFalse;
|
|
2293
2305
|
privileged?: BooleanDefaultFalse;
|
|
2294
|
-
}
|
|
2306
|
+
}): Promise<{
|
|
2295
2307
|
valid: true;
|
|
2296
2308
|
}>
|
|
2297
|
-
async acquireCertificate(args:
|
|
2298
|
-
type: Base64String;
|
|
2299
|
-
subject: PubKeyHex;
|
|
2300
|
-
serialNumber: Base64String;
|
|
2301
|
-
revocationOutpoint: OutpointString;
|
|
2302
|
-
signature: HexString;
|
|
2303
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2304
|
-
certifier: PubKeyHex;
|
|
2305
|
-
keyringRevealer: PubKeyHex | "certifier";
|
|
2306
|
-
keyringForSubject: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2307
|
-
acquisitionProtocol: "direct" | "issuance";
|
|
2308
|
-
certifierUrl?: string;
|
|
2309
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2310
|
-
type: Base64String;
|
|
2311
|
-
subject: PubKeyHex;
|
|
2312
|
-
serialNumber: Base64String;
|
|
2313
|
-
certifier: PubKeyHex;
|
|
2314
|
-
revocationOutpoint: OutpointString;
|
|
2315
|
-
signature: HexString;
|
|
2316
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2317
|
-
}>
|
|
2309
|
+
async acquireCertificate(args: AcquireCertificateArgs): Promise<AcquireCertificateResult>
|
|
2318
2310
|
async listCertificates(args: {
|
|
2319
2311
|
certifiers: PubKeyHex[];
|
|
2320
2312
|
types: Base64String[];
|
|
@@ -2322,113 +2314,80 @@ export default class WindowCWISubstrate implements Wallet {
|
|
|
2322
2314
|
offset?: PositiveIntegerOrZero;
|
|
2323
2315
|
privileged?: BooleanDefaultFalse;
|
|
2324
2316
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2325
|
-
}
|
|
2326
|
-
|
|
2327
|
-
certificates: Array<{
|
|
2328
|
-
type: Base64String;
|
|
2329
|
-
subject: PubKeyHex;
|
|
2330
|
-
serialNumber: Base64String;
|
|
2331
|
-
certifier: PubKeyHex;
|
|
2332
|
-
revocationOutpoint: OutpointString;
|
|
2333
|
-
signature: HexString;
|
|
2334
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2335
|
-
}>;
|
|
2336
|
-
}>
|
|
2337
|
-
async proveCertificate(args: {
|
|
2338
|
-
certificate: {
|
|
2339
|
-
type: Base64String;
|
|
2340
|
-
subject: PubKeyHex;
|
|
2341
|
-
serialNumber: Base64String;
|
|
2342
|
-
certifier: PubKeyHex;
|
|
2343
|
-
revocationOutpoint: OutpointString;
|
|
2344
|
-
signature: HexString;
|
|
2345
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2346
|
-
};
|
|
2347
|
-
fieldsToReveal: CertificateFieldNameUnder50Bytes[];
|
|
2348
|
-
verifier: PubKeyHex;
|
|
2349
|
-
privileged?: BooleanDefaultFalse;
|
|
2350
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
2351
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2352
|
-
keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2353
|
-
}>
|
|
2317
|
+
}): Promise<ListCertificatesResult>
|
|
2318
|
+
async proveCertificate(args: ProveCertificateArgs): Promise<ProveCertificateResult>
|
|
2354
2319
|
async relinquishCertificate(args: {
|
|
2355
2320
|
type: Base64String;
|
|
2356
2321
|
serialNumber: Base64String;
|
|
2357
2322
|
certifier: PubKeyHex;
|
|
2358
|
-
}
|
|
2323
|
+
}): Promise<{
|
|
2359
2324
|
relinquished: true;
|
|
2360
2325
|
}>
|
|
2361
2326
|
async discoverByIdentityKey(args: {
|
|
2362
2327
|
identityKey: PubKeyHex;
|
|
2363
2328
|
limit?: PositiveIntegerDefault10Max10000;
|
|
2364
2329
|
offset?: PositiveIntegerOrZero;
|
|
2365
|
-
}
|
|
2366
|
-
totalCertificates: PositiveIntegerOrZero;
|
|
2367
|
-
certificates: Array<{
|
|
2368
|
-
type: Base64String;
|
|
2369
|
-
subject: PubKeyHex;
|
|
2370
|
-
serialNumber: Base64String;
|
|
2371
|
-
certifier: PubKeyHex;
|
|
2372
|
-
revocationOutpoint: OutpointString;
|
|
2373
|
-
signature: HexString;
|
|
2374
|
-
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2375
|
-
certifierInfo: {
|
|
2376
|
-
name: EntityNameStringMax100Bytes;
|
|
2377
|
-
iconUrl: EntityIconURLStringMax500Bytes;
|
|
2378
|
-
description: DescriptionString5to50Bytes;
|
|
2379
|
-
trust: PositiveIntegerMax10;
|
|
2380
|
-
};
|
|
2381
|
-
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2382
|
-
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2383
|
-
}>;
|
|
2384
|
-
}>
|
|
2330
|
+
}): Promise<DiscoverCertificatesResult>
|
|
2385
2331
|
async discoverByAttributes(args: {
|
|
2386
2332
|
attributes: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2387
2333
|
limit?: PositiveIntegerDefault10Max10000;
|
|
2388
2334
|
offset?: PositiveIntegerOrZero;
|
|
2389
|
-
}
|
|
2390
|
-
|
|
2391
|
-
certificates: Array<{
|
|
2392
|
-
type: Base64String;
|
|
2393
|
-
subject: PubKeyHex;
|
|
2394
|
-
serialNumber: Base64String;
|
|
2395
|
-
certifier: PubKeyHex;
|
|
2396
|
-
revocationOutpoint: OutpointString;
|
|
2397
|
-
signature: HexString;
|
|
2398
|
-
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2399
|
-
certifierInfo: {
|
|
2400
|
-
name: EntityNameStringMax100Bytes;
|
|
2401
|
-
iconUrl: EntityIconURLStringMax500Bytes;
|
|
2402
|
-
description: DescriptionString5to50Bytes;
|
|
2403
|
-
trust: PositiveIntegerMax10;
|
|
2404
|
-
};
|
|
2405
|
-
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
2406
|
-
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
2407
|
-
}>;
|
|
2408
|
-
}>
|
|
2409
|
-
async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2335
|
+
}): Promise<DiscoverCertificatesResult>
|
|
2336
|
+
async isAuthenticated(args: {} = {}): Promise<{
|
|
2410
2337
|
authenticated: boolean;
|
|
2411
2338
|
}>
|
|
2412
|
-
async waitForAuthentication(args: {}
|
|
2339
|
+
async waitForAuthentication(args: {} = {}): Promise<{
|
|
2413
2340
|
authenticated: true;
|
|
2414
2341
|
}>
|
|
2415
|
-
async getHeight(args: {}
|
|
2342
|
+
async getHeight(args: {} = {}): Promise<{
|
|
2416
2343
|
height: PositiveInteger;
|
|
2417
2344
|
}>
|
|
2418
2345
|
async getHeaderForHeight(args: {
|
|
2419
2346
|
height: PositiveInteger;
|
|
2420
|
-
}
|
|
2347
|
+
}): Promise<{
|
|
2421
2348
|
header: HexString;
|
|
2422
2349
|
}>
|
|
2423
|
-
async getNetwork(args: {}
|
|
2350
|
+
async getNetwork(args: {} = {}): Promise<{
|
|
2424
2351
|
network: "mainnet" | "testnet";
|
|
2425
2352
|
}>
|
|
2426
|
-
async getVersion(args: {}
|
|
2353
|
+
async getVersion(args: {} = {}): Promise<{
|
|
2427
2354
|
version: VersionString7To30Bytes;
|
|
2428
2355
|
}>
|
|
2429
2356
|
}
|
|
2430
2357
|
```
|
|
2431
2358
|
|
|
2359
|
+
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), [SignActionArgs](#interface-signactionargs), [SignActionResult](#interface-signactionresult), [VersionString7To30Bytes](#type-versionstring7to30bytes), [Wallet](#interface-wallet), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
2360
|
+
|
|
2361
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2362
|
+
|
|
2363
|
+
---
|
|
2364
|
+
### Class: WalletError
|
|
2365
|
+
|
|
2366
|
+
```ts
|
|
2367
|
+
export class WalletError extends Error {
|
|
2368
|
+
code: number;
|
|
2369
|
+
isError: boolean = true;
|
|
2370
|
+
constructor(message: string, code = 1, stack?: string)
|
|
2371
|
+
}
|
|
2372
|
+
```
|
|
2373
|
+
|
|
2374
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2375
|
+
|
|
2376
|
+
---
|
|
2377
|
+
### Class: WalletWireProcessor
|
|
2378
|
+
|
|
2379
|
+
Processes incoming wallet calls received over a wallet wire, with a given wallet.
|
|
2380
|
+
|
|
2381
|
+
```ts
|
|
2382
|
+
export default class WalletWireProcessor implements WalletWire {
|
|
2383
|
+
wallet: Wallet;
|
|
2384
|
+
constructor(wallet: Wallet)
|
|
2385
|
+
async transmitToWallet(message: number[]): Promise<number[]>
|
|
2386
|
+
}
|
|
2387
|
+
```
|
|
2388
|
+
|
|
2389
|
+
See also: [Wallet](#interface-wallet), [WalletWire](#interface-walletwire)
|
|
2390
|
+
|
|
2432
2391
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2433
2392
|
|
|
2434
2393
|
---
|
|
@@ -2650,47 +2609,18 @@ export default class WalletWireTransceiver implements Wallet {
|
|
|
2650
2609
|
}
|
|
2651
2610
|
```
|
|
2652
2611
|
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
---
|
|
2656
|
-
### Class: WalletWireProcessor
|
|
2657
|
-
|
|
2658
|
-
Processes incoming wallet calls received over a wallet wire, with a given wallet.
|
|
2659
|
-
|
|
2660
|
-
```ts
|
|
2661
|
-
export default class WalletWireProcessor implements WalletWire {
|
|
2662
|
-
wallet: Wallet;
|
|
2663
|
-
constructor(wallet: Wallet)
|
|
2664
|
-
async transmitToWallet(message: number[]): Promise<number[]>
|
|
2665
|
-
}
|
|
2666
|
-
```
|
|
2667
|
-
|
|
2668
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2669
|
-
|
|
2670
|
-
---
|
|
2671
|
-
### Class: HTTPWalletWire
|
|
2672
|
-
|
|
2673
|
-
```ts
|
|
2674
|
-
export default class HTTPWalletWire implements WalletWire {
|
|
2675
|
-
baseUrl: string;
|
|
2676
|
-
httpClient: typeof fetch;
|
|
2677
|
-
originator: string | undefined;
|
|
2678
|
-
constructor(originator: string | undefined, baseUrl: string = "http://localhost:3301", httpClient = fetch)
|
|
2679
|
-
async transmitToWallet(message: number[]): Promise<number[]>
|
|
2680
|
-
}
|
|
2681
|
-
```
|
|
2612
|
+
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), [SignActionArgs](#interface-signactionargs), [SignActionResult](#interface-signactionresult), [VersionString7To30Bytes](#type-versionstring7to30bytes), [Wallet](#interface-wallet), [WalletWire](#interface-walletwire), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
2682
2613
|
|
|
2683
2614
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2684
2615
|
|
|
2685
2616
|
---
|
|
2686
|
-
### Class:
|
|
2617
|
+
### Class: WindowCWISubstrate
|
|
2687
2618
|
|
|
2688
|
-
Facilitates wallet operations over
|
|
2619
|
+
Facilitates wallet operations over the window.CWI interface.
|
|
2689
2620
|
|
|
2690
2621
|
```ts
|
|
2691
|
-
export default class
|
|
2692
|
-
constructor(
|
|
2693
|
-
async invoke(call: CallType, args: any): Promise<any>
|
|
2622
|
+
export default class WindowCWISubstrate implements Wallet {
|
|
2623
|
+
constructor()
|
|
2694
2624
|
async createAction(args: {
|
|
2695
2625
|
description: DescriptionString5to50Bytes;
|
|
2696
2626
|
inputs?: Array<{
|
|
@@ -2722,7 +2652,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2722
2652
|
noSendChange?: OutpointString[];
|
|
2723
2653
|
sendWith?: TXIDHexString[];
|
|
2724
2654
|
};
|
|
2725
|
-
}): Promise<{
|
|
2655
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2726
2656
|
txid?: TXIDHexString;
|
|
2727
2657
|
tx?: BEEF;
|
|
2728
2658
|
noSendChange?: OutpointString[];
|
|
@@ -2748,7 +2678,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2748
2678
|
noSendChange?: OutpointString[];
|
|
2749
2679
|
sendWith: TXIDHexString[];
|
|
2750
2680
|
};
|
|
2751
|
-
}): Promise<{
|
|
2681
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2752
2682
|
txid?: TXIDHexString;
|
|
2753
2683
|
tx?: BEEF;
|
|
2754
2684
|
noSendChange?: OutpointString[];
|
|
@@ -2759,7 +2689,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2759
2689
|
}>
|
|
2760
2690
|
async abortAction(args: {
|
|
2761
2691
|
reference: Base64String;
|
|
2762
|
-
}): Promise<{
|
|
2692
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2763
2693
|
aborted: true;
|
|
2764
2694
|
}>
|
|
2765
2695
|
async listActions(args: {
|
|
@@ -2773,7 +2703,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2773
2703
|
includeOutputLockingScripts?: BooleanDefaultFalse;
|
|
2774
2704
|
limit?: PositiveIntegerDefault10Max10000;
|
|
2775
2705
|
offset?: PositiveIntegerOrZero;
|
|
2776
|
-
}): Promise<{
|
|
2706
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2777
2707
|
totalActions: PositiveIntegerOrZero;
|
|
2778
2708
|
actions: Array<{
|
|
2779
2709
|
txid: TXIDHexString;
|
|
@@ -2822,7 +2752,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2822
2752
|
}>;
|
|
2823
2753
|
description: DescriptionString5to50Bytes;
|
|
2824
2754
|
labels?: LabelStringUnder300Bytes[];
|
|
2825
|
-
}): Promise<{
|
|
2755
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2826
2756
|
accepted: true;
|
|
2827
2757
|
}>
|
|
2828
2758
|
async listOutputs(args: {
|
|
@@ -2835,7 +2765,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2835
2765
|
includeLabels?: BooleanDefaultFalse;
|
|
2836
2766
|
limit?: PositiveIntegerDefault10Max10000;
|
|
2837
2767
|
offset?: PositiveIntegerOrZero;
|
|
2838
|
-
}): Promise<{
|
|
2768
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2839
2769
|
totalOutputs: PositiveIntegerOrZero;
|
|
2840
2770
|
outputs: Array<{
|
|
2841
2771
|
outpoint: OutpointString;
|
|
@@ -2851,7 +2781,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2851
2781
|
async relinquishOutput(args: {
|
|
2852
2782
|
basket: BasketStringUnder300Bytes;
|
|
2853
2783
|
output: OutpointString;
|
|
2854
|
-
}): Promise<{
|
|
2784
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2855
2785
|
relinquished: true;
|
|
2856
2786
|
}>
|
|
2857
2787
|
async getPublicKey(args: {
|
|
@@ -2865,7 +2795,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2865
2795
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2866
2796
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2867
2797
|
forSelf?: BooleanDefaultFalse;
|
|
2868
|
-
}): Promise<{
|
|
2798
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2869
2799
|
publicKey: PubKeyHex;
|
|
2870
2800
|
}>
|
|
2871
2801
|
async revealCounterpartyKeyLinkage(args: {
|
|
@@ -2873,7 +2803,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2873
2803
|
verifier: PubKeyHex;
|
|
2874
2804
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2875
2805
|
privileged?: BooleanDefaultFalse;
|
|
2876
|
-
}): Promise<{
|
|
2806
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2877
2807
|
prover: PubKeyHex;
|
|
2878
2808
|
verifier: PubKeyHex;
|
|
2879
2809
|
counterparty: PubKeyHex;
|
|
@@ -2891,7 +2821,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2891
2821
|
keyID: KeyIDStringUnder800Bytes;
|
|
2892
2822
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2893
2823
|
privileged?: BooleanDefaultFalse;
|
|
2894
|
-
}): Promise<{
|
|
2824
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2895
2825
|
prover: PubKeyHex;
|
|
2896
2826
|
verifier: PubKeyHex;
|
|
2897
2827
|
counterparty: PubKeyHex;
|
|
@@ -2914,7 +2844,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2914
2844
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2915
2845
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2916
2846
|
privileged?: BooleanDefaultFalse;
|
|
2917
|
-
}): Promise<{
|
|
2847
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2918
2848
|
ciphertext: Byte[];
|
|
2919
2849
|
}>
|
|
2920
2850
|
async decrypt(args: {
|
|
@@ -2927,7 +2857,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2927
2857
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2928
2858
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2929
2859
|
privileged?: BooleanDefaultFalse;
|
|
2930
|
-
}): Promise<{
|
|
2860
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2931
2861
|
plaintext: Byte[];
|
|
2932
2862
|
}>
|
|
2933
2863
|
async createHmac(args: {
|
|
@@ -2940,7 +2870,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2940
2870
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2941
2871
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2942
2872
|
privileged?: BooleanDefaultFalse;
|
|
2943
|
-
}): Promise<{
|
|
2873
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2944
2874
|
hmac: Byte[];
|
|
2945
2875
|
}>
|
|
2946
2876
|
async verifyHmac(args: {
|
|
@@ -2954,7 +2884,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2954
2884
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2955
2885
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2956
2886
|
privileged?: BooleanDefaultFalse;
|
|
2957
|
-
}): Promise<{
|
|
2887
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2958
2888
|
valid: true;
|
|
2959
2889
|
}>
|
|
2960
2890
|
async createSignature(args: {
|
|
@@ -2968,7 +2898,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2968
2898
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
2969
2899
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2970
2900
|
privileged?: BooleanDefaultFalse;
|
|
2971
|
-
}): Promise<{
|
|
2901
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2972
2902
|
signature: Byte[];
|
|
2973
2903
|
}>
|
|
2974
2904
|
async verifySignature(args: {
|
|
@@ -2984,7 +2914,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2984
2914
|
counterparty?: PubKeyHex | "self" | "anyone";
|
|
2985
2915
|
forSelf?: BooleanDefaultFalse;
|
|
2986
2916
|
privileged?: BooleanDefaultFalse;
|
|
2987
|
-
}): Promise<{
|
|
2917
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
2988
2918
|
valid: true;
|
|
2989
2919
|
}>
|
|
2990
2920
|
async acquireCertificate(args: {
|
|
@@ -2999,7 +2929,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
2999
2929
|
keyringForSubject: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
3000
2930
|
acquisitionProtocol: "direct" | "issuance";
|
|
3001
2931
|
certifierUrl?: string;
|
|
3002
|
-
}): Promise<{
|
|
2932
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3003
2933
|
type: Base64String;
|
|
3004
2934
|
subject: PubKeyHex;
|
|
3005
2935
|
serialNumber: Base64String;
|
|
@@ -3015,7 +2945,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
3015
2945
|
offset?: PositiveIntegerOrZero;
|
|
3016
2946
|
privileged?: BooleanDefaultFalse;
|
|
3017
2947
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
3018
|
-
}): Promise<{
|
|
2948
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3019
2949
|
totalCertificates: PositiveIntegerOrZero;
|
|
3020
2950
|
certificates: Array<{
|
|
3021
2951
|
type: Base64String;
|
|
@@ -3041,21 +2971,21 @@ export default class XDMSubstrate implements Wallet {
|
|
|
3041
2971
|
verifier: PubKeyHex;
|
|
3042
2972
|
privileged?: BooleanDefaultFalse;
|
|
3043
2973
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
3044
|
-
}): Promise<{
|
|
2974
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3045
2975
|
keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
3046
2976
|
}>
|
|
3047
2977
|
async relinquishCertificate(args: {
|
|
3048
2978
|
type: Base64String;
|
|
3049
2979
|
serialNumber: Base64String;
|
|
3050
2980
|
certifier: PubKeyHex;
|
|
3051
|
-
}): Promise<{
|
|
2981
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3052
2982
|
relinquished: true;
|
|
3053
2983
|
}>
|
|
3054
2984
|
async discoverByIdentityKey(args: {
|
|
3055
2985
|
identityKey: PubKeyHex;
|
|
3056
2986
|
limit?: PositiveIntegerDefault10Max10000;
|
|
3057
2987
|
offset?: PositiveIntegerOrZero;
|
|
3058
|
-
}): Promise<{
|
|
2988
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3059
2989
|
totalCertificates: PositiveIntegerOrZero;
|
|
3060
2990
|
certificates: Array<{
|
|
3061
2991
|
type: Base64String;
|
|
@@ -3079,7 +3009,7 @@ export default class XDMSubstrate implements Wallet {
|
|
|
3079
3009
|
attributes: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
3080
3010
|
limit?: PositiveIntegerDefault10Max10000;
|
|
3081
3011
|
offset?: PositiveIntegerOrZero;
|
|
3082
|
-
}): Promise<{
|
|
3012
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3083
3013
|
totalCertificates: PositiveIntegerOrZero;
|
|
3084
3014
|
certificates: Array<{
|
|
3085
3015
|
type: Base64String;
|
|
@@ -3099,54 +3029,199 @@ export default class XDMSubstrate implements Wallet {
|
|
|
3099
3029
|
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
3100
3030
|
}>;
|
|
3101
3031
|
}>
|
|
3102
|
-
async isAuthenticated(args: {}): Promise<{
|
|
3032
|
+
async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3103
3033
|
authenticated: boolean;
|
|
3104
3034
|
}>
|
|
3105
|
-
async waitForAuthentication(args: {}): Promise<{
|
|
3035
|
+
async waitForAuthentication(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3106
3036
|
authenticated: true;
|
|
3107
3037
|
}>
|
|
3108
|
-
async getHeight(args: {}): Promise<{
|
|
3038
|
+
async getHeight(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3109
3039
|
height: PositiveInteger;
|
|
3110
3040
|
}>
|
|
3111
3041
|
async getHeaderForHeight(args: {
|
|
3112
3042
|
height: PositiveInteger;
|
|
3113
|
-
}): Promise<{
|
|
3043
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3114
3044
|
header: HexString;
|
|
3115
3045
|
}>
|
|
3116
|
-
async getNetwork(args: {}): Promise<{
|
|
3046
|
+
async getNetwork(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3117
3047
|
network: "mainnet" | "testnet";
|
|
3118
3048
|
}>
|
|
3119
|
-
async getVersion(args: {}): Promise<{
|
|
3049
|
+
async getVersion(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
3120
3050
|
version: VersionString7To30Bytes;
|
|
3121
3051
|
}>
|
|
3122
3052
|
}
|
|
3123
3053
|
```
|
|
3124
3054
|
|
|
3055
|
+
See also: [BEEF](#type-beef), [Base64String](#type-base64string), [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [BooleanDefaultFalse](#type-booleandefaultfalse), [BooleanDefaultTrue](#type-booleandefaulttrue), [Byte](#type-byte), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [EntityIconURLStringMax500Bytes](#type-entityiconurlstringmax500bytes), [EntityNameStringMax100Bytes](#type-entitynamestringmax100bytes), [HexString](#type-hexstring), [ISOTimestampString](#type-isotimestampstring), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [LabelStringUnder300Bytes](#type-labelstringunder300bytes), [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes), [OutpointString](#type-outpointstring), [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes), [PositiveInteger](#type-positiveinteger), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerMax10](#type-positiveintegermax10), [PositiveIntegerOrZero](#type-positiveintegerorzero), [ProtocolString5To400Bytes](#type-protocolstring5to400bytes), [PubKeyHex](#type-pubkeyhex), [SatoshiValue](#type-satoshivalue), [TXIDHexString](#type-txidhexstring), [VersionString7To30Bytes](#type-versionstring7to30bytes), [Wallet](#interface-wallet), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
3056
|
+
|
|
3125
3057
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3126
3058
|
|
|
3127
3059
|
---
|
|
3128
|
-
### Class:
|
|
3060
|
+
### Class: XDMSubstrate
|
|
3129
3061
|
|
|
3130
|
-
|
|
3062
|
+
Facilitates wallet operations over cross-document messaging.
|
|
3131
3063
|
|
|
3132
3064
|
```ts
|
|
3133
|
-
export default class
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3065
|
+
export default class XDMSubstrate implements Wallet {
|
|
3066
|
+
constructor(domain: string = "*")
|
|
3067
|
+
async invoke(call: CallType, args: any): Promise<any>
|
|
3068
|
+
async createAction(args: {
|
|
3069
|
+
description: DescriptionString5to50Bytes;
|
|
3070
|
+
inputs?: Array<{
|
|
3071
|
+
tx?: BEEF;
|
|
3072
|
+
outpoint: OutpointString;
|
|
3073
|
+
unlockingScript?: HexString;
|
|
3074
|
+
unlockingScriptLength?: PositiveInteger;
|
|
3075
|
+
inputDescription: DescriptionString5to50Bytes;
|
|
3076
|
+
sequenceNumber?: PositiveIntegerOrZero;
|
|
3077
|
+
}>;
|
|
3078
|
+
outputs?: Array<{
|
|
3079
|
+
lockingScript: HexString;
|
|
3080
|
+
satoshis: SatoshiValue;
|
|
3081
|
+
outputDescription: DescriptionString5to50Bytes;
|
|
3082
|
+
basket?: BasketStringUnder300Bytes;
|
|
3083
|
+
customInstructions?: string;
|
|
3084
|
+
tags?: OutputTagStringUnder300Bytes[];
|
|
3085
|
+
}>;
|
|
3086
|
+
lockTime?: PositiveIntegerOrZero;
|
|
3087
|
+
version?: PositiveIntegerOrZero;
|
|
3088
|
+
labels?: LabelStringUnder300Bytes[];
|
|
3089
|
+
options?: {
|
|
3090
|
+
signAndProcess?: BooleanDefaultTrue;
|
|
3091
|
+
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
3092
|
+
trustSelf?: "known";
|
|
3093
|
+
knownTxids?: TXIDHexString[];
|
|
3094
|
+
returnTXIDOnly?: BooleanDefaultFalse;
|
|
3095
|
+
noSend?: BooleanDefaultFalse;
|
|
3096
|
+
noSendChange?: OutpointString[];
|
|
3097
|
+
sendWith?: TXIDHexString[];
|
|
3098
|
+
};
|
|
3099
|
+
}): Promise<{
|
|
3100
|
+
txid?: TXIDHexString;
|
|
3101
|
+
tx?: BEEF;
|
|
3102
|
+
noSendChange?: OutpointString[];
|
|
3103
|
+
sendWithResults?: Array<{
|
|
3104
|
+
txid: TXIDHexString;
|
|
3105
|
+
status: "unproven" | "sending" | "failed";
|
|
3106
|
+
}>;
|
|
3107
|
+
signableTransaction?: {
|
|
3108
|
+
tx: BEEF;
|
|
3109
|
+
reference: Base64String;
|
|
3110
|
+
};
|
|
3111
|
+
}>
|
|
3112
|
+
async signAction(args: {
|
|
3113
|
+
spends: Record<PositiveIntegerOrZero, {
|
|
3114
|
+
unlockingScript: HexString;
|
|
3115
|
+
sequenceNumber?: PositiveIntegerOrZero;
|
|
3116
|
+
}>;
|
|
3117
|
+
reference: Base64String;
|
|
3118
|
+
options?: {
|
|
3119
|
+
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
3120
|
+
returnTXIDOnly?: BooleanDefaultFalse;
|
|
3121
|
+
noSend?: BooleanDefaultFalse;
|
|
3122
|
+
noSendChange?: OutpointString[];
|
|
3123
|
+
sendWith: TXIDHexString[];
|
|
3124
|
+
};
|
|
3125
|
+
}): Promise<{
|
|
3126
|
+
txid?: TXIDHexString;
|
|
3127
|
+
tx?: BEEF;
|
|
3128
|
+
noSendChange?: OutpointString[];
|
|
3129
|
+
sendWithResults?: Array<{
|
|
3130
|
+
txid: TXIDHexString;
|
|
3131
|
+
status: "unproven" | "sending" | "failed";
|
|
3132
|
+
}>;
|
|
3133
|
+
}>
|
|
3140
3134
|
async abortAction(args: {
|
|
3141
3135
|
reference: Base64String;
|
|
3142
3136
|
}): Promise<{
|
|
3143
3137
|
aborted: true;
|
|
3144
3138
|
}>
|
|
3145
|
-
async listActions(args:
|
|
3146
|
-
|
|
3139
|
+
async listActions(args: {
|
|
3140
|
+
labels: LabelStringUnder300Bytes[];
|
|
3141
|
+
labelQueryMode?: "any" | "all";
|
|
3142
|
+
includeLabels?: BooleanDefaultFalse;
|
|
3143
|
+
includeInputs?: BooleanDefaultFalse;
|
|
3144
|
+
includeInputSourceLockingScripts?: BooleanDefaultFalse;
|
|
3145
|
+
includeInputUnlockingScripts?: BooleanDefaultFalse;
|
|
3146
|
+
includeOutputs?: BooleanDefaultFalse;
|
|
3147
|
+
includeOutputLockingScripts?: BooleanDefaultFalse;
|
|
3148
|
+
limit?: PositiveIntegerDefault10Max10000;
|
|
3149
|
+
offset?: PositiveIntegerOrZero;
|
|
3150
|
+
}): Promise<{
|
|
3151
|
+
totalActions: PositiveIntegerOrZero;
|
|
3152
|
+
actions: Array<{
|
|
3153
|
+
txid: TXIDHexString;
|
|
3154
|
+
satoshis: SatoshiValue;
|
|
3155
|
+
status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal";
|
|
3156
|
+
isOutgoing: boolean;
|
|
3157
|
+
description: DescriptionString5to50Bytes;
|
|
3158
|
+
labels?: LabelStringUnder300Bytes[];
|
|
3159
|
+
version: PositiveIntegerOrZero;
|
|
3160
|
+
lockTime: PositiveIntegerOrZero;
|
|
3161
|
+
inputs?: Array<{
|
|
3162
|
+
sourceOutpoint: OutpointString;
|
|
3163
|
+
sourceSatoshis: SatoshiValue;
|
|
3164
|
+
sourceLockingScript?: HexString;
|
|
3165
|
+
unlockingScript?: HexString;
|
|
3166
|
+
inputDescription: DescriptionString5to50Bytes;
|
|
3167
|
+
sequenceNumber: PositiveIntegerOrZero;
|
|
3168
|
+
}>;
|
|
3169
|
+
outputs?: Array<{
|
|
3170
|
+
outputIndex: PositiveIntegerOrZero;
|
|
3171
|
+
satoshis: SatoshiValue;
|
|
3172
|
+
lockingScript?: HexString;
|
|
3173
|
+
spendable: boolean;
|
|
3174
|
+
outputDescription: DescriptionString5to50Bytes;
|
|
3175
|
+
basket: BasketStringUnder300Bytes;
|
|
3176
|
+
tags: OutputTagStringUnder300Bytes[];
|
|
3177
|
+
customInstructions?: string;
|
|
3178
|
+
}>;
|
|
3179
|
+
}>;
|
|
3180
|
+
}>
|
|
3181
|
+
async internalizeAction(args: {
|
|
3182
|
+
tx: BEEF;
|
|
3183
|
+
outputs: Array<{
|
|
3184
|
+
outputIndex: PositiveIntegerOrZero;
|
|
3185
|
+
protocol: "wallet payment" | "basket insertion";
|
|
3186
|
+
paymentRemittance?: {
|
|
3187
|
+
derivationPrefix: Base64String;
|
|
3188
|
+
derivationSuffix: Base64String;
|
|
3189
|
+
senderIdentityKey: PubKeyHex;
|
|
3190
|
+
};
|
|
3191
|
+
insertionRemittance?: {
|
|
3192
|
+
basket: BasketStringUnder300Bytes;
|
|
3193
|
+
customInstructions?: string;
|
|
3194
|
+
tags?: OutputTagStringUnder300Bytes[];
|
|
3195
|
+
};
|
|
3196
|
+
}>;
|
|
3197
|
+
description: DescriptionString5to50Bytes;
|
|
3198
|
+
labels?: LabelStringUnder300Bytes[];
|
|
3199
|
+
}): Promise<{
|
|
3147
3200
|
accepted: true;
|
|
3148
3201
|
}>
|
|
3149
|
-
async listOutputs(args:
|
|
3202
|
+
async listOutputs(args: {
|
|
3203
|
+
basket: BasketStringUnder300Bytes;
|
|
3204
|
+
tags?: OutputTagStringUnder300Bytes[];
|
|
3205
|
+
tagQueryMode?: "all" | "any";
|
|
3206
|
+
include?: "locking scripts" | "entire transactions";
|
|
3207
|
+
includeCustomInstructions?: BooleanDefaultFalse;
|
|
3208
|
+
includeTags?: BooleanDefaultFalse;
|
|
3209
|
+
includeLabels?: BooleanDefaultFalse;
|
|
3210
|
+
limit?: PositiveIntegerDefault10Max10000;
|
|
3211
|
+
offset?: PositiveIntegerOrZero;
|
|
3212
|
+
}): Promise<{
|
|
3213
|
+
totalOutputs: PositiveIntegerOrZero;
|
|
3214
|
+
outputs: Array<{
|
|
3215
|
+
outpoint: OutpointString;
|
|
3216
|
+
satoshis: SatoshiValue;
|
|
3217
|
+
lockingScript?: HexString;
|
|
3218
|
+
tx?: BEEF;
|
|
3219
|
+
spendable: true;
|
|
3220
|
+
customInstructions?: string;
|
|
3221
|
+
tags?: OutputTagStringUnder300Bytes[];
|
|
3222
|
+
labels?: LabelStringUnder300Bytes[];
|
|
3223
|
+
}>;
|
|
3224
|
+
}>
|
|
3150
3225
|
async relinquishOutput(args: {
|
|
3151
3226
|
basket: BasketStringUnder300Bytes;
|
|
3152
3227
|
output: OutpointString;
|
|
@@ -3286,16 +3361,63 @@ export default class WalletClient implements Wallet {
|
|
|
3286
3361
|
}): Promise<{
|
|
3287
3362
|
valid: true;
|
|
3288
3363
|
}>
|
|
3289
|
-
async acquireCertificate(args:
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3364
|
+
async acquireCertificate(args: {
|
|
3365
|
+
type: Base64String;
|
|
3366
|
+
subject: PubKeyHex;
|
|
3367
|
+
serialNumber: Base64String;
|
|
3368
|
+
revocationOutpoint: OutpointString;
|
|
3369
|
+
signature: HexString;
|
|
3370
|
+
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
3371
|
+
certifier: PubKeyHex;
|
|
3372
|
+
keyringRevealer: PubKeyHex | "certifier";
|
|
3373
|
+
keyringForSubject: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
3374
|
+
acquisitionProtocol: "direct" | "issuance";
|
|
3375
|
+
certifierUrl?: string;
|
|
3376
|
+
}): Promise<{
|
|
3377
|
+
type: Base64String;
|
|
3378
|
+
subject: PubKeyHex;
|
|
3379
|
+
serialNumber: Base64String;
|
|
3380
|
+
certifier: PubKeyHex;
|
|
3381
|
+
revocationOutpoint: OutpointString;
|
|
3382
|
+
signature: HexString;
|
|
3383
|
+
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
3384
|
+
}>
|
|
3385
|
+
async listCertificates(args: {
|
|
3386
|
+
certifiers: PubKeyHex[];
|
|
3387
|
+
types: Base64String[];
|
|
3388
|
+
limit?: PositiveIntegerDefault10Max10000;
|
|
3389
|
+
offset?: PositiveIntegerOrZero;
|
|
3390
|
+
privileged?: BooleanDefaultFalse;
|
|
3391
|
+
privilegedReason?: DescriptionString5to50Bytes;
|
|
3392
|
+
}): Promise<{
|
|
3393
|
+
totalCertificates: PositiveIntegerOrZero;
|
|
3394
|
+
certificates: Array<{
|
|
3395
|
+
type: Base64String;
|
|
3396
|
+
subject: PubKeyHex;
|
|
3397
|
+
serialNumber: Base64String;
|
|
3398
|
+
certifier: PubKeyHex;
|
|
3399
|
+
revocationOutpoint: OutpointString;
|
|
3400
|
+
signature: HexString;
|
|
3401
|
+
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
3402
|
+
}>;
|
|
3403
|
+
}>
|
|
3404
|
+
async proveCertificate(args: {
|
|
3405
|
+
certificate: {
|
|
3406
|
+
type: Base64String;
|
|
3407
|
+
subject: PubKeyHex;
|
|
3408
|
+
serialNumber: Base64String;
|
|
3409
|
+
certifier: PubKeyHex;
|
|
3410
|
+
revocationOutpoint: OutpointString;
|
|
3411
|
+
signature: HexString;
|
|
3412
|
+
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
3413
|
+
};
|
|
3414
|
+
fieldsToReveal: CertificateFieldNameUnder50Bytes[];
|
|
3415
|
+
verifier: PubKeyHex;
|
|
3295
3416
|
privileged?: BooleanDefaultFalse;
|
|
3296
3417
|
privilegedReason?: DescriptionString5to50Bytes;
|
|
3297
|
-
}): Promise<
|
|
3298
|
-
|
|
3418
|
+
}): Promise<{
|
|
3419
|
+
keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
3420
|
+
}>
|
|
3299
3421
|
async relinquishCertificate(args: {
|
|
3300
3422
|
type: Base64String;
|
|
3301
3423
|
serialNumber: Base64String;
|
|
@@ -3307,19 +3429,57 @@ export default class WalletClient implements Wallet {
|
|
|
3307
3429
|
identityKey: PubKeyHex;
|
|
3308
3430
|
limit?: PositiveIntegerDefault10Max10000;
|
|
3309
3431
|
offset?: PositiveIntegerOrZero;
|
|
3310
|
-
}): Promise<
|
|
3432
|
+
}): Promise<{
|
|
3433
|
+
totalCertificates: PositiveIntegerOrZero;
|
|
3434
|
+
certificates: Array<{
|
|
3435
|
+
type: Base64String;
|
|
3436
|
+
subject: PubKeyHex;
|
|
3437
|
+
serialNumber: Base64String;
|
|
3438
|
+
certifier: PubKeyHex;
|
|
3439
|
+
revocationOutpoint: OutpointString;
|
|
3440
|
+
signature: HexString;
|
|
3441
|
+
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
3442
|
+
certifierInfo: {
|
|
3443
|
+
name: EntityNameStringMax100Bytes;
|
|
3444
|
+
iconUrl: EntityIconURLStringMax500Bytes;
|
|
3445
|
+
description: DescriptionString5to50Bytes;
|
|
3446
|
+
trust: PositiveIntegerMax10;
|
|
3447
|
+
};
|
|
3448
|
+
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
3449
|
+
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
3450
|
+
}>;
|
|
3451
|
+
}>
|
|
3311
3452
|
async discoverByAttributes(args: {
|
|
3312
3453
|
attributes: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
3313
3454
|
limit?: PositiveIntegerDefault10Max10000;
|
|
3314
3455
|
offset?: PositiveIntegerOrZero;
|
|
3315
|
-
}): Promise<
|
|
3316
|
-
|
|
3456
|
+
}): Promise<{
|
|
3457
|
+
totalCertificates: PositiveIntegerOrZero;
|
|
3458
|
+
certificates: Array<{
|
|
3459
|
+
type: Base64String;
|
|
3460
|
+
subject: PubKeyHex;
|
|
3461
|
+
serialNumber: Base64String;
|
|
3462
|
+
certifier: PubKeyHex;
|
|
3463
|
+
revocationOutpoint: OutpointString;
|
|
3464
|
+
signature: HexString;
|
|
3465
|
+
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
3466
|
+
certifierInfo: {
|
|
3467
|
+
name: EntityNameStringMax100Bytes;
|
|
3468
|
+
iconUrl: EntityIconURLStringMax500Bytes;
|
|
3469
|
+
description: DescriptionString5to50Bytes;
|
|
3470
|
+
trust: PositiveIntegerMax10;
|
|
3471
|
+
};
|
|
3472
|
+
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
3473
|
+
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
3474
|
+
}>;
|
|
3475
|
+
}>
|
|
3476
|
+
async isAuthenticated(args: {}): Promise<{
|
|
3317
3477
|
authenticated: boolean;
|
|
3318
3478
|
}>
|
|
3319
|
-
async waitForAuthentication(args: {}
|
|
3479
|
+
async waitForAuthentication(args: {}): Promise<{
|
|
3320
3480
|
authenticated: true;
|
|
3321
3481
|
}>
|
|
3322
|
-
async getHeight(args: {}
|
|
3482
|
+
async getHeight(args: {}): Promise<{
|
|
3323
3483
|
height: PositiveInteger;
|
|
3324
3484
|
}>
|
|
3325
3485
|
async getHeaderForHeight(args: {
|
|
@@ -3327,15 +3487,17 @@ export default class WalletClient implements Wallet {
|
|
|
3327
3487
|
}): Promise<{
|
|
3328
3488
|
header: HexString;
|
|
3329
3489
|
}>
|
|
3330
|
-
async getNetwork(args: {}
|
|
3490
|
+
async getNetwork(args: {}): Promise<{
|
|
3331
3491
|
network: "mainnet" | "testnet";
|
|
3332
3492
|
}>
|
|
3333
|
-
async getVersion(args: {}
|
|
3493
|
+
async getVersion(args: {}): Promise<{
|
|
3334
3494
|
version: VersionString7To30Bytes;
|
|
3335
3495
|
}>
|
|
3336
3496
|
}
|
|
3337
3497
|
```
|
|
3338
3498
|
|
|
3499
|
+
See also: [BEEF](#type-beef), [Base64String](#type-base64string), [BasketStringUnder300Bytes](#type-basketstringunder300bytes), [BooleanDefaultFalse](#type-booleandefaultfalse), [BooleanDefaultTrue](#type-booleandefaulttrue), [Byte](#type-byte), [CallType](#type-calltype), [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes), [EntityIconURLStringMax500Bytes](#type-entityiconurlstringmax500bytes), [EntityNameStringMax100Bytes](#type-entitynamestringmax100bytes), [HexString](#type-hexstring), [ISOTimestampString](#type-isotimestampstring), [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes), [LabelStringUnder300Bytes](#type-labelstringunder300bytes), [OutpointString](#type-outpointstring), [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes), [PositiveInteger](#type-positiveinteger), [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000), [PositiveIntegerMax10](#type-positiveintegermax10), [PositiveIntegerOrZero](#type-positiveintegerorzero), [ProtocolString5To400Bytes](#type-protocolstring5to400bytes), [PubKeyHex](#type-pubkeyhex), [SatoshiValue](#type-satoshivalue), [TXIDHexString](#type-txidhexstring), [VersionString7To30Bytes](#type-versionstring7to30bytes), [Wallet](#interface-wallet), [decrypt](#variable-decrypt), [encrypt](#variable-encrypt)
|
|
3500
|
+
|
|
3339
3501
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3340
3502
|
|
|
3341
3503
|
---
|
|
@@ -3363,354 +3525,368 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
3363
3525
|
|
|
3364
3526
|
---
|
|
3365
3527
|
|
|
3366
|
-
### Type:
|
|
3528
|
+
### Type: AcquisitionProtocol
|
|
3367
3529
|
|
|
3368
3530
|
```ts
|
|
3369
|
-
export type
|
|
3531
|
+
export type AcquisitionProtocol = "direct" | "issuance"
|
|
3370
3532
|
```
|
|
3371
3533
|
|
|
3372
3534
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3373
3535
|
|
|
3374
3536
|
---
|
|
3375
|
-
### Type:
|
|
3537
|
+
### Type: ActionStatus
|
|
3376
3538
|
|
|
3377
3539
|
```ts
|
|
3378
|
-
export type
|
|
3540
|
+
export type ActionStatus = "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal"
|
|
3379
3541
|
```
|
|
3380
3542
|
|
|
3381
3543
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3382
3544
|
|
|
3383
3545
|
---
|
|
3384
|
-
### Type:
|
|
3546
|
+
### Type: AtomicBEEF
|
|
3385
3547
|
|
|
3386
3548
|
```ts
|
|
3387
|
-
export type
|
|
3549
|
+
export type AtomicBEEF = Byte[]
|
|
3388
3550
|
```
|
|
3389
3551
|
|
|
3552
|
+
See also: [Byte](#type-byte)
|
|
3553
|
+
|
|
3390
3554
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3391
3555
|
|
|
3392
3556
|
---
|
|
3393
|
-
### Type:
|
|
3557
|
+
### Type: BEEF
|
|
3394
3558
|
|
|
3395
3559
|
```ts
|
|
3396
|
-
export type
|
|
3560
|
+
export type BEEF = Byte[]
|
|
3397
3561
|
```
|
|
3398
3562
|
|
|
3563
|
+
See also: [Byte](#type-byte)
|
|
3564
|
+
|
|
3399
3565
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3400
3566
|
|
|
3401
3567
|
---
|
|
3402
|
-
### Type:
|
|
3568
|
+
### Type: Base64String
|
|
3403
3569
|
|
|
3404
3570
|
```ts
|
|
3405
|
-
export type
|
|
3571
|
+
export type Base64String = string
|
|
3406
3572
|
```
|
|
3407
3573
|
|
|
3408
3574
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3409
3575
|
|
|
3410
3576
|
---
|
|
3411
|
-
### Type:
|
|
3577
|
+
### Type: BasketStringUnder300Bytes
|
|
3412
3578
|
|
|
3413
3579
|
```ts
|
|
3414
|
-
export type
|
|
3580
|
+
export type BasketStringUnder300Bytes = string
|
|
3415
3581
|
```
|
|
3416
3582
|
|
|
3417
3583
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3418
3584
|
|
|
3419
3585
|
---
|
|
3420
|
-
### Type:
|
|
3586
|
+
### Type: BooleanDefaultFalse
|
|
3421
3587
|
|
|
3422
3588
|
```ts
|
|
3423
|
-
export type
|
|
3589
|
+
export type BooleanDefaultFalse = boolean
|
|
3424
3590
|
```
|
|
3425
3591
|
|
|
3426
3592
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3427
3593
|
|
|
3428
3594
|
---
|
|
3429
|
-
### Type:
|
|
3595
|
+
### Type: BooleanDefaultTrue
|
|
3430
3596
|
|
|
3431
3597
|
```ts
|
|
3432
|
-
export type
|
|
3598
|
+
export type BooleanDefaultTrue = boolean
|
|
3433
3599
|
```
|
|
3434
3600
|
|
|
3435
3601
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3436
3602
|
|
|
3437
3603
|
---
|
|
3438
|
-
### Type:
|
|
3604
|
+
### Type: Byte
|
|
3439
3605
|
|
|
3440
3606
|
```ts
|
|
3441
|
-
export type
|
|
3607
|
+
export type Byte = number
|
|
3442
3608
|
```
|
|
3443
3609
|
|
|
3444
3610
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3445
3611
|
|
|
3446
3612
|
---
|
|
3447
|
-
### Type:
|
|
3613
|
+
### Type: CallType
|
|
3448
3614
|
|
|
3449
3615
|
```ts
|
|
3450
|
-
export type
|
|
3616
|
+
export type CallType = keyof typeof calls
|
|
3451
3617
|
```
|
|
3452
3618
|
|
|
3453
3619
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3454
3620
|
|
|
3455
3621
|
---
|
|
3456
|
-
### Type:
|
|
3622
|
+
### Type: CertificateFieldNameUnder50Bytes
|
|
3457
3623
|
|
|
3458
3624
|
```ts
|
|
3459
|
-
export type
|
|
3625
|
+
export type CertificateFieldNameUnder50Bytes = string
|
|
3460
3626
|
```
|
|
3461
3627
|
|
|
3462
3628
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3463
3629
|
|
|
3464
3630
|
---
|
|
3465
|
-
### Type:
|
|
3631
|
+
### Type: DescriptionString5to50Bytes
|
|
3466
3632
|
|
|
3467
3633
|
```ts
|
|
3468
|
-
export type
|
|
3634
|
+
export type DescriptionString5to50Bytes = string
|
|
3469
3635
|
```
|
|
3470
3636
|
|
|
3471
3637
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3472
3638
|
|
|
3473
3639
|
---
|
|
3474
|
-
### Type:
|
|
3640
|
+
### Type: EntityIconURLStringMax500Bytes
|
|
3475
3641
|
|
|
3476
3642
|
```ts
|
|
3477
|
-
export type
|
|
3643
|
+
export type EntityIconURLStringMax500Bytes = string
|
|
3478
3644
|
```
|
|
3479
3645
|
|
|
3480
3646
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3481
3647
|
|
|
3482
3648
|
---
|
|
3483
|
-
### Type:
|
|
3649
|
+
### Type: EntityNameStringMax100Bytes
|
|
3484
3650
|
|
|
3485
3651
|
```ts
|
|
3486
|
-
export type
|
|
3652
|
+
export type EntityNameStringMax100Bytes = string
|
|
3487
3653
|
```
|
|
3488
3654
|
|
|
3489
3655
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3490
3656
|
|
|
3491
3657
|
---
|
|
3492
|
-
### Type:
|
|
3658
|
+
### Type: ErrorCodeString10To40Bytes
|
|
3493
3659
|
|
|
3494
3660
|
```ts
|
|
3495
|
-
export type
|
|
3661
|
+
export type ErrorCodeString10To40Bytes = string
|
|
3496
3662
|
```
|
|
3497
3663
|
|
|
3498
3664
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3499
3665
|
|
|
3500
3666
|
---
|
|
3501
|
-
### Type:
|
|
3667
|
+
### Type: ErrorDescriptionString20To200Bytes
|
|
3502
3668
|
|
|
3503
3669
|
```ts
|
|
3504
|
-
export type
|
|
3670
|
+
export type ErrorDescriptionString20To200Bytes = string
|
|
3505
3671
|
```
|
|
3506
3672
|
|
|
3507
3673
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3508
3674
|
|
|
3509
3675
|
---
|
|
3510
|
-
### Type:
|
|
3676
|
+
### Type: HexString
|
|
3511
3677
|
|
|
3512
3678
|
```ts
|
|
3513
|
-
export type
|
|
3679
|
+
export type HexString = string
|
|
3514
3680
|
```
|
|
3515
3681
|
|
|
3516
3682
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3517
3683
|
|
|
3518
3684
|
---
|
|
3519
|
-
### Type:
|
|
3685
|
+
### Type: ISOTimestampString
|
|
3520
3686
|
|
|
3521
3687
|
```ts
|
|
3522
|
-
export type
|
|
3688
|
+
export type ISOTimestampString = string
|
|
3523
3689
|
```
|
|
3524
3690
|
|
|
3525
3691
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3526
3692
|
|
|
3527
3693
|
---
|
|
3528
|
-
### Type:
|
|
3694
|
+
### Type: KeyIDStringUnder800Bytes
|
|
3529
3695
|
|
|
3530
3696
|
```ts
|
|
3531
|
-
export type
|
|
3697
|
+
export type KeyIDStringUnder800Bytes = string
|
|
3532
3698
|
```
|
|
3533
3699
|
|
|
3534
3700
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3535
3701
|
|
|
3536
3702
|
---
|
|
3537
|
-
### Type:
|
|
3703
|
+
### Type: KeyringRevealer
|
|
3538
3704
|
|
|
3539
3705
|
```ts
|
|
3540
|
-
export type
|
|
3706
|
+
export type KeyringRevealer = PubKeyHex | "certifier"
|
|
3541
3707
|
```
|
|
3542
3708
|
|
|
3709
|
+
See also: [PubKeyHex](#type-pubkeyhex)
|
|
3710
|
+
|
|
3543
3711
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3544
3712
|
|
|
3545
3713
|
---
|
|
3546
|
-
### Type:
|
|
3714
|
+
### Type: LabelStringUnder300Bytes
|
|
3547
3715
|
|
|
3548
3716
|
```ts
|
|
3549
|
-
export type
|
|
3717
|
+
export type LabelStringUnder300Bytes = string
|
|
3550
3718
|
```
|
|
3551
3719
|
|
|
3552
3720
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3553
3721
|
|
|
3554
3722
|
---
|
|
3555
|
-
### Type:
|
|
3723
|
+
### Type: OriginatorDomainNameStringUnder250Bytes
|
|
3556
3724
|
|
|
3557
3725
|
```ts
|
|
3558
|
-
export type
|
|
3726
|
+
export type OriginatorDomainNameStringUnder250Bytes = string
|
|
3559
3727
|
```
|
|
3560
3728
|
|
|
3561
3729
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3562
3730
|
|
|
3563
3731
|
---
|
|
3564
|
-
### Type:
|
|
3732
|
+
### Type: OutpointString
|
|
3565
3733
|
|
|
3566
3734
|
```ts
|
|
3567
|
-
export type
|
|
3735
|
+
export type OutpointString = string
|
|
3568
3736
|
```
|
|
3569
3737
|
|
|
3570
3738
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3571
3739
|
|
|
3572
3740
|
---
|
|
3573
|
-
### Type:
|
|
3741
|
+
### Type: OutputTagStringUnder300Bytes
|
|
3574
3742
|
|
|
3575
3743
|
```ts
|
|
3576
|
-
export type
|
|
3744
|
+
export type OutputTagStringUnder300Bytes = string
|
|
3577
3745
|
```
|
|
3578
3746
|
|
|
3579
3747
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3580
3748
|
|
|
3581
3749
|
---
|
|
3582
|
-
### Type:
|
|
3750
|
+
### Type: PositiveInteger
|
|
3583
3751
|
|
|
3584
3752
|
```ts
|
|
3585
|
-
export type
|
|
3753
|
+
export type PositiveInteger = number
|
|
3586
3754
|
```
|
|
3587
3755
|
|
|
3588
3756
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3589
3757
|
|
|
3590
3758
|
---
|
|
3591
|
-
### Type:
|
|
3759
|
+
### Type: PositiveIntegerDefault10Max10000
|
|
3592
3760
|
|
|
3593
3761
|
```ts
|
|
3594
|
-
export type
|
|
3762
|
+
export type PositiveIntegerDefault10Max10000 = number
|
|
3595
3763
|
```
|
|
3596
3764
|
|
|
3597
3765
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3598
3766
|
|
|
3599
3767
|
---
|
|
3600
|
-
### Type:
|
|
3768
|
+
### Type: PositiveIntegerMax10
|
|
3601
3769
|
|
|
3602
3770
|
```ts
|
|
3603
|
-
export type
|
|
3771
|
+
export type PositiveIntegerMax10 = number
|
|
3604
3772
|
```
|
|
3605
3773
|
|
|
3606
3774
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3607
3775
|
|
|
3608
3776
|
---
|
|
3609
|
-
### Type:
|
|
3777
|
+
### Type: PositiveIntegerOrZero
|
|
3610
3778
|
|
|
3611
3779
|
```ts
|
|
3612
|
-
export type
|
|
3780
|
+
export type PositiveIntegerOrZero = number
|
|
3613
3781
|
```
|
|
3614
3782
|
|
|
3615
3783
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3616
3784
|
|
|
3617
3785
|
---
|
|
3618
|
-
### Type:
|
|
3786
|
+
### Type: ProtocolString5To400Bytes
|
|
3619
3787
|
|
|
3620
3788
|
```ts
|
|
3621
|
-
export type
|
|
3789
|
+
export type ProtocolString5To400Bytes = string
|
|
3622
3790
|
```
|
|
3623
3791
|
|
|
3624
3792
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3625
3793
|
|
|
3626
3794
|
---
|
|
3627
|
-
### Type:
|
|
3795
|
+
### Type: PubKeyHex
|
|
3628
3796
|
|
|
3629
3797
|
```ts
|
|
3630
|
-
export type
|
|
3798
|
+
export type PubKeyHex = HexString
|
|
3631
3799
|
```
|
|
3632
3800
|
|
|
3801
|
+
See also: [HexString](#type-hexstring)
|
|
3802
|
+
|
|
3633
3803
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3634
3804
|
|
|
3635
3805
|
---
|
|
3636
|
-
### Type:
|
|
3806
|
+
### Type: SatoshiValue
|
|
3637
3807
|
|
|
3638
3808
|
```ts
|
|
3639
|
-
export type
|
|
3640
|
-
0 | 1 | 2,
|
|
3641
|
-
ProtocolString5To400Bytes
|
|
3642
|
-
]
|
|
3809
|
+
export type SatoshiValue = number
|
|
3643
3810
|
```
|
|
3644
3811
|
|
|
3645
3812
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3646
3813
|
|
|
3647
3814
|
---
|
|
3648
|
-
### Type:
|
|
3815
|
+
### Type: TXIDHexString
|
|
3649
3816
|
|
|
3650
3817
|
```ts
|
|
3651
|
-
export type
|
|
3818
|
+
export type TXIDHexString = HexString
|
|
3652
3819
|
```
|
|
3653
3820
|
|
|
3821
|
+
See also: [HexString](#type-hexstring)
|
|
3822
|
+
|
|
3654
3823
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3655
3824
|
|
|
3656
3825
|
---
|
|
3657
|
-
### Type:
|
|
3826
|
+
### Type: TrustSelf
|
|
3827
|
+
|
|
3828
|
+
Controls behavior of input BEEF validation.
|
|
3829
|
+
|
|
3830
|
+
If `known`, input transactions may omit supporting validity proof data for all TXIDs known to this wallet.
|
|
3831
|
+
|
|
3832
|
+
If undefined, input BEEFs must be complete and valid.
|
|
3658
3833
|
|
|
3659
3834
|
```ts
|
|
3660
|
-
export type
|
|
3835
|
+
export type TrustSelf = "known"
|
|
3661
3836
|
```
|
|
3662
3837
|
|
|
3663
3838
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3664
3839
|
|
|
3665
3840
|
---
|
|
3666
|
-
### Type:
|
|
3841
|
+
### Type: VersionString7To30Bytes
|
|
3667
3842
|
|
|
3668
3843
|
```ts
|
|
3669
|
-
export type
|
|
3844
|
+
export type VersionString7To30Bytes = string
|
|
3670
3845
|
```
|
|
3671
3846
|
|
|
3672
3847
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3673
3848
|
|
|
3674
3849
|
---
|
|
3675
|
-
### Type:
|
|
3850
|
+
### Type: WalletCounterparty
|
|
3676
3851
|
|
|
3677
3852
|
```ts
|
|
3678
|
-
export type
|
|
3853
|
+
export type WalletCounterparty = PubKeyHex | "self" | "anyone"
|
|
3679
3854
|
```
|
|
3680
3855
|
|
|
3856
|
+
See also: [PubKeyHex](#type-pubkeyhex)
|
|
3857
|
+
|
|
3681
3858
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3682
3859
|
|
|
3683
3860
|
---
|
|
3684
|
-
### Type:
|
|
3685
|
-
|
|
3686
|
-
Controls behavior of input BEEF validation.
|
|
3687
|
-
|
|
3688
|
-
If `known`, input transactions may omit supporting validity proof data for all TXIDs known to this wallet.
|
|
3689
|
-
|
|
3690
|
-
If undefined, input BEEFs must be complete and valid.
|
|
3861
|
+
### Type: WalletErrorCode
|
|
3691
3862
|
|
|
3692
3863
|
```ts
|
|
3693
|
-
export type
|
|
3864
|
+
export type WalletErrorCode = keyof typeof walletErrors
|
|
3694
3865
|
```
|
|
3695
3866
|
|
|
3696
3867
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3697
3868
|
|
|
3698
3869
|
---
|
|
3699
|
-
### Type:
|
|
3870
|
+
### Type: WalletNetwork
|
|
3700
3871
|
|
|
3701
3872
|
```ts
|
|
3702
|
-
export type
|
|
3873
|
+
export type WalletNetwork = "mainnet" | "testnet"
|
|
3703
3874
|
```
|
|
3704
3875
|
|
|
3705
3876
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3706
3877
|
|
|
3707
3878
|
---
|
|
3708
|
-
### Type:
|
|
3879
|
+
### Type: WalletProtocol
|
|
3709
3880
|
|
|
3710
3881
|
```ts
|
|
3711
|
-
export type
|
|
3882
|
+
export type WalletProtocol = [
|
|
3883
|
+
0 | 1 | 2,
|
|
3884
|
+
ProtocolString5To400Bytes
|
|
3885
|
+
]
|
|
3712
3886
|
```
|
|
3713
3887
|
|
|
3888
|
+
See also: [ProtocolString5To400Bytes](#type-protocolstring5to400bytes)
|
|
3889
|
+
|
|
3714
3890
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3715
3891
|
|
|
3716
3892
|
---
|