@ixo/action-protocol 0.0.0-stage → 0.4.1
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/package.json +29 -4
- package/src/index.d.ts +466 -0
- package/src/index.js +1190 -0
- package/src/operation-schema.js +170 -0
- package/README.md +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ixo/action-protocol",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "Shared wire contract between IXO Auth Hub, oracle runtimes and channel gateways for reviewed action cards (operations, capabilities, outcomes, receipts).",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/ixoworld/ixo-auth-hub.git",
|
|
9
|
+
"directory": "packages/action-protocol"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/ixoworld/ixo-auth-hub/tree/main/packages/action-protocol",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./src/index.d.ts",
|
|
16
|
+
"default": "./src/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"src"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=20"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"test": "node --test test/*.test.mjs"
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
export type FormField = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
type: "text" | "email" | "tel" | "textarea";
|
|
5
|
+
required: boolean;
|
|
6
|
+
value: string;
|
|
7
|
+
source: "user" | "record" | "suggestion";
|
|
8
|
+
};
|
|
9
|
+
export type ActionOperationV1 =
|
|
10
|
+
| P2Operation
|
|
11
|
+
| {
|
|
12
|
+
kind: "form.submit.v1";
|
|
13
|
+
formId: string;
|
|
14
|
+
destination: string;
|
|
15
|
+
fields: FormField[];
|
|
16
|
+
declaration: string | null;
|
|
17
|
+
}
|
|
18
|
+
| {
|
|
19
|
+
kind: "ixo.bank.send.v1";
|
|
20
|
+
chainId: string;
|
|
21
|
+
network: "ixo mainnet" | "ixo testnet" | "ixo devnet";
|
|
22
|
+
fromAddress: string;
|
|
23
|
+
toAddress: string;
|
|
24
|
+
amountBaseUnits: string;
|
|
25
|
+
denom: "uixo";
|
|
26
|
+
feeBaseUnits: string;
|
|
27
|
+
memo: string;
|
|
28
|
+
}
|
|
29
|
+
| {
|
|
30
|
+
kind: "resource.read.v1";
|
|
31
|
+
resourceId: string;
|
|
32
|
+
ownerDid: string;
|
|
33
|
+
url: string;
|
|
34
|
+
version: string;
|
|
35
|
+
contentDigest: string;
|
|
36
|
+
};
|
|
37
|
+
export type ActionReferenceV1 = {
|
|
38
|
+
version: "ixo.auth-action/1";
|
|
39
|
+
id: string;
|
|
40
|
+
accountId: string;
|
|
41
|
+
bindingId: string;
|
|
42
|
+
bindingRevision: number;
|
|
43
|
+
revision: number;
|
|
44
|
+
digest: string;
|
|
45
|
+
url: string;
|
|
46
|
+
expiresAt: number;
|
|
47
|
+
title: string;
|
|
48
|
+
};
|
|
49
|
+
export type ActionReceiptV1 =
|
|
50
|
+
| P2Receipt
|
|
51
|
+
| {
|
|
52
|
+
kind: "form.submission.v1";
|
|
53
|
+
actionId: string;
|
|
54
|
+
revision: number;
|
|
55
|
+
digest: string;
|
|
56
|
+
valuesDigest: string;
|
|
57
|
+
submittedAt: number;
|
|
58
|
+
submissionId: string;
|
|
59
|
+
}
|
|
60
|
+
| {
|
|
61
|
+
kind: "ixo.bank.send.v1";
|
|
62
|
+
actionId: string;
|
|
63
|
+
revision: number;
|
|
64
|
+
digest: string;
|
|
65
|
+
chainId: string;
|
|
66
|
+
txHash: string;
|
|
67
|
+
height: number | null;
|
|
68
|
+
code: number | null;
|
|
69
|
+
/**
|
|
70
|
+
* Present only when the signed tx was never included in a block
|
|
71
|
+
* (`height` is null): `check_tx_rejected` carries the CheckTx `code`,
|
|
72
|
+
* `expired_not_included` has `code: null` (timeout height passed).
|
|
73
|
+
*/
|
|
74
|
+
reason?: "check_tx_rejected" | "expired_not_included";
|
|
75
|
+
};
|
|
76
|
+
export type ActionOutcomeStatus =
|
|
77
|
+
| "authorized"
|
|
78
|
+
| "declined"
|
|
79
|
+
| "submitted"
|
|
80
|
+
| "succeeded"
|
|
81
|
+
| "failed"
|
|
82
|
+
| "unknown"
|
|
83
|
+
/** v2 only: the action expired before it executed. */
|
|
84
|
+
| "expired"
|
|
85
|
+
/** v2 only: the action was withdrawn (superseded / requires review) before it executed. */
|
|
86
|
+
| "cancelled";
|
|
87
|
+
export type ActionOutcomeV1 = {
|
|
88
|
+
version: "ixo.auth-outcome/1" | "ixo.auth-outcome/2";
|
|
89
|
+
eventId: string;
|
|
90
|
+
reference: ActionReferenceV1;
|
|
91
|
+
ownerDid: string;
|
|
92
|
+
authorizedRevision: number;
|
|
93
|
+
authorizedDigest: string;
|
|
94
|
+
sequence: number;
|
|
95
|
+
status: ActionOutcomeStatus;
|
|
96
|
+
receipt: ActionReceiptV1 | null;
|
|
97
|
+
occurredAt: number;
|
|
98
|
+
};
|
|
99
|
+
export type ActionReviewView = {
|
|
100
|
+
reference: ActionReferenceV1;
|
|
101
|
+
requester: string;
|
|
102
|
+
operation: ActionOperationV1;
|
|
103
|
+
reviewStatus:
|
|
104
|
+
| "prepared"
|
|
105
|
+
| "superseded"
|
|
106
|
+
| "declined"
|
|
107
|
+
| "expired"
|
|
108
|
+
| "revoked"
|
|
109
|
+
| "signing"
|
|
110
|
+
| "authorized";
|
|
111
|
+
operationStatus:
|
|
112
|
+
| "awaiting_authorization"
|
|
113
|
+
| "admitted"
|
|
114
|
+
| "submitted"
|
|
115
|
+
| "succeeded"
|
|
116
|
+
| "failed"
|
|
117
|
+
| "requires_review"
|
|
118
|
+
| "unknown"
|
|
119
|
+
/** Terminal: nothing was executed (for example the owner declined). */
|
|
120
|
+
| "not_started";
|
|
121
|
+
revision: number;
|
|
122
|
+
digest: string;
|
|
123
|
+
canEdit: boolean;
|
|
124
|
+
canApprove: boolean;
|
|
125
|
+
canSign: boolean;
|
|
126
|
+
receipt: ActionReceiptV1 | null;
|
|
127
|
+
signedTxHash: string | null;
|
|
128
|
+
resourceUrl: string | null;
|
|
129
|
+
chatUrl: string;
|
|
130
|
+
service?: {
|
|
131
|
+
continuationUrl: string | null;
|
|
132
|
+
accountLabel: string | null;
|
|
133
|
+
resource: ResourceDescriptor | null;
|
|
134
|
+
} | null;
|
|
135
|
+
};
|
|
136
|
+
export type ActionCapabilitiesV1 = {
|
|
137
|
+
version: "ixo.auth-capabilities/1" | "ixo.auth-capabilities/2";
|
|
138
|
+
accountId: string;
|
|
139
|
+
oracleDid: string;
|
|
140
|
+
network: "ixo mainnet" | "ixo testnet" | "ixo devnet" | null;
|
|
141
|
+
resourceOrigin: string | null;
|
|
142
|
+
operations: ActionOperationV1["kind"][];
|
|
143
|
+
forms: {
|
|
144
|
+
formId: string;
|
|
145
|
+
destination: string;
|
|
146
|
+
fields: Omit<FormField, "value" | "source">[];
|
|
147
|
+
declaration: string | null;
|
|
148
|
+
}[];
|
|
149
|
+
transfer: { maxAmountUixo: string; maxFeeUixo: string } | null;
|
|
150
|
+
};
|
|
151
|
+
export declare function canonicalJson(value: unknown): string;
|
|
152
|
+
export declare function digestOf(value: unknown): Promise<string>;
|
|
153
|
+
export declare function parseOperation(value: unknown): ActionOperationV1;
|
|
154
|
+
export declare function parseReference(value: unknown): ActionReferenceV1;
|
|
155
|
+
export declare function assertHubReferenceUrl(
|
|
156
|
+
value: unknown,
|
|
157
|
+
configuredOrigin: string,
|
|
158
|
+
): ActionReferenceV1;
|
|
159
|
+
export declare function parseReceipt(value: unknown): ActionReceiptV1;
|
|
160
|
+
export declare function parseOutcome(value: unknown): ActionOutcomeV1;
|
|
161
|
+
export declare function parseReviewView(value: unknown): ActionReviewView;
|
|
162
|
+
export declare function parseCapabilities(value: unknown): ActionCapabilitiesV1;
|
|
163
|
+
|
|
164
|
+
export type GmailOperation =
|
|
165
|
+
| {
|
|
166
|
+
kind: "gmail.connect.v1";
|
|
167
|
+
purpose: string;
|
|
168
|
+
connectionId: string | null;
|
|
169
|
+
accountLabel: string | null;
|
|
170
|
+
scopes: string[];
|
|
171
|
+
}
|
|
172
|
+
| { kind: "gmail.disconnect.v1"; connectionId: string; accountLabel: string }
|
|
173
|
+
| {
|
|
174
|
+
kind: "gmail.message.send.v1";
|
|
175
|
+
connectionId: string;
|
|
176
|
+
accountLabel: string;
|
|
177
|
+
to: string;
|
|
178
|
+
subject: string;
|
|
179
|
+
body: string;
|
|
180
|
+
};
|
|
181
|
+
export type P2Operation =
|
|
182
|
+
| GmailOperation
|
|
183
|
+
| {
|
|
184
|
+
kind: "statement.sign.v1";
|
|
185
|
+
statement: string;
|
|
186
|
+
purpose: string;
|
|
187
|
+
audienceId: string;
|
|
188
|
+
}
|
|
189
|
+
| {
|
|
190
|
+
kind: "calendar.connect.v1";
|
|
191
|
+
purpose: string;
|
|
192
|
+
connectionId: string | null;
|
|
193
|
+
accountLabel: string | null;
|
|
194
|
+
scopes: string[];
|
|
195
|
+
}
|
|
196
|
+
| {
|
|
197
|
+
kind: "calendar.disconnect.v1";
|
|
198
|
+
connectionId: string;
|
|
199
|
+
accountLabel: string;
|
|
200
|
+
}
|
|
201
|
+
| {
|
|
202
|
+
kind: "calendar.event.create.v1";
|
|
203
|
+
connectionId: string;
|
|
204
|
+
accountLabel: string;
|
|
205
|
+
calendarId: "primary";
|
|
206
|
+
title: string;
|
|
207
|
+
description: string;
|
|
208
|
+
startsAt: string;
|
|
209
|
+
endsAt: string;
|
|
210
|
+
timeZone: string;
|
|
211
|
+
}
|
|
212
|
+
| {
|
|
213
|
+
kind: "vfs.access.request.v1";
|
|
214
|
+
targetId: string;
|
|
215
|
+
title: string;
|
|
216
|
+
ability: "read";
|
|
217
|
+
purpose: string;
|
|
218
|
+
}
|
|
219
|
+
| { kind: "vfs.text.save.v1"; filename: string; text: string };
|
|
220
|
+
export type ActionOperation = ActionOperationV1;
|
|
221
|
+
export type ActionReceipt = ActionReceiptV1;
|
|
222
|
+
export type ServiceName = "calendar" | "gmail" | "vfs";
|
|
223
|
+
export type ReceiptTuple = {
|
|
224
|
+
actionId: string;
|
|
225
|
+
revision: number;
|
|
226
|
+
digest: string;
|
|
227
|
+
};
|
|
228
|
+
export type GmailReceipt = ReceiptTuple &
|
|
229
|
+
(
|
|
230
|
+
| {
|
|
231
|
+
kind: "gmail.connected.v1";
|
|
232
|
+
connectionId: string;
|
|
233
|
+
scopesDigest: string;
|
|
234
|
+
verifiedAt: number;
|
|
235
|
+
}
|
|
236
|
+
| {
|
|
237
|
+
kind: "gmail.disconnected.v1";
|
|
238
|
+
connectionId: string;
|
|
239
|
+
localRevokedAt: number;
|
|
240
|
+
providerDisconnected: boolean | null;
|
|
241
|
+
verifiedAt: number;
|
|
242
|
+
}
|
|
243
|
+
| {
|
|
244
|
+
kind: "gmail.message.accepted.v1";
|
|
245
|
+
connectionId: string;
|
|
246
|
+
messageId: string;
|
|
247
|
+
contentDigest: string;
|
|
248
|
+
mimeDigest: string;
|
|
249
|
+
acceptedAt: number;
|
|
250
|
+
}
|
|
251
|
+
);
|
|
252
|
+
export type P2Receipt =
|
|
253
|
+
| GmailReceipt
|
|
254
|
+
| (ReceiptTuple &
|
|
255
|
+
(
|
|
256
|
+
| {
|
|
257
|
+
kind: "statement.signed.v1";
|
|
258
|
+
statementDigest: string;
|
|
259
|
+
proofDigest: string;
|
|
260
|
+
signerDid: string;
|
|
261
|
+
signedAt: number;
|
|
262
|
+
}
|
|
263
|
+
| {
|
|
264
|
+
kind: "calendar.connected.v1";
|
|
265
|
+
connectionId: string;
|
|
266
|
+
scopesDigest: string;
|
|
267
|
+
verifiedAt: number;
|
|
268
|
+
}
|
|
269
|
+
| {
|
|
270
|
+
kind: "calendar.disconnected.v1";
|
|
271
|
+
connectionId: string;
|
|
272
|
+
localRevokedAt: number;
|
|
273
|
+
providerDisconnected: boolean | null;
|
|
274
|
+
verifiedAt: number;
|
|
275
|
+
}
|
|
276
|
+
| {
|
|
277
|
+
kind: "calendar.event.created.v1";
|
|
278
|
+
connectionId: string;
|
|
279
|
+
eventId: string;
|
|
280
|
+
eventDigest: string;
|
|
281
|
+
verifiedAt: number;
|
|
282
|
+
}
|
|
283
|
+
| {
|
|
284
|
+
kind: "vfs.access.requested.v1";
|
|
285
|
+
requestId: string;
|
|
286
|
+
targetId: string;
|
|
287
|
+
state: "pending_owner";
|
|
288
|
+
requestedAt: number;
|
|
289
|
+
}
|
|
290
|
+
| {
|
|
291
|
+
kind: "vfs.text.saved.v1";
|
|
292
|
+
fileId: string;
|
|
293
|
+
cid: string;
|
|
294
|
+
version: number;
|
|
295
|
+
contentDigest: string;
|
|
296
|
+
private: true;
|
|
297
|
+
verifiedAt: number;
|
|
298
|
+
}
|
|
299
|
+
| {
|
|
300
|
+
kind: "service.failure.v1";
|
|
301
|
+
service: ServiceName;
|
|
302
|
+
code:
|
|
303
|
+
| "permission_denied"
|
|
304
|
+
| "changed"
|
|
305
|
+
| "rejected"
|
|
306
|
+
| "conflict"
|
|
307
|
+
| "expired"
|
|
308
|
+
| "unavailable";
|
|
309
|
+
failedAt: number;
|
|
310
|
+
}
|
|
311
|
+
));
|
|
312
|
+
export type ResourceDescriptor = {
|
|
313
|
+
id: string;
|
|
314
|
+
title: string;
|
|
315
|
+
ownerDid: string;
|
|
316
|
+
url: string;
|
|
317
|
+
version: string;
|
|
318
|
+
contentDigest: string;
|
|
319
|
+
cid: string;
|
|
320
|
+
fileId: string;
|
|
321
|
+
};
|
|
322
|
+
export type ServiceAuthorizationV1 = ReceiptTuple & {
|
|
323
|
+
version: "ixo.auth-authorization/1";
|
|
324
|
+
mode: "prepare" | "execute";
|
|
325
|
+
service: ServiceName;
|
|
326
|
+
hubOrigin: string;
|
|
327
|
+
accountId: string;
|
|
328
|
+
ownerDid: string;
|
|
329
|
+
oracleDid: string;
|
|
330
|
+
bindingId: string;
|
|
331
|
+
bindingRevision: number;
|
|
332
|
+
consentVersion: string;
|
|
333
|
+
policyVersion: number;
|
|
334
|
+
network: "mainnet" | "testnet" | "devnet";
|
|
335
|
+
operation: ActionOperationV1;
|
|
336
|
+
issuedAt: number;
|
|
337
|
+
expiresAt: number;
|
|
338
|
+
nonce: string;
|
|
339
|
+
};
|
|
340
|
+
export type ServiceCommand = {
|
|
341
|
+
authorization: ServiceAuthorizationV1;
|
|
342
|
+
ownerInvocation: string;
|
|
343
|
+
subscriptionDelegation: string | null;
|
|
344
|
+
};
|
|
345
|
+
export type ServiceCommandV1 = ServiceCommand;
|
|
346
|
+
export type ServicePreparationV1 = ReceiptTuple & {
|
|
347
|
+
version: "ixo.auth-preparation/1";
|
|
348
|
+
accountId: string;
|
|
349
|
+
status: "pending" | "ready" | "unknown";
|
|
350
|
+
operation: Extract<
|
|
351
|
+
ActionOperationV1,
|
|
352
|
+
{ kind: "calendar.connect.v1" | "gmail.connect.v1" }
|
|
353
|
+
>;
|
|
354
|
+
continuationUrl: string | null;
|
|
355
|
+
};
|
|
356
|
+
export type ServiceResultV1 = ReceiptTuple & {
|
|
357
|
+
version: "ixo.auth-service-result/1";
|
|
358
|
+
accountId: string;
|
|
359
|
+
authorizationDigest: string;
|
|
360
|
+
sequence: number;
|
|
361
|
+
status: "pending" | "succeeded" | "failed" | "unknown";
|
|
362
|
+
receipt: ActionReceiptV1 | null;
|
|
363
|
+
continuationUrl: string | null;
|
|
364
|
+
accountLabel: string | null;
|
|
365
|
+
resource: ResourceDescriptor | null;
|
|
366
|
+
checkedAt: number;
|
|
367
|
+
};
|
|
368
|
+
export type HubActionOptionsV1 = {
|
|
369
|
+
version: "ixo.auth-options/1";
|
|
370
|
+
accountId: string;
|
|
371
|
+
ownerDid: string;
|
|
372
|
+
bindingId: string;
|
|
373
|
+
bindingRevision: number;
|
|
374
|
+
connections: { id: string; label: string; scopes: string[] }[];
|
|
375
|
+
targets: { id: string; title: string }[];
|
|
376
|
+
resources: ResourceDescriptor[];
|
|
377
|
+
};
|
|
378
|
+
export type HubActionOptionsV2 = Omit<
|
|
379
|
+
HubActionOptionsV1,
|
|
380
|
+
"version" | "connections"
|
|
381
|
+
> & {
|
|
382
|
+
version: "ixo.auth-options/2";
|
|
383
|
+
connections: {
|
|
384
|
+
service: "calendar" | "gmail";
|
|
385
|
+
id: string;
|
|
386
|
+
label: string;
|
|
387
|
+
scopes: string[];
|
|
388
|
+
}[];
|
|
389
|
+
};
|
|
390
|
+
export type HubActionOptions = HubActionOptionsV1 | HubActionOptionsV2;
|
|
391
|
+
export type StatementProofBody = ReceiptTuple & {
|
|
392
|
+
version: "ixo.statement-proof/1";
|
|
393
|
+
accountId: string;
|
|
394
|
+
ownerDid: string;
|
|
395
|
+
network: "mainnet" | "testnet" | "devnet";
|
|
396
|
+
audience: string;
|
|
397
|
+
purpose: string;
|
|
398
|
+
statementDigest: string;
|
|
399
|
+
issuedAt: number;
|
|
400
|
+
nonce: string;
|
|
401
|
+
};
|
|
402
|
+
export type StatementProof = {
|
|
403
|
+
body: StatementProofBody;
|
|
404
|
+
publicKey: string;
|
|
405
|
+
signature: string;
|
|
406
|
+
statement: string;
|
|
407
|
+
};
|
|
408
|
+
export declare const operationKinds: readonly [
|
|
409
|
+
ActionOperationV1["kind"],
|
|
410
|
+
...ActionOperationV1["kind"][],
|
|
411
|
+
];
|
|
412
|
+
export declare const operationJsonSchema: {
|
|
413
|
+
readonly $schema: string;
|
|
414
|
+
readonly oneOf: Record<string, unknown>[];
|
|
415
|
+
};
|
|
416
|
+
export declare function privateTextPath(
|
|
417
|
+
actionId: string,
|
|
418
|
+
filename: string,
|
|
419
|
+
): string;
|
|
420
|
+
export declare function serviceForOperation(
|
|
421
|
+
operation: ActionOperationV1 | ActionOperationV1["kind"],
|
|
422
|
+
): ServiceName | null;
|
|
423
|
+
export declare function assertReceiptForOperation(
|
|
424
|
+
operation: ActionOperationV1,
|
|
425
|
+
receipt: ActionReceiptV1,
|
|
426
|
+
status?: string,
|
|
427
|
+
): ActionReceiptV1;
|
|
428
|
+
export declare function parseResourceDescriptor(
|
|
429
|
+
input: unknown,
|
|
430
|
+
): ResourceDescriptor;
|
|
431
|
+
export declare function parseServiceAuthorization(
|
|
432
|
+
input: unknown,
|
|
433
|
+
): ServiceAuthorizationV1;
|
|
434
|
+
export declare function parseServiceCommand(input: unknown): ServiceCommand;
|
|
435
|
+
export declare function parseServicePreparation(
|
|
436
|
+
input: unknown,
|
|
437
|
+
): ServicePreparationV1;
|
|
438
|
+
export declare function parseServiceResult(input: unknown): ServiceResultV1;
|
|
439
|
+
export declare function parseActionOptions(input: unknown): HubActionOptions;
|
|
440
|
+
export declare const parseHubActionOptions: typeof parseActionOptions;
|
|
441
|
+
export declare function parseStatementProofBody(
|
|
442
|
+
input: unknown,
|
|
443
|
+
): StatementProofBody;
|
|
444
|
+
export declare function parseStatementProof(input: unknown): StatementProof;
|
|
445
|
+
export declare const OUTCOME_VERSION_V1: "ixo.auth-outcome/1";
|
|
446
|
+
export declare const OUTCOME_VERSION_V2: "ixo.auth-outcome/2";
|
|
447
|
+
export declare const CAPABILITIES_VERSION_V1: "ixo.auth-capabilities/1";
|
|
448
|
+
export declare const CAPABILITIES_VERSION_V2: "ixo.auth-capabilities/2";
|
|
449
|
+
export declare const OUTCOME_SEQUENCE: Readonly<Record<ActionOutcomeStatus, number>>;
|
|
450
|
+
export declare const BANK_NOT_INCLUDED_REASONS: readonly [
|
|
451
|
+
"check_tx_rejected",
|
|
452
|
+
"expired_not_included",
|
|
453
|
+
];
|
|
454
|
+
/** The outcome in the caller's envelope version, or null when v1 cannot express it. */
|
|
455
|
+
export declare function outcomeForVersion(
|
|
456
|
+
value: unknown,
|
|
457
|
+
version: "ixo.auth-outcome/1" | "ixo.auth-outcome/2",
|
|
458
|
+
): ActionOutcomeV1 | null;
|
|
459
|
+
/** Operation kinds a v1 capabilities envelope may list (the 0.1.0 set). */
|
|
460
|
+
export declare const V1_OPERATION_KINDS: readonly [
|
|
461
|
+
"form.submit.v1",
|
|
462
|
+
"ixo.bank.send.v1",
|
|
463
|
+
"resource.read.v1",
|
|
464
|
+
];
|
|
465
|
+
export declare const NETWORKS: readonly ["ixo mainnet", "ixo testnet", "ixo devnet"];
|
|
466
|
+
export declare const SERVICE_NETWORKS: readonly ["mainnet", "testnet", "devnet"];
|