@bsv/sdk 1.4.13 → 1.4.17
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/mod.js +1 -0
- package/dist/cjs/mod.js.map +1 -1
- package/dist/cjs/package.json +9 -9
- package/dist/cjs/src/auth/clients/AuthFetch.js +2 -0
- package/dist/cjs/src/auth/clients/AuthFetch.js.map +1 -1
- package/dist/cjs/src/auth/transports/SimplifiedFetchTransport.js +2 -15
- package/dist/cjs/src/auth/transports/SimplifiedFetchTransport.js.map +1 -1
- package/dist/cjs/src/kvstore/LocalKVStore.js +268 -0
- package/dist/cjs/src/kvstore/LocalKVStore.js.map +1 -0
- package/dist/cjs/src/kvstore/index.js +9 -0
- package/dist/cjs/src/kvstore/index.js.map +1 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/mod.js +1 -0
- package/dist/esm/mod.js.map +1 -1
- package/dist/esm/src/auth/clients/AuthFetch.js +2 -0
- package/dist/esm/src/auth/clients/AuthFetch.js.map +1 -1
- package/dist/esm/src/auth/transports/SimplifiedFetchTransport.js +2 -15
- package/dist/esm/src/auth/transports/SimplifiedFetchTransport.js.map +1 -1
- package/dist/esm/src/kvstore/LocalKVStore.js +263 -0
- package/dist/esm/src/kvstore/LocalKVStore.js.map +1 -0
- package/dist/esm/src/kvstore/index.js +2 -0
- package/dist/esm/src/kvstore/index.js.map +1 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/mod.d.ts +1 -0
- package/dist/types/mod.d.ts.map +1 -1
- package/dist/types/src/auth/clients/AuthFetch.d.ts.map +1 -1
- package/dist/types/src/auth/transports/SimplifiedFetchTransport.d.ts.map +1 -1
- package/dist/types/src/kvstore/LocalKVStore.d.ts +79 -0
- package/dist/types/src/kvstore/LocalKVStore.d.ts.map +1 -0
- package/dist/types/src/kvstore/index.d.ts +2 -0
- package/dist/types/src/kvstore/index.d.ts.map +1 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +1 -1
- package/docs/identity.md +225 -0
- package/docs/kvstore.md +132 -0
- package/docs/registry.md +383 -0
- package/docs/transaction.md +3 -3
- package/mod.ts +2 -1
- package/package.json +19 -9
- package/src/auth/clients/AuthFetch.ts +2 -0
- package/src/auth/transports/SimplifiedFetchTransport.ts +2 -16
- package/src/kvstore/LocalKVStore.ts +282 -0
- package/src/kvstore/__tests/LocalKVStore.test.ts +703 -0
- package/src/kvstore/index.ts +1 -0
- package/docs/wallet-substrates.md +0 -1194
|
@@ -1,1194 +0,0 @@
|
|
|
1
|
-
# API
|
|
2
|
-
|
|
3
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4
|
-
|
|
5
|
-
## Interfaces
|
|
6
|
-
|
|
7
|
-
### Interface: WalletWire
|
|
8
|
-
|
|
9
|
-
A Wallet Wire is an abstraction over a raw transport medium where binary data can be sent to and subsequently received from a wallet.
|
|
10
|
-
|
|
11
|
-
```ts
|
|
12
|
-
export default interface WalletWire {
|
|
13
|
-
transmitToWallet: (message: number[]) => Promise<number[]>;
|
|
14
|
-
}
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
## Classes
|
|
21
|
-
|
|
22
|
-
| |
|
|
23
|
-
| --- |
|
|
24
|
-
| [HTTPWalletWire](#class-httpwalletwire) |
|
|
25
|
-
| [WalletWireProcessor](#class-walletwireprocessor) |
|
|
26
|
-
| [WalletWireTransceiver](#class-walletwiretransceiver) |
|
|
27
|
-
| [WindowCWISubstrate](#class-windowcwisubstrate) |
|
|
28
|
-
| [XDMSubstrate](#class-xdmsubstrate) |
|
|
29
|
-
|
|
30
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
### Class: HTTPWalletWire
|
|
35
|
-
|
|
36
|
-
```ts
|
|
37
|
-
export default class HTTPWalletWire implements WalletWire {
|
|
38
|
-
baseUrl: string;
|
|
39
|
-
httpClient: typeof fetch;
|
|
40
|
-
originator: string | undefined;
|
|
41
|
-
constructor(originator: string | undefined, baseUrl: string = "http://localhost:3301", httpClient = fetch)
|
|
42
|
-
async transmitToWallet(message: number[]): Promise<number[]>
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
See also: [WalletWire](./wallet.md#interface-walletwire)
|
|
47
|
-
|
|
48
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
### Class: WalletWireProcessor
|
|
52
|
-
|
|
53
|
-
Processes incoming wallet calls received over a wallet wire, with a given wallet.
|
|
54
|
-
|
|
55
|
-
```ts
|
|
56
|
-
export default class WalletWireProcessor implements WalletWire {
|
|
57
|
-
wallet: WalletInterface;
|
|
58
|
-
constructor(wallet: WalletInterface)
|
|
59
|
-
async transmitToWallet(message: number[]): Promise<number[]>
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
See also: [WalletInterface](./wallet.md#interface-walletinterface), [WalletWire](./wallet.md#interface-walletwire)
|
|
64
|
-
|
|
65
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
### Class: WalletWireTransceiver
|
|
69
|
-
|
|
70
|
-
A way to make remote calls to a wallet over a wallet wire.
|
|
71
|
-
|
|
72
|
-
```ts
|
|
73
|
-
export default class WalletWireTransceiver implements WalletInterface {
|
|
74
|
-
wire: WalletWire;
|
|
75
|
-
constructor(wire: WalletWire)
|
|
76
|
-
async createAction(args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateActionResult>
|
|
77
|
-
async signAction(args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<SignActionResult>
|
|
78
|
-
async abortAction(args: {
|
|
79
|
-
reference: Base64String;
|
|
80
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
81
|
-
aborted: true;
|
|
82
|
-
}>
|
|
83
|
-
async listActions(args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListActionsResult>
|
|
84
|
-
async internalizeAction(args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
85
|
-
accepted: true;
|
|
86
|
-
}>
|
|
87
|
-
async listOutputs(args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListOutputsResult>
|
|
88
|
-
async relinquishOutput(args: {
|
|
89
|
-
basket: BasketStringUnder300Bytes;
|
|
90
|
-
output: OutpointString;
|
|
91
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
92
|
-
relinquished: true;
|
|
93
|
-
}>
|
|
94
|
-
async getPublicKey(args: {
|
|
95
|
-
seekPermission?: BooleanDefaultTrue;
|
|
96
|
-
identityKey?: true;
|
|
97
|
-
protocolID?: [
|
|
98
|
-
SecurityLevel,
|
|
99
|
-
ProtocolString5To400Bytes
|
|
100
|
-
];
|
|
101
|
-
keyID?: KeyIDStringUnder800Bytes;
|
|
102
|
-
privileged?: BooleanDefaultFalse;
|
|
103
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
104
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
105
|
-
forSelf?: BooleanDefaultFalse;
|
|
106
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
107
|
-
publicKey: PubKeyHex;
|
|
108
|
-
}>
|
|
109
|
-
async revealCounterpartyKeyLinkage(args: {
|
|
110
|
-
counterparty: PubKeyHex;
|
|
111
|
-
verifier: PubKeyHex;
|
|
112
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
113
|
-
privileged?: BooleanDefaultFalse;
|
|
114
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
115
|
-
prover: PubKeyHex;
|
|
116
|
-
verifier: PubKeyHex;
|
|
117
|
-
counterparty: PubKeyHex;
|
|
118
|
-
revelationTime: ISOTimestampString;
|
|
119
|
-
encryptedLinkage: Byte[];
|
|
120
|
-
encryptedLinkageProof: number[];
|
|
121
|
-
}>
|
|
122
|
-
async revealSpecificKeyLinkage(args: {
|
|
123
|
-
counterparty: PubKeyHex;
|
|
124
|
-
verifier: PubKeyHex;
|
|
125
|
-
protocolID: [
|
|
126
|
-
SecurityLevel,
|
|
127
|
-
ProtocolString5To400Bytes
|
|
128
|
-
];
|
|
129
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
130
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
131
|
-
privileged?: BooleanDefaultFalse;
|
|
132
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
133
|
-
prover: PubKeyHex;
|
|
134
|
-
verifier: PubKeyHex;
|
|
135
|
-
counterparty: PubKeyHex;
|
|
136
|
-
protocolID: [
|
|
137
|
-
SecurityLevel,
|
|
138
|
-
ProtocolString5To400Bytes
|
|
139
|
-
];
|
|
140
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
141
|
-
encryptedLinkage: Byte[];
|
|
142
|
-
encryptedLinkageProof: Byte[];
|
|
143
|
-
proofType: Byte;
|
|
144
|
-
}>
|
|
145
|
-
async encrypt(args: {
|
|
146
|
-
seekPermission?: BooleanDefaultTrue;
|
|
147
|
-
plaintext: Byte[];
|
|
148
|
-
protocolID: [
|
|
149
|
-
SecurityLevel,
|
|
150
|
-
ProtocolString5To400Bytes
|
|
151
|
-
];
|
|
152
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
153
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
154
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
155
|
-
privileged?: BooleanDefaultFalse;
|
|
156
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
157
|
-
ciphertext: Byte[];
|
|
158
|
-
}>
|
|
159
|
-
async decrypt(args: {
|
|
160
|
-
seekPermission?: BooleanDefaultTrue;
|
|
161
|
-
ciphertext: Byte[];
|
|
162
|
-
protocolID: [
|
|
163
|
-
SecurityLevel,
|
|
164
|
-
ProtocolString5To400Bytes
|
|
165
|
-
];
|
|
166
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
167
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
168
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
169
|
-
privileged?: BooleanDefaultFalse;
|
|
170
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
171
|
-
plaintext: Byte[];
|
|
172
|
-
}>
|
|
173
|
-
async createHmac(args: {
|
|
174
|
-
seekPermission?: BooleanDefaultTrue;
|
|
175
|
-
data: Byte[];
|
|
176
|
-
protocolID: [
|
|
177
|
-
SecurityLevel,
|
|
178
|
-
ProtocolString5To400Bytes
|
|
179
|
-
];
|
|
180
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
181
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
182
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
183
|
-
privileged?: BooleanDefaultFalse;
|
|
184
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
185
|
-
hmac: Byte[];
|
|
186
|
-
}>
|
|
187
|
-
async verifyHmac(args: {
|
|
188
|
-
seekPermission?: BooleanDefaultTrue;
|
|
189
|
-
data: Byte[];
|
|
190
|
-
hmac: Byte[];
|
|
191
|
-
protocolID: [
|
|
192
|
-
SecurityLevel,
|
|
193
|
-
ProtocolString5To400Bytes
|
|
194
|
-
];
|
|
195
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
196
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
197
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
198
|
-
privileged?: BooleanDefaultFalse;
|
|
199
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
200
|
-
valid: true;
|
|
201
|
-
}>
|
|
202
|
-
async createSignature(args: {
|
|
203
|
-
seekPermission?: BooleanDefaultTrue;
|
|
204
|
-
data?: Byte[];
|
|
205
|
-
hashToDirectlySign?: Byte[];
|
|
206
|
-
protocolID: [
|
|
207
|
-
SecurityLevel,
|
|
208
|
-
ProtocolString5To400Bytes
|
|
209
|
-
];
|
|
210
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
211
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
212
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
213
|
-
privileged?: BooleanDefaultFalse;
|
|
214
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
215
|
-
signature: Byte[];
|
|
216
|
-
}>
|
|
217
|
-
async verifySignature(args: {
|
|
218
|
-
seekPermission?: BooleanDefaultTrue;
|
|
219
|
-
data?: Byte[];
|
|
220
|
-
hashToDirectlyVerify?: Byte[];
|
|
221
|
-
signature: Byte[];
|
|
222
|
-
protocolID: [
|
|
223
|
-
SecurityLevel,
|
|
224
|
-
ProtocolString5To400Bytes
|
|
225
|
-
];
|
|
226
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
227
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
228
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
229
|
-
forSelf?: BooleanDefaultFalse;
|
|
230
|
-
privileged?: BooleanDefaultFalse;
|
|
231
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
232
|
-
valid: true;
|
|
233
|
-
}>
|
|
234
|
-
async acquireCertificate(args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<AcquireCertificateResult>
|
|
235
|
-
async listCertificates(args: {
|
|
236
|
-
certifiers: PubKeyHex[];
|
|
237
|
-
types: Base64String[];
|
|
238
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
239
|
-
offset?: PositiveIntegerOrZero;
|
|
240
|
-
privileged?: BooleanDefaultFalse;
|
|
241
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
242
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListCertificatesResult>
|
|
243
|
-
async proveCertificate(args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ProveCertificateResult>
|
|
244
|
-
async relinquishCertificate(args: {
|
|
245
|
-
type: Base64String;
|
|
246
|
-
serialNumber: Base64String;
|
|
247
|
-
certifier: PubKeyHex;
|
|
248
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
249
|
-
relinquished: true;
|
|
250
|
-
}>
|
|
251
|
-
async discoverByIdentityKey(args: {
|
|
252
|
-
seekPermission?: BooleanDefaultTrue;
|
|
253
|
-
identityKey: PubKeyHex;
|
|
254
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
255
|
-
offset?: PositiveIntegerOrZero;
|
|
256
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>
|
|
257
|
-
async discoverByAttributes(args: {
|
|
258
|
-
seekPermission?: BooleanDefaultTrue;
|
|
259
|
-
attributes: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
260
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
261
|
-
offset?: PositiveIntegerOrZero;
|
|
262
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>
|
|
263
|
-
async isAuthenticated(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
264
|
-
authenticated: true;
|
|
265
|
-
}>
|
|
266
|
-
async waitForAuthentication(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
267
|
-
authenticated: true;
|
|
268
|
-
}>
|
|
269
|
-
async getHeight(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
270
|
-
height: PositiveInteger;
|
|
271
|
-
}>
|
|
272
|
-
async getHeaderForHeight(args: {
|
|
273
|
-
height: PositiveInteger;
|
|
274
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
275
|
-
header: HexString;
|
|
276
|
-
}>
|
|
277
|
-
async getNetwork(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
278
|
-
network: "mainnet" | "testnet";
|
|
279
|
-
}>
|
|
280
|
-
async getVersion(args: {}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
281
|
-
version: VersionString7To30Bytes;
|
|
282
|
-
}>
|
|
283
|
-
}
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
See also: [AcquireCertificateArgs](./wallet.md#interface-acquirecertificateargs), [AcquireCertificateResult](./wallet.md#type-acquirecertificateresult), [Base64String](./wallet.md#type-base64string), [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [Byte](./wallet.md#type-byte), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [CreateActionArgs](./wallet.md#interface-createactionargs), [CreateActionResult](./wallet.md#interface-createactionresult), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [DiscoverCertificatesResult](./wallet.md#interface-discovercertificatesresult), [HexString](./wallet.md#type-hexstring), [ISOTimestampString](./wallet.md#type-isotimestampstring), [InternalizeActionArgs](./wallet.md#interface-internalizeactionargs), [KeyIDStringUnder800Bytes](./wallet.md#type-keyidstringunder800bytes), [ListActionsArgs](./wallet.md#interface-listactionsargs), [ListActionsResult](./wallet.md#interface-listactionsresult), [ListCertificatesResult](./wallet.md#interface-listcertificatesresult), [ListOutputsArgs](./wallet.md#interface-listoutputsargs), [ListOutputsResult](./wallet.md#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [OutpointString](./wallet.md#type-outpointstring), [PositiveInteger](./wallet.md#type-positiveinteger), [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [ProtocolString5To400Bytes](./wallet.md#type-protocolstring5to400bytes), [ProveCertificateArgs](./wallet.md#interface-provecertificateargs), [ProveCertificateResult](./wallet.md#interface-provecertificateresult), [PubKeyHex](./wallet.md#type-pubkeyhex), [SecurityLevel](./wallet.md#type-securitylevel), [SignActionArgs](./wallet.md#interface-signactionargs), [SignActionResult](./wallet.md#interface-signactionresult), [VersionString7To30Bytes](./wallet.md#type-versionstring7to30bytes), [WalletInterface](./wallet.md#interface-walletinterface), [WalletWire](./wallet.md#interface-walletwire), [decrypt](./messages.md#variable-decrypt), [encrypt](./messages.md#variable-encrypt)
|
|
287
|
-
|
|
288
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
### Class: WindowCWISubstrate
|
|
292
|
-
|
|
293
|
-
Facilitates wallet operations over the window.CWI interface.
|
|
294
|
-
|
|
295
|
-
```ts
|
|
296
|
-
export default class WindowCWISubstrate implements WalletInterface {
|
|
297
|
-
constructor()
|
|
298
|
-
async createAction(args: {
|
|
299
|
-
description: DescriptionString5to50Bytes;
|
|
300
|
-
inputs?: Array<{
|
|
301
|
-
tx?: BEEF;
|
|
302
|
-
outpoint: OutpointString;
|
|
303
|
-
unlockingScript?: HexString;
|
|
304
|
-
unlockingScriptLength?: PositiveInteger;
|
|
305
|
-
inputDescription: DescriptionString5to50Bytes;
|
|
306
|
-
sequenceNumber?: PositiveIntegerOrZero;
|
|
307
|
-
}>;
|
|
308
|
-
outputs?: Array<{
|
|
309
|
-
lockingScript: HexString;
|
|
310
|
-
satoshis: SatoshiValue;
|
|
311
|
-
outputDescription: DescriptionString5to50Bytes;
|
|
312
|
-
basket?: BasketStringUnder300Bytes;
|
|
313
|
-
customInstructions?: string;
|
|
314
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
315
|
-
}>;
|
|
316
|
-
lockTime?: PositiveIntegerOrZero;
|
|
317
|
-
version?: PositiveIntegerOrZero;
|
|
318
|
-
labels?: LabelStringUnder300Bytes[];
|
|
319
|
-
options?: {
|
|
320
|
-
signAndProcess?: BooleanDefaultTrue;
|
|
321
|
-
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
322
|
-
trustSelf?: "known";
|
|
323
|
-
knownTxids?: TXIDHexString[];
|
|
324
|
-
returnTXIDOnly?: BooleanDefaultFalse;
|
|
325
|
-
noSend?: BooleanDefaultFalse;
|
|
326
|
-
noSendChange?: OutpointString[];
|
|
327
|
-
sendWith?: TXIDHexString[];
|
|
328
|
-
};
|
|
329
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
330
|
-
txid?: TXIDHexString;
|
|
331
|
-
tx?: BEEF;
|
|
332
|
-
noSendChange?: OutpointString[];
|
|
333
|
-
sendWithResults?: Array<{
|
|
334
|
-
txid: TXIDHexString;
|
|
335
|
-
status: "unproven" | "sending" | "failed";
|
|
336
|
-
}>;
|
|
337
|
-
signableTransaction?: {
|
|
338
|
-
tx: BEEF;
|
|
339
|
-
reference: Base64String;
|
|
340
|
-
};
|
|
341
|
-
}>
|
|
342
|
-
async signAction(args: {
|
|
343
|
-
spends: Record<PositiveIntegerOrZero, {
|
|
344
|
-
unlockingScript: HexString;
|
|
345
|
-
sequenceNumber?: PositiveIntegerOrZero;
|
|
346
|
-
}>;
|
|
347
|
-
reference: Base64String;
|
|
348
|
-
options?: {
|
|
349
|
-
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
350
|
-
returnTXIDOnly?: BooleanDefaultFalse;
|
|
351
|
-
noSend?: BooleanDefaultFalse;
|
|
352
|
-
noSendChange?: OutpointString[];
|
|
353
|
-
sendWith: TXIDHexString[];
|
|
354
|
-
};
|
|
355
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
356
|
-
txid?: TXIDHexString;
|
|
357
|
-
tx?: BEEF;
|
|
358
|
-
noSendChange?: OutpointString[];
|
|
359
|
-
sendWithResults?: Array<{
|
|
360
|
-
txid: TXIDHexString;
|
|
361
|
-
status: "unproven" | "sending" | "failed";
|
|
362
|
-
}>;
|
|
363
|
-
}>
|
|
364
|
-
async abortAction(args: {
|
|
365
|
-
reference: Base64String;
|
|
366
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
367
|
-
aborted: true;
|
|
368
|
-
}>
|
|
369
|
-
async listActions(args: {
|
|
370
|
-
labels: LabelStringUnder300Bytes[];
|
|
371
|
-
labelQueryMode?: "any" | "all";
|
|
372
|
-
includeLabels?: BooleanDefaultFalse;
|
|
373
|
-
includeInputs?: BooleanDefaultFalse;
|
|
374
|
-
includeInputSourceLockingScripts?: BooleanDefaultFalse;
|
|
375
|
-
includeInputUnlockingScripts?: BooleanDefaultFalse;
|
|
376
|
-
includeOutputs?: BooleanDefaultFalse;
|
|
377
|
-
includeOutputLockingScripts?: BooleanDefaultFalse;
|
|
378
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
379
|
-
offset?: PositiveIntegerOrZero;
|
|
380
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
381
|
-
totalActions: PositiveIntegerOrZero;
|
|
382
|
-
actions: Array<{
|
|
383
|
-
txid: TXIDHexString;
|
|
384
|
-
satoshis: SatoshiValue;
|
|
385
|
-
status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal" | "failed";
|
|
386
|
-
isOutgoing: boolean;
|
|
387
|
-
description: DescriptionString5to50Bytes;
|
|
388
|
-
labels?: LabelStringUnder300Bytes[];
|
|
389
|
-
version: PositiveIntegerOrZero;
|
|
390
|
-
lockTime: PositiveIntegerOrZero;
|
|
391
|
-
inputs?: Array<{
|
|
392
|
-
sourceOutpoint: OutpointString;
|
|
393
|
-
sourceSatoshis: SatoshiValue;
|
|
394
|
-
sourceLockingScript?: HexString;
|
|
395
|
-
unlockingScript?: HexString;
|
|
396
|
-
inputDescription: DescriptionString5to50Bytes;
|
|
397
|
-
sequenceNumber: PositiveIntegerOrZero;
|
|
398
|
-
}>;
|
|
399
|
-
outputs?: Array<{
|
|
400
|
-
outputIndex: PositiveIntegerOrZero;
|
|
401
|
-
satoshis: SatoshiValue;
|
|
402
|
-
lockingScript?: HexString;
|
|
403
|
-
spendable: boolean;
|
|
404
|
-
outputDescription: DescriptionString5to50Bytes;
|
|
405
|
-
basket: BasketStringUnder300Bytes;
|
|
406
|
-
tags: OutputTagStringUnder300Bytes[];
|
|
407
|
-
customInstructions?: string;
|
|
408
|
-
}>;
|
|
409
|
-
}>;
|
|
410
|
-
}>
|
|
411
|
-
async internalizeAction(args: {
|
|
412
|
-
tx: BEEF;
|
|
413
|
-
outputs: Array<{
|
|
414
|
-
outputIndex: PositiveIntegerOrZero;
|
|
415
|
-
protocol: "wallet payment" | "basket insertion";
|
|
416
|
-
paymentRemittance?: {
|
|
417
|
-
derivationPrefix: Base64String;
|
|
418
|
-
derivationSuffix: Base64String;
|
|
419
|
-
senderIdentityKey: PubKeyHex;
|
|
420
|
-
};
|
|
421
|
-
insertionRemittance?: {
|
|
422
|
-
basket: BasketStringUnder300Bytes;
|
|
423
|
-
customInstructions?: string;
|
|
424
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
425
|
-
};
|
|
426
|
-
}>;
|
|
427
|
-
description: DescriptionString5to50Bytes;
|
|
428
|
-
labels?: LabelStringUnder300Bytes[];
|
|
429
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
430
|
-
accepted: true;
|
|
431
|
-
}>
|
|
432
|
-
async listOutputs(args: {
|
|
433
|
-
basket: BasketStringUnder300Bytes;
|
|
434
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
435
|
-
tagQueryMode?: "all" | "any";
|
|
436
|
-
include?: "locking scripts" | "entire transactions";
|
|
437
|
-
includeCustomInstructions?: BooleanDefaultFalse;
|
|
438
|
-
includeTags?: BooleanDefaultFalse;
|
|
439
|
-
includeLabels?: BooleanDefaultFalse;
|
|
440
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
441
|
-
offset?: PositiveIntegerOrZero;
|
|
442
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
443
|
-
totalOutputs: PositiveIntegerOrZero;
|
|
444
|
-
outputs: Array<{
|
|
445
|
-
outpoint: OutpointString;
|
|
446
|
-
satoshis: SatoshiValue;
|
|
447
|
-
lockingScript?: HexString;
|
|
448
|
-
tx?: BEEF;
|
|
449
|
-
spendable: boolean;
|
|
450
|
-
customInstructions?: string;
|
|
451
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
452
|
-
labels?: LabelStringUnder300Bytes[];
|
|
453
|
-
}>;
|
|
454
|
-
}>
|
|
455
|
-
async relinquishOutput(args: {
|
|
456
|
-
basket: BasketStringUnder300Bytes;
|
|
457
|
-
output: OutpointString;
|
|
458
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
459
|
-
relinquished: true;
|
|
460
|
-
}>
|
|
461
|
-
async getPublicKey(args: {
|
|
462
|
-
identityKey?: true;
|
|
463
|
-
protocolID?: [
|
|
464
|
-
SecurityLevel,
|
|
465
|
-
ProtocolString5To400Bytes
|
|
466
|
-
];
|
|
467
|
-
keyID?: KeyIDStringUnder800Bytes;
|
|
468
|
-
privileged?: BooleanDefaultFalse;
|
|
469
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
470
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
471
|
-
forSelf?: BooleanDefaultFalse;
|
|
472
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
473
|
-
publicKey: PubKeyHex;
|
|
474
|
-
}>
|
|
475
|
-
async revealCounterpartyKeyLinkage(args: {
|
|
476
|
-
counterparty: PubKeyHex;
|
|
477
|
-
verifier: PubKeyHex;
|
|
478
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
479
|
-
privileged?: BooleanDefaultFalse;
|
|
480
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
481
|
-
prover: PubKeyHex;
|
|
482
|
-
verifier: PubKeyHex;
|
|
483
|
-
counterparty: PubKeyHex;
|
|
484
|
-
revelationTime: ISOTimestampString;
|
|
485
|
-
encryptedLinkage: Byte[];
|
|
486
|
-
encryptedLinkageProof: Byte[];
|
|
487
|
-
}>
|
|
488
|
-
async revealSpecificKeyLinkage(args: {
|
|
489
|
-
counterparty: PubKeyHex;
|
|
490
|
-
verifier: PubKeyHex;
|
|
491
|
-
protocolID: [
|
|
492
|
-
SecurityLevel,
|
|
493
|
-
ProtocolString5To400Bytes
|
|
494
|
-
];
|
|
495
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
496
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
497
|
-
privileged?: BooleanDefaultFalse;
|
|
498
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
499
|
-
prover: PubKeyHex;
|
|
500
|
-
verifier: PubKeyHex;
|
|
501
|
-
counterparty: PubKeyHex;
|
|
502
|
-
protocolID: [
|
|
503
|
-
SecurityLevel,
|
|
504
|
-
ProtocolString5To400Bytes
|
|
505
|
-
];
|
|
506
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
507
|
-
encryptedLinkage: Byte[];
|
|
508
|
-
encryptedLinkageProof: Byte[];
|
|
509
|
-
proofType: Byte;
|
|
510
|
-
}>
|
|
511
|
-
async encrypt(args: {
|
|
512
|
-
plaintext: Byte[];
|
|
513
|
-
protocolID: [
|
|
514
|
-
SecurityLevel,
|
|
515
|
-
ProtocolString5To400Bytes
|
|
516
|
-
];
|
|
517
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
518
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
519
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
520
|
-
privileged?: BooleanDefaultFalse;
|
|
521
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
522
|
-
ciphertext: Byte[];
|
|
523
|
-
}>
|
|
524
|
-
async decrypt(args: {
|
|
525
|
-
ciphertext: Byte[];
|
|
526
|
-
protocolID: [
|
|
527
|
-
SecurityLevel,
|
|
528
|
-
ProtocolString5To400Bytes
|
|
529
|
-
];
|
|
530
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
531
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
532
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
533
|
-
privileged?: BooleanDefaultFalse;
|
|
534
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
535
|
-
plaintext: Byte[];
|
|
536
|
-
}>
|
|
537
|
-
async createHmac(args: {
|
|
538
|
-
data: Byte[];
|
|
539
|
-
protocolID: [
|
|
540
|
-
SecurityLevel,
|
|
541
|
-
ProtocolString5To400Bytes
|
|
542
|
-
];
|
|
543
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
544
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
545
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
546
|
-
privileged?: BooleanDefaultFalse;
|
|
547
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
548
|
-
hmac: Byte[];
|
|
549
|
-
}>
|
|
550
|
-
async verifyHmac(args: {
|
|
551
|
-
data: Byte[];
|
|
552
|
-
hmac: Byte[];
|
|
553
|
-
protocolID: [
|
|
554
|
-
SecurityLevel,
|
|
555
|
-
ProtocolString5To400Bytes
|
|
556
|
-
];
|
|
557
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
558
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
559
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
560
|
-
privileged?: BooleanDefaultFalse;
|
|
561
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
562
|
-
valid: true;
|
|
563
|
-
}>
|
|
564
|
-
async createSignature(args: {
|
|
565
|
-
data?: Byte[];
|
|
566
|
-
hashToDirectlySign?: Byte[];
|
|
567
|
-
protocolID: [
|
|
568
|
-
SecurityLevel,
|
|
569
|
-
ProtocolString5To400Bytes
|
|
570
|
-
];
|
|
571
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
572
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
573
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
574
|
-
privileged?: BooleanDefaultFalse;
|
|
575
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
576
|
-
signature: Byte[];
|
|
577
|
-
}>
|
|
578
|
-
async verifySignature(args: {
|
|
579
|
-
data?: Byte[];
|
|
580
|
-
hashToDirectlyVerify?: Byte[];
|
|
581
|
-
signature: Byte[];
|
|
582
|
-
protocolID: [
|
|
583
|
-
SecurityLevel,
|
|
584
|
-
ProtocolString5To400Bytes
|
|
585
|
-
];
|
|
586
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
587
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
588
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
589
|
-
forSelf?: BooleanDefaultFalse;
|
|
590
|
-
privileged?: BooleanDefaultFalse;
|
|
591
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
592
|
-
valid: true;
|
|
593
|
-
}>
|
|
594
|
-
async acquireCertificate(args: {
|
|
595
|
-
type: Base64String;
|
|
596
|
-
subject: PubKeyHex;
|
|
597
|
-
serialNumber: Base64String;
|
|
598
|
-
revocationOutpoint: OutpointString;
|
|
599
|
-
signature: HexString;
|
|
600
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
601
|
-
certifier: PubKeyHex;
|
|
602
|
-
keyringRevealer: PubKeyHex | "certifier";
|
|
603
|
-
keyringForSubject: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
604
|
-
acquisitionProtocol: "direct" | "issuance";
|
|
605
|
-
certifierUrl?: string;
|
|
606
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
607
|
-
type: Base64String;
|
|
608
|
-
subject: PubKeyHex;
|
|
609
|
-
serialNumber: Base64String;
|
|
610
|
-
certifier: PubKeyHex;
|
|
611
|
-
revocationOutpoint: OutpointString;
|
|
612
|
-
signature: HexString;
|
|
613
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
614
|
-
}>
|
|
615
|
-
async listCertificates(args: {
|
|
616
|
-
certifiers: PubKeyHex[];
|
|
617
|
-
types: Base64String[];
|
|
618
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
619
|
-
offset?: PositiveIntegerOrZero;
|
|
620
|
-
privileged?: BooleanDefaultFalse;
|
|
621
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
622
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
623
|
-
totalCertificates: PositiveIntegerOrZero;
|
|
624
|
-
certificates: Array<{
|
|
625
|
-
type: Base64String;
|
|
626
|
-
subject: PubKeyHex;
|
|
627
|
-
serialNumber: Base64String;
|
|
628
|
-
certifier: PubKeyHex;
|
|
629
|
-
revocationOutpoint: OutpointString;
|
|
630
|
-
signature: HexString;
|
|
631
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
632
|
-
}>;
|
|
633
|
-
}>
|
|
634
|
-
async proveCertificate(args: {
|
|
635
|
-
certificate: {
|
|
636
|
-
type: Base64String;
|
|
637
|
-
subject: PubKeyHex;
|
|
638
|
-
serialNumber: Base64String;
|
|
639
|
-
certifier: PubKeyHex;
|
|
640
|
-
revocationOutpoint: OutpointString;
|
|
641
|
-
signature: HexString;
|
|
642
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
643
|
-
};
|
|
644
|
-
fieldsToReveal: CertificateFieldNameUnder50Bytes[];
|
|
645
|
-
verifier: PubKeyHex;
|
|
646
|
-
privileged?: BooleanDefaultFalse;
|
|
647
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
648
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
649
|
-
keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
650
|
-
}>
|
|
651
|
-
async relinquishCertificate(args: {
|
|
652
|
-
type: Base64String;
|
|
653
|
-
serialNumber: Base64String;
|
|
654
|
-
certifier: PubKeyHex;
|
|
655
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
656
|
-
relinquished: true;
|
|
657
|
-
}>
|
|
658
|
-
async discoverByIdentityKey(args: {
|
|
659
|
-
identityKey: PubKeyHex;
|
|
660
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
661
|
-
offset?: PositiveIntegerOrZero;
|
|
662
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
663
|
-
totalCertificates: PositiveIntegerOrZero;
|
|
664
|
-
certificates: Array<{
|
|
665
|
-
type: Base64String;
|
|
666
|
-
subject: PubKeyHex;
|
|
667
|
-
serialNumber: Base64String;
|
|
668
|
-
certifier: PubKeyHex;
|
|
669
|
-
revocationOutpoint: OutpointString;
|
|
670
|
-
signature: HexString;
|
|
671
|
-
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
672
|
-
certifierInfo: {
|
|
673
|
-
name: EntityNameStringMax100Bytes;
|
|
674
|
-
iconUrl: EntityIconURLStringMax500Bytes;
|
|
675
|
-
description: DescriptionString5to50Bytes;
|
|
676
|
-
trust: PositiveIntegerMax10;
|
|
677
|
-
};
|
|
678
|
-
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
679
|
-
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
680
|
-
}>;
|
|
681
|
-
}>
|
|
682
|
-
async discoverByAttributes(args: {
|
|
683
|
-
attributes: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
684
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
685
|
-
offset?: PositiveIntegerOrZero;
|
|
686
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
687
|
-
totalCertificates: PositiveIntegerOrZero;
|
|
688
|
-
certificates: Array<{
|
|
689
|
-
type: Base64String;
|
|
690
|
-
subject: PubKeyHex;
|
|
691
|
-
serialNumber: Base64String;
|
|
692
|
-
certifier: PubKeyHex;
|
|
693
|
-
revocationOutpoint: OutpointString;
|
|
694
|
-
signature: HexString;
|
|
695
|
-
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
696
|
-
certifierInfo: {
|
|
697
|
-
name: EntityNameStringMax100Bytes;
|
|
698
|
-
iconUrl: EntityIconURLStringMax500Bytes;
|
|
699
|
-
description: DescriptionString5to50Bytes;
|
|
700
|
-
trust: PositiveIntegerMax10;
|
|
701
|
-
};
|
|
702
|
-
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
703
|
-
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
704
|
-
}>;
|
|
705
|
-
}>
|
|
706
|
-
async isAuthenticated(args: object, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
707
|
-
authenticated: true;
|
|
708
|
-
}>
|
|
709
|
-
async waitForAuthentication(args: object, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
710
|
-
authenticated: true;
|
|
711
|
-
}>
|
|
712
|
-
async getHeight(args: object, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
713
|
-
height: PositiveInteger;
|
|
714
|
-
}>
|
|
715
|
-
async getHeaderForHeight(args: {
|
|
716
|
-
height: PositiveInteger;
|
|
717
|
-
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
718
|
-
header: HexString;
|
|
719
|
-
}>
|
|
720
|
-
async getNetwork(args: object, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
721
|
-
network: "mainnet" | "testnet";
|
|
722
|
-
}>
|
|
723
|
-
async getVersion(args: object, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<{
|
|
724
|
-
version: VersionString7To30Bytes;
|
|
725
|
-
}>
|
|
726
|
-
}
|
|
727
|
-
```
|
|
728
|
-
|
|
729
|
-
See also: [BEEF](./wallet.md#type-beef), [Base64String](./wallet.md#type-base64string), [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [Byte](./wallet.md#type-byte), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [EntityIconURLStringMax500Bytes](./wallet.md#type-entityiconurlstringmax500bytes), [EntityNameStringMax100Bytes](./wallet.md#type-entitynamestringmax100bytes), [HexString](./wallet.md#type-hexstring), [ISOTimestampString](./wallet.md#type-isotimestampstring), [KeyIDStringUnder800Bytes](./wallet.md#type-keyidstringunder800bytes), [LabelStringUnder300Bytes](./wallet.md#type-labelstringunder300bytes), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [OutpointString](./wallet.md#type-outpointstring), [OutputTagStringUnder300Bytes](./wallet.md#type-outputtagstringunder300bytes), [PositiveInteger](./wallet.md#type-positiveinteger), [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerMax10](./wallet.md#type-positiveintegermax10), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [ProtocolString5To400Bytes](./wallet.md#type-protocolstring5to400bytes), [PubKeyHex](./wallet.md#type-pubkeyhex), [SatoshiValue](./wallet.md#type-satoshivalue), [SecurityLevel](./wallet.md#type-securitylevel), [TXIDHexString](./wallet.md#type-txidhexstring), [VersionString7To30Bytes](./wallet.md#type-versionstring7to30bytes), [WalletInterface](./wallet.md#interface-walletinterface), [decrypt](./messages.md#variable-decrypt), [encrypt](./messages.md#variable-encrypt)
|
|
730
|
-
|
|
731
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
732
|
-
|
|
733
|
-
---
|
|
734
|
-
### Class: XDMSubstrate
|
|
735
|
-
|
|
736
|
-
Facilitates wallet operations over cross-document messaging.
|
|
737
|
-
|
|
738
|
-
```ts
|
|
739
|
-
export default class XDMSubstrate implements WalletInterface {
|
|
740
|
-
constructor(domain: string = "*")
|
|
741
|
-
async invoke(call: CallType, args: any): Promise<any>
|
|
742
|
-
async createAction(args: {
|
|
743
|
-
description: DescriptionString5to50Bytes;
|
|
744
|
-
inputs?: Array<{
|
|
745
|
-
tx?: BEEF;
|
|
746
|
-
outpoint: OutpointString;
|
|
747
|
-
unlockingScript?: HexString;
|
|
748
|
-
unlockingScriptLength?: PositiveInteger;
|
|
749
|
-
inputDescription: DescriptionString5to50Bytes;
|
|
750
|
-
sequenceNumber?: PositiveIntegerOrZero;
|
|
751
|
-
}>;
|
|
752
|
-
outputs?: Array<{
|
|
753
|
-
lockingScript: HexString;
|
|
754
|
-
satoshis: SatoshiValue;
|
|
755
|
-
outputDescription: DescriptionString5to50Bytes;
|
|
756
|
-
basket?: BasketStringUnder300Bytes;
|
|
757
|
-
customInstructions?: string;
|
|
758
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
759
|
-
}>;
|
|
760
|
-
lockTime?: PositiveIntegerOrZero;
|
|
761
|
-
version?: PositiveIntegerOrZero;
|
|
762
|
-
labels?: LabelStringUnder300Bytes[];
|
|
763
|
-
options?: {
|
|
764
|
-
signAndProcess?: BooleanDefaultTrue;
|
|
765
|
-
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
766
|
-
trustSelf?: "known";
|
|
767
|
-
knownTxids?: TXIDHexString[];
|
|
768
|
-
returnTXIDOnly?: BooleanDefaultFalse;
|
|
769
|
-
noSend?: BooleanDefaultFalse;
|
|
770
|
-
noSendChange?: OutpointString[];
|
|
771
|
-
sendWith?: TXIDHexString[];
|
|
772
|
-
};
|
|
773
|
-
}): Promise<{
|
|
774
|
-
txid?: TXIDHexString;
|
|
775
|
-
tx?: BEEF;
|
|
776
|
-
noSendChange?: OutpointString[];
|
|
777
|
-
sendWithResults?: Array<{
|
|
778
|
-
txid: TXIDHexString;
|
|
779
|
-
status: "unproven" | "sending" | "failed";
|
|
780
|
-
}>;
|
|
781
|
-
signableTransaction?: {
|
|
782
|
-
tx: BEEF;
|
|
783
|
-
reference: Base64String;
|
|
784
|
-
};
|
|
785
|
-
}>
|
|
786
|
-
async signAction(args: {
|
|
787
|
-
spends: Record<PositiveIntegerOrZero, {
|
|
788
|
-
unlockingScript: HexString;
|
|
789
|
-
sequenceNumber?: PositiveIntegerOrZero;
|
|
790
|
-
}>;
|
|
791
|
-
reference: Base64String;
|
|
792
|
-
options?: {
|
|
793
|
-
acceptDelayedBroadcast?: BooleanDefaultTrue;
|
|
794
|
-
returnTXIDOnly?: BooleanDefaultFalse;
|
|
795
|
-
noSend?: BooleanDefaultFalse;
|
|
796
|
-
noSendChange?: OutpointString[];
|
|
797
|
-
sendWith: TXIDHexString[];
|
|
798
|
-
};
|
|
799
|
-
}): Promise<{
|
|
800
|
-
txid?: TXIDHexString;
|
|
801
|
-
tx?: BEEF;
|
|
802
|
-
noSendChange?: OutpointString[];
|
|
803
|
-
sendWithResults?: Array<{
|
|
804
|
-
txid: TXIDHexString;
|
|
805
|
-
status: "unproven" | "sending" | "failed";
|
|
806
|
-
}>;
|
|
807
|
-
}>
|
|
808
|
-
async abortAction(args: {
|
|
809
|
-
reference: Base64String;
|
|
810
|
-
}): Promise<{
|
|
811
|
-
aborted: true;
|
|
812
|
-
}>
|
|
813
|
-
async listActions(args: {
|
|
814
|
-
labels: LabelStringUnder300Bytes[];
|
|
815
|
-
labelQueryMode?: "any" | "all";
|
|
816
|
-
includeLabels?: BooleanDefaultFalse;
|
|
817
|
-
includeInputs?: BooleanDefaultFalse;
|
|
818
|
-
includeInputSourceLockingScripts?: BooleanDefaultFalse;
|
|
819
|
-
includeInputUnlockingScripts?: BooleanDefaultFalse;
|
|
820
|
-
includeOutputs?: BooleanDefaultFalse;
|
|
821
|
-
includeOutputLockingScripts?: BooleanDefaultFalse;
|
|
822
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
823
|
-
offset?: PositiveIntegerOrZero;
|
|
824
|
-
}): Promise<{
|
|
825
|
-
totalActions: PositiveIntegerOrZero;
|
|
826
|
-
actions: Array<{
|
|
827
|
-
txid: TXIDHexString;
|
|
828
|
-
satoshis: SatoshiValue;
|
|
829
|
-
status: "completed" | "unprocessed" | "sending" | "unproven" | "unsigned" | "nosend" | "nonfinal";
|
|
830
|
-
isOutgoing: boolean;
|
|
831
|
-
description: DescriptionString5to50Bytes;
|
|
832
|
-
labels?: LabelStringUnder300Bytes[];
|
|
833
|
-
version: PositiveIntegerOrZero;
|
|
834
|
-
lockTime: PositiveIntegerOrZero;
|
|
835
|
-
inputs?: Array<{
|
|
836
|
-
sourceOutpoint: OutpointString;
|
|
837
|
-
sourceSatoshis: SatoshiValue;
|
|
838
|
-
sourceLockingScript?: HexString;
|
|
839
|
-
unlockingScript?: HexString;
|
|
840
|
-
inputDescription: DescriptionString5to50Bytes;
|
|
841
|
-
sequenceNumber: PositiveIntegerOrZero;
|
|
842
|
-
}>;
|
|
843
|
-
outputs?: Array<{
|
|
844
|
-
outputIndex: PositiveIntegerOrZero;
|
|
845
|
-
satoshis: SatoshiValue;
|
|
846
|
-
lockingScript?: HexString;
|
|
847
|
-
spendable: boolean;
|
|
848
|
-
outputDescription: DescriptionString5to50Bytes;
|
|
849
|
-
basket: BasketStringUnder300Bytes;
|
|
850
|
-
tags: OutputTagStringUnder300Bytes[];
|
|
851
|
-
customInstructions?: string;
|
|
852
|
-
}>;
|
|
853
|
-
}>;
|
|
854
|
-
}>
|
|
855
|
-
async internalizeAction(args: {
|
|
856
|
-
tx: BEEF;
|
|
857
|
-
outputs: Array<{
|
|
858
|
-
outputIndex: PositiveIntegerOrZero;
|
|
859
|
-
protocol: "wallet payment" | "basket insertion";
|
|
860
|
-
paymentRemittance?: {
|
|
861
|
-
derivationPrefix: Base64String;
|
|
862
|
-
derivationSuffix: Base64String;
|
|
863
|
-
senderIdentityKey: PubKeyHex;
|
|
864
|
-
};
|
|
865
|
-
insertionRemittance?: {
|
|
866
|
-
basket: BasketStringUnder300Bytes;
|
|
867
|
-
customInstructions?: string;
|
|
868
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
869
|
-
};
|
|
870
|
-
}>;
|
|
871
|
-
description: DescriptionString5to50Bytes;
|
|
872
|
-
labels?: LabelStringUnder300Bytes[];
|
|
873
|
-
}): Promise<{
|
|
874
|
-
accepted: true;
|
|
875
|
-
}>
|
|
876
|
-
async listOutputs(args: {
|
|
877
|
-
basket: BasketStringUnder300Bytes;
|
|
878
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
879
|
-
tagQueryMode?: "all" | "any";
|
|
880
|
-
include?: "locking scripts" | "entire transactions";
|
|
881
|
-
includeCustomInstructions?: BooleanDefaultFalse;
|
|
882
|
-
includeTags?: BooleanDefaultFalse;
|
|
883
|
-
includeLabels?: BooleanDefaultFalse;
|
|
884
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
885
|
-
offset?: PositiveIntegerOrZero;
|
|
886
|
-
}): Promise<{
|
|
887
|
-
totalOutputs: PositiveIntegerOrZero;
|
|
888
|
-
outputs: Array<{
|
|
889
|
-
outpoint: OutpointString;
|
|
890
|
-
satoshis: SatoshiValue;
|
|
891
|
-
lockingScript?: HexString;
|
|
892
|
-
tx?: BEEF;
|
|
893
|
-
spendable: boolean;
|
|
894
|
-
customInstructions?: string;
|
|
895
|
-
tags?: OutputTagStringUnder300Bytes[];
|
|
896
|
-
labels?: LabelStringUnder300Bytes[];
|
|
897
|
-
}>;
|
|
898
|
-
}>
|
|
899
|
-
async relinquishOutput(args: {
|
|
900
|
-
basket: BasketStringUnder300Bytes;
|
|
901
|
-
output: OutpointString;
|
|
902
|
-
}): Promise<{
|
|
903
|
-
relinquished: true;
|
|
904
|
-
}>
|
|
905
|
-
async getPublicKey(args: {
|
|
906
|
-
identityKey?: true;
|
|
907
|
-
protocolID?: [
|
|
908
|
-
SecurityLevel,
|
|
909
|
-
ProtocolString5To400Bytes
|
|
910
|
-
];
|
|
911
|
-
keyID?: KeyIDStringUnder800Bytes;
|
|
912
|
-
privileged?: BooleanDefaultFalse;
|
|
913
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
914
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
915
|
-
forSelf?: BooleanDefaultFalse;
|
|
916
|
-
}): Promise<{
|
|
917
|
-
publicKey: PubKeyHex;
|
|
918
|
-
}>
|
|
919
|
-
async revealCounterpartyKeyLinkage(args: {
|
|
920
|
-
counterparty: PubKeyHex;
|
|
921
|
-
verifier: PubKeyHex;
|
|
922
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
923
|
-
privileged?: BooleanDefaultFalse;
|
|
924
|
-
}): Promise<{
|
|
925
|
-
prover: PubKeyHex;
|
|
926
|
-
verifier: PubKeyHex;
|
|
927
|
-
counterparty: PubKeyHex;
|
|
928
|
-
revelationTime: ISOTimestampString;
|
|
929
|
-
encryptedLinkage: Byte[];
|
|
930
|
-
encryptedLinkageProof: Byte[];
|
|
931
|
-
}>
|
|
932
|
-
async revealSpecificKeyLinkage(args: {
|
|
933
|
-
counterparty: PubKeyHex;
|
|
934
|
-
verifier: PubKeyHex;
|
|
935
|
-
protocolID: [
|
|
936
|
-
SecurityLevel,
|
|
937
|
-
ProtocolString5To400Bytes
|
|
938
|
-
];
|
|
939
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
940
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
941
|
-
privileged?: BooleanDefaultFalse;
|
|
942
|
-
}): Promise<{
|
|
943
|
-
prover: PubKeyHex;
|
|
944
|
-
verifier: PubKeyHex;
|
|
945
|
-
counterparty: PubKeyHex;
|
|
946
|
-
protocolID: [
|
|
947
|
-
SecurityLevel,
|
|
948
|
-
ProtocolString5To400Bytes
|
|
949
|
-
];
|
|
950
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
951
|
-
encryptedLinkage: Byte[];
|
|
952
|
-
encryptedLinkageProof: Byte[];
|
|
953
|
-
proofType: Byte;
|
|
954
|
-
}>
|
|
955
|
-
async encrypt(args: {
|
|
956
|
-
plaintext: Byte[];
|
|
957
|
-
protocolID: [
|
|
958
|
-
SecurityLevel,
|
|
959
|
-
ProtocolString5To400Bytes
|
|
960
|
-
];
|
|
961
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
962
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
963
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
964
|
-
privileged?: BooleanDefaultFalse;
|
|
965
|
-
}): Promise<{
|
|
966
|
-
ciphertext: Byte[];
|
|
967
|
-
}>
|
|
968
|
-
async decrypt(args: {
|
|
969
|
-
ciphertext: Byte[];
|
|
970
|
-
protocolID: [
|
|
971
|
-
SecurityLevel,
|
|
972
|
-
ProtocolString5To400Bytes
|
|
973
|
-
];
|
|
974
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
975
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
976
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
977
|
-
privileged?: BooleanDefaultFalse;
|
|
978
|
-
}): Promise<{
|
|
979
|
-
plaintext: Byte[];
|
|
980
|
-
}>
|
|
981
|
-
async createHmac(args: {
|
|
982
|
-
data: Byte[];
|
|
983
|
-
protocolID: [
|
|
984
|
-
SecurityLevel,
|
|
985
|
-
ProtocolString5To400Bytes
|
|
986
|
-
];
|
|
987
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
988
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
989
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
990
|
-
privileged?: BooleanDefaultFalse;
|
|
991
|
-
}): Promise<{
|
|
992
|
-
hmac: Byte[];
|
|
993
|
-
}>
|
|
994
|
-
async verifyHmac(args: {
|
|
995
|
-
data: Byte[];
|
|
996
|
-
hmac: Byte[];
|
|
997
|
-
protocolID: [
|
|
998
|
-
SecurityLevel,
|
|
999
|
-
ProtocolString5To400Bytes
|
|
1000
|
-
];
|
|
1001
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
1002
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
1003
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
1004
|
-
privileged?: BooleanDefaultFalse;
|
|
1005
|
-
}): Promise<{
|
|
1006
|
-
valid: true;
|
|
1007
|
-
}>
|
|
1008
|
-
async createSignature(args: {
|
|
1009
|
-
data?: Byte[];
|
|
1010
|
-
hashToDirectlySign?: Byte[];
|
|
1011
|
-
protocolID: [
|
|
1012
|
-
SecurityLevel,
|
|
1013
|
-
ProtocolString5To400Bytes
|
|
1014
|
-
];
|
|
1015
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
1016
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
1017
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
1018
|
-
privileged?: BooleanDefaultFalse;
|
|
1019
|
-
}): Promise<{
|
|
1020
|
-
signature: Byte[];
|
|
1021
|
-
}>
|
|
1022
|
-
async verifySignature(args: {
|
|
1023
|
-
data?: Byte[];
|
|
1024
|
-
hashToDirectlyVerify?: Byte[];
|
|
1025
|
-
signature: Byte[];
|
|
1026
|
-
protocolID: [
|
|
1027
|
-
SecurityLevel,
|
|
1028
|
-
ProtocolString5To400Bytes
|
|
1029
|
-
];
|
|
1030
|
-
keyID: KeyIDStringUnder800Bytes;
|
|
1031
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
1032
|
-
counterparty?: PubKeyHex | "self" | "anyone";
|
|
1033
|
-
forSelf?: BooleanDefaultFalse;
|
|
1034
|
-
privileged?: BooleanDefaultFalse;
|
|
1035
|
-
}): Promise<{
|
|
1036
|
-
valid: true;
|
|
1037
|
-
}>
|
|
1038
|
-
async acquireCertificate(args: {
|
|
1039
|
-
type: Base64String;
|
|
1040
|
-
subject: PubKeyHex;
|
|
1041
|
-
serialNumber: Base64String;
|
|
1042
|
-
revocationOutpoint: OutpointString;
|
|
1043
|
-
signature: HexString;
|
|
1044
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
1045
|
-
certifier: PubKeyHex;
|
|
1046
|
-
keyringRevealer: PubKeyHex | "certifier";
|
|
1047
|
-
keyringForSubject: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
1048
|
-
acquisitionProtocol: "direct" | "issuance";
|
|
1049
|
-
certifierUrl?: string;
|
|
1050
|
-
}): Promise<{
|
|
1051
|
-
type: Base64String;
|
|
1052
|
-
subject: PubKeyHex;
|
|
1053
|
-
serialNumber: Base64String;
|
|
1054
|
-
certifier: PubKeyHex;
|
|
1055
|
-
revocationOutpoint: OutpointString;
|
|
1056
|
-
signature: HexString;
|
|
1057
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
1058
|
-
}>
|
|
1059
|
-
async listCertificates(args: {
|
|
1060
|
-
certifiers: PubKeyHex[];
|
|
1061
|
-
types: Base64String[];
|
|
1062
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
1063
|
-
offset?: PositiveIntegerOrZero;
|
|
1064
|
-
privileged?: BooleanDefaultFalse;
|
|
1065
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
1066
|
-
}): Promise<{
|
|
1067
|
-
totalCertificates: PositiveIntegerOrZero;
|
|
1068
|
-
certificates: Array<{
|
|
1069
|
-
type: Base64String;
|
|
1070
|
-
subject: PubKeyHex;
|
|
1071
|
-
serialNumber: Base64String;
|
|
1072
|
-
certifier: PubKeyHex;
|
|
1073
|
-
revocationOutpoint: OutpointString;
|
|
1074
|
-
signature: HexString;
|
|
1075
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
1076
|
-
}>;
|
|
1077
|
-
}>
|
|
1078
|
-
async proveCertificate(args: {
|
|
1079
|
-
certificate: {
|
|
1080
|
-
type: Base64String;
|
|
1081
|
-
subject: PubKeyHex;
|
|
1082
|
-
serialNumber: Base64String;
|
|
1083
|
-
certifier: PubKeyHex;
|
|
1084
|
-
revocationOutpoint: OutpointString;
|
|
1085
|
-
signature: HexString;
|
|
1086
|
-
fields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
1087
|
-
};
|
|
1088
|
-
fieldsToReveal: CertificateFieldNameUnder50Bytes[];
|
|
1089
|
-
verifier: PubKeyHex;
|
|
1090
|
-
privileged?: BooleanDefaultFalse;
|
|
1091
|
-
privilegedReason?: DescriptionString5to50Bytes;
|
|
1092
|
-
}): Promise<{
|
|
1093
|
-
keyringForVerifier: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
1094
|
-
}>
|
|
1095
|
-
async relinquishCertificate(args: {
|
|
1096
|
-
type: Base64String;
|
|
1097
|
-
serialNumber: Base64String;
|
|
1098
|
-
certifier: PubKeyHex;
|
|
1099
|
-
}): Promise<{
|
|
1100
|
-
relinquished: true;
|
|
1101
|
-
}>
|
|
1102
|
-
async discoverByIdentityKey(args: {
|
|
1103
|
-
identityKey: PubKeyHex;
|
|
1104
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
1105
|
-
offset?: PositiveIntegerOrZero;
|
|
1106
|
-
}): Promise<{
|
|
1107
|
-
totalCertificates: PositiveIntegerOrZero;
|
|
1108
|
-
certificates: Array<{
|
|
1109
|
-
type: Base64String;
|
|
1110
|
-
subject: PubKeyHex;
|
|
1111
|
-
serialNumber: Base64String;
|
|
1112
|
-
certifier: PubKeyHex;
|
|
1113
|
-
revocationOutpoint: OutpointString;
|
|
1114
|
-
signature: HexString;
|
|
1115
|
-
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
1116
|
-
certifierInfo: {
|
|
1117
|
-
name: EntityNameStringMax100Bytes;
|
|
1118
|
-
iconUrl: EntityIconURLStringMax500Bytes;
|
|
1119
|
-
description: DescriptionString5to50Bytes;
|
|
1120
|
-
trust: PositiveIntegerMax10;
|
|
1121
|
-
};
|
|
1122
|
-
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
1123
|
-
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
1124
|
-
}>;
|
|
1125
|
-
}>
|
|
1126
|
-
async discoverByAttributes(args: {
|
|
1127
|
-
attributes: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
1128
|
-
limit?: PositiveIntegerDefault10Max10000;
|
|
1129
|
-
offset?: PositiveIntegerOrZero;
|
|
1130
|
-
}): Promise<{
|
|
1131
|
-
totalCertificates: PositiveIntegerOrZero;
|
|
1132
|
-
certificates: Array<{
|
|
1133
|
-
type: Base64String;
|
|
1134
|
-
subject: PubKeyHex;
|
|
1135
|
-
serialNumber: Base64String;
|
|
1136
|
-
certifier: PubKeyHex;
|
|
1137
|
-
revocationOutpoint: OutpointString;
|
|
1138
|
-
signature: HexString;
|
|
1139
|
-
fields: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
1140
|
-
certifierInfo: {
|
|
1141
|
-
name: EntityNameStringMax100Bytes;
|
|
1142
|
-
iconUrl: EntityIconURLStringMax500Bytes;
|
|
1143
|
-
description: DescriptionString5to50Bytes;
|
|
1144
|
-
trust: PositiveIntegerMax10;
|
|
1145
|
-
};
|
|
1146
|
-
publiclyRevealedKeyring: Record<CertificateFieldNameUnder50Bytes, Base64String>;
|
|
1147
|
-
decryptedFields: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
1148
|
-
}>;
|
|
1149
|
-
}>
|
|
1150
|
-
async isAuthenticated(args: {}): Promise<{
|
|
1151
|
-
authenticated: true;
|
|
1152
|
-
}>
|
|
1153
|
-
async waitForAuthentication(args: {}): Promise<{
|
|
1154
|
-
authenticated: true;
|
|
1155
|
-
}>
|
|
1156
|
-
async getHeight(args: {}): Promise<{
|
|
1157
|
-
height: PositiveInteger;
|
|
1158
|
-
}>
|
|
1159
|
-
async getHeaderForHeight(args: {
|
|
1160
|
-
height: PositiveInteger;
|
|
1161
|
-
}): Promise<{
|
|
1162
|
-
header: HexString;
|
|
1163
|
-
}>
|
|
1164
|
-
async getNetwork(args: {}): Promise<{
|
|
1165
|
-
network: "mainnet" | "testnet";
|
|
1166
|
-
}>
|
|
1167
|
-
async getVersion(args: {}): Promise<{
|
|
1168
|
-
version: VersionString7To30Bytes;
|
|
1169
|
-
}>
|
|
1170
|
-
}
|
|
1171
|
-
```
|
|
1172
|
-
|
|
1173
|
-
See also: [BEEF](./wallet.md#type-beef), [Base64String](./wallet.md#type-base64string), [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [Byte](./wallet.md#type-byte), [CallType](./wallet.md#type-calltype), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [EntityIconURLStringMax500Bytes](./wallet.md#type-entityiconurlstringmax500bytes), [EntityNameStringMax100Bytes](./wallet.md#type-entitynamestringmax100bytes), [HexString](./wallet.md#type-hexstring), [ISOTimestampString](./wallet.md#type-isotimestampstring), [KeyIDStringUnder800Bytes](./wallet.md#type-keyidstringunder800bytes), [LabelStringUnder300Bytes](./wallet.md#type-labelstringunder300bytes), [OutpointString](./wallet.md#type-outpointstring), [OutputTagStringUnder300Bytes](./wallet.md#type-outputtagstringunder300bytes), [PositiveInteger](./wallet.md#type-positiveinteger), [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerMax10](./wallet.md#type-positiveintegermax10), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [ProtocolString5To400Bytes](./wallet.md#type-protocolstring5to400bytes), [PubKeyHex](./wallet.md#type-pubkeyhex), [SatoshiValue](./wallet.md#type-satoshivalue), [SecurityLevel](./wallet.md#type-securitylevel), [TXIDHexString](./wallet.md#type-txidhexstring), [VersionString7To30Bytes](./wallet.md#type-versionstring7to30bytes), [WalletInterface](./wallet.md#interface-walletinterface), [decrypt](./messages.md#variable-decrypt), [encrypt](./messages.md#variable-encrypt)
|
|
1174
|
-
|
|
1175
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1176
|
-
|
|
1177
|
-
---
|
|
1178
|
-
## Functions
|
|
1179
|
-
|
|
1180
|
-
## Types
|
|
1181
|
-
|
|
1182
|
-
### Type: CallType
|
|
1183
|
-
|
|
1184
|
-
```ts
|
|
1185
|
-
export type CallType = keyof typeof calls
|
|
1186
|
-
```
|
|
1187
|
-
|
|
1188
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1189
|
-
|
|
1190
|
-
---
|
|
1191
|
-
## Enums
|
|
1192
|
-
|
|
1193
|
-
## Variables
|
|
1194
|
-
|