@verana-labs/vs-agent-sdk 2.0.0-dev.70 → 2.0.0-dev.73
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/build/adminApi/AdminApiError.d.ts +1 -0
- package/build/adminApi/AdminApiError.js +1 -0
- package/build/adminApi/AdminApiError.js.map +1 -1
- package/build/blockchain/VeranaChainService.d.ts +1 -0
- package/build/blockchain/VeranaChainService.js +16 -14
- package/build/blockchain/VeranaChainService.js.map +1 -1
- package/build/blockchain/handlers/defaultHandlers.js +6 -3
- package/build/blockchain/handlers/defaultHandlers.js.map +1 -1
- package/build/blockchain/handlers/selfIssuanceHandlers.js +7 -2
- package/build/blockchain/handlers/selfIssuanceHandlers.js.map +1 -1
- package/build/blockchain/handlers/stateMutations.d.ts +14 -10
- package/build/blockchain/handlers/stateMutations.js +56 -28
- package/build/blockchain/handlers/stateMutations.js.map +1 -1
- package/build/bootstrap/EcsBootstrapService.js +13 -4
- package/build/bootstrap/EcsBootstrapService.js.map +1 -1
- package/build/events/VtFlowEvents.js +3 -0
- package/build/events/VtFlowEvents.js.map +1 -1
- package/build/types.d.ts +0 -13
- package/build/types.js +1 -2
- package/build/types.js.map +1 -1
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/index.js.map +1 -1
- package/build/utils/selfIssuedEcsCredential.d.ts +1 -1
- package/build/utils/selfIssuedEcsCredential.js +13 -6
- package/build/utils/selfIssuedEcsCredential.js.map +1 -1
- package/build/utils/setupSelfTr.js +3 -1
- package/build/utils/setupSelfTr.js.map +1 -1
- package/build/utils/trustCredentialStore.d.ts +12 -1
- package/build/utils/trustCredentialStore.js +37 -10
- package/build/utils/trustCredentialStore.js.map +1 -1
- package/build/utils/typeMetadata.d.ts +19 -0
- package/build/utils/typeMetadata.js +22 -0
- package/build/utils/typeMetadata.js.map +1 -0
- package/build/utils/util.d.ts +9 -0
- package/build/utils/util.js +12 -4
- package/build/utils/util.js.map +1 -1
- package/build/utils/vcdm2.d.ts +1 -1
- package/build/utils/vcdm2.js +3 -5
- package/build/utils/vcdm2.js.map +1 -1
- package/build/vtFlow/VtFlowOrchestrator.d.ts +26 -4
- package/build/vtFlow/VtFlowOrchestrator.js +277 -50
- package/build/vtFlow/VtFlowOrchestrator.js.map +1 -1
- package/package.json +4 -3
package/build/utils/util.d.ts
CHANGED
|
@@ -5,6 +5,15 @@ export declare function fetchJson<T>(url: string, opts: {
|
|
|
5
5
|
timeoutMs?: number;
|
|
6
6
|
allowNotFound: true;
|
|
7
7
|
}): Promise<T | undefined>;
|
|
8
|
+
/** What the JSON Schema of a `CredentialSchema` entry says about the credentials it governs. */
|
|
9
|
+
export interface JsonSchemaShape {
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
/** The `credentialSubject` properties, in schema order. */
|
|
13
|
+
attrNames: string[];
|
|
14
|
+
}
|
|
15
|
+
/** Reads the title, the description and the `credentialSubject` properties of a JSON Schema. */
|
|
16
|
+
export declare function readJsonSchema(jsonSchema: string | object): JsonSchemaShape;
|
|
8
17
|
/** The AnonCreds schema that the JSON Schema of a `CredentialSchema` entry defines. */
|
|
9
18
|
export interface AnonCredsSchemaShape {
|
|
10
19
|
name: string;
|
package/build/utils/util.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SOVRIN_STAGING_NET = exports.BCOVRIN_TEST_GENESIS = void 0;
|
|
4
4
|
exports.fetchJson = fetchJson;
|
|
5
|
+
exports.readJsonSchema = readJsonSchema;
|
|
5
6
|
exports.anonCredsSchemaFromJsonSchema = anonCredsSchemaFromJsonSchema;
|
|
6
7
|
exports.BCOVRIN_TEST_GENESIS = `{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node1","blskey":"4N8aUNHSgjQVgkpm8nhNEfDf6txHznoYREg9kirmJrkivgL4oSEimFF6nsQ6M41QvhM2Z33nves5vfSn9n1UwNFJBYtWVnHYMATn76vLuL3zU88KyeAYcHfsih3He6UHcXDxcaecHVz6jhCYz1P2UZn2bDVruL5wXpehgBfBaLKm3Ba","blskey_pop":"RahHYiCvoNCtPTrVtP7nMC5eTYrsUA8WjXbdhNc8debh1agE9bGiJxWBXYNFbnJXoXhWFMvyqhqhRoq737YQemH5ik9oL7R4NTTCz2LEZhkgLJzB3QRQqJyBNyv7acbdHrAT8nQ9UkLbaVL9NBpnWXBTw4LEMePaSHEw66RzPNdAX1","client_ip":"138.197.138.255","client_port":9702,"node_ip":"138.197.138.255","node_port":9701,"services":["VALIDATOR"]},"dest":"Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv"},"metadata":{"from":"Th7MpTaRZVRYnPiabds81Y"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62"},"ver":"1"}
|
|
7
8
|
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node2","blskey":"37rAPpXVoxzKhz7d9gkUe52XuXryuLXoM6P6LbWDB7LSbG62Lsb33sfG7zqS8TK1MXwuCHj1FKNzVpsnafmqLG1vXN88rt38mNFs9TENzm4QHdBzsvCuoBnPH7rpYYDo9DZNJePaDvRvqJKByCabubJz3XXKbEeshzpz4Ma5QYpJqjk","blskey_pop":"Qr658mWZ2YC8JXGXwMDQTzuZCWF7NK9EwxphGmcBvCh6ybUuLxbG65nsX4JvD4SPNtkJ2w9ug1yLTj6fgmuDg41TgECXjLCij3RMsV8CwewBVgVN67wsA45DFWvqvLtu4rjNnE9JbdFTc1Z4WCPA3Xan44K1HoHAq9EVeaRYs8zoF5","client_ip":"138.197.138.255","client_port":9704,"node_ip":"138.197.138.255","node_port":9703,"services":["VALIDATOR"]},"dest":"8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb"},"metadata":{"from":"EbP4aYNeTHL6q385GuVpRV"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"1ac8aece2a18ced660fef8694b61aac3af08ba875ce3026a160acbc3a3af35fc"},"ver":"1"}
|
|
@@ -161,17 +162,24 @@ async function fetchJson(url, arg) {
|
|
|
161
162
|
clearTimeout(timer);
|
|
162
163
|
}
|
|
163
164
|
}
|
|
165
|
+
/** Reads the title, the description and the `credentialSubject` properties of a JSON Schema. */
|
|
166
|
+
function readJsonSchema(jsonSchema) {
|
|
167
|
+
var _a, _b, _c;
|
|
168
|
+
const parsed = (typeof jsonSchema === 'string' ? JSON.parse(jsonSchema) : jsonSchema);
|
|
169
|
+
return {
|
|
170
|
+
title: parsed === null || parsed === void 0 ? void 0 : parsed.title,
|
|
171
|
+
description: parsed === null || parsed === void 0 ? void 0 : parsed.description,
|
|
172
|
+
attrNames: Object.keys((_c = (_b = (_a = parsed === null || parsed === void 0 ? void 0 : parsed.properties) === null || _a === void 0 ? void 0 : _a.credentialSubject) === null || _b === void 0 ? void 0 : _b.properties) !== null && _c !== void 0 ? _c : {}).map(String),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
164
175
|
/**
|
|
165
176
|
* Maps `title` to the schema name and the `credentialSubject` properties to `attrNames`, per
|
|
166
177
|
* [VSA-PUB-AC-5]. The VTJSC issuer and every accredited issuer must derive the same values.
|
|
167
178
|
*/
|
|
168
179
|
function anonCredsSchemaFromJsonSchema(jsonSchema) {
|
|
169
|
-
|
|
170
|
-
const parsed = (typeof jsonSchema === 'string' ? JSON.parse(jsonSchema) : jsonSchema);
|
|
171
|
-
const name = parsed === null || parsed === void 0 ? void 0 : parsed.title;
|
|
180
|
+
const { title: name, attrNames } = readJsonSchema(jsonSchema);
|
|
172
181
|
if (!name)
|
|
173
182
|
throw new Error('The JSON Schema carries no title');
|
|
174
|
-
const attrNames = Object.keys((_c = (_b = (_a = parsed === null || parsed === void 0 ? void 0 : parsed.properties) === null || _a === void 0 ? void 0 : _a.credentialSubject) === null || _b === void 0 ? void 0 : _b.properties) !== null && _c !== void 0 ? _c : {}).map(String);
|
|
175
183
|
if (attrNames.length === 0)
|
|
176
184
|
throw new Error(`The JSON Schema "${name}" defines no credentialSubject property`);
|
|
177
185
|
return { name, attrNames };
|
package/build/utils/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/utils/util.ts"],"names":[],"mappings":";;;AAkJA,8BAkBC;AAYD,
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/utils/util.ts"],"names":[],"mappings":";;;AAkJA,8BAkBC;AAWD,wCAYC;AAYD,sEAOC;AA9MY,QAAA,oBAAoB,GAAG;;;2wBAGuuB,CAAA;AAE9vB,QAAA,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsIjC,CAAA;AAOM,KAAK,UAAU,SAAS,CAC7B,GAAW,EACX,GAA8D;IAE9D,MAAM,SAAS,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,CAAA;IAChE,MAAM,aAAa,GAAG,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,aAAa,KAAK,IAAI,CAAA;IAC3E,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;IAChE,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACtF,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;QACpF,IAAI,aAAa,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,SAAS,CAAA;QACzD,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,mBAAmB,GAAG,KAAK,GAAG,CAAC,UAAU,EAAE,CAAC,CAAA;QAC9D,CAAC;QACD,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAM,CAAA;IAChC,CAAC;YAAS,CAAC;QACT,IAAI,KAAK;YAAE,YAAY,CAAC,KAAK,CAAC,CAAA;IAChC,CAAC;AACH,CAAC;AAUD,gGAAgG;AAChG,SAAgB,cAAc,CAAC,UAA2B;;IACxD,MAAM,MAAM,GAAG,CAAC,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAInF,CAAA;IAED,OAAO;QACL,KAAK,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK;QACpB,WAAW,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW;QAChC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,MAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,0CAAE,iBAAiB,0CAAE,UAAU,mCAAI,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;KAC5F,CAAA;AACH,CAAC;AAQD;;;GAGG;AACH,SAAgB,6BAA6B,CAAC,UAA2B;IACvE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;IAC7D,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAA;IAC9D,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,yCAAyC,CAAC,CAAA;IAEpF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;AAC5B,CAAC"}
|
package/build/utils/vcdm2.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const CREDENTIALS_UNDEFINED_TERMS_V2_URL = "https://www.w3.org/ns
|
|
|
17
17
|
export declare const CREDENTIALS_V2_CONTEXT: string[];
|
|
18
18
|
/**
|
|
19
19
|
* Builds an unsigned VC Data Model 2.0 credential. Unless told otherwise it uses
|
|
20
|
-
* {@link CREDENTIALS_V2_CONTEXT} and is valid from now
|
|
20
|
+
* {@link CREDENTIALS_V2_CONTEXT} and is valid from now, with no `validUntil`.
|
|
21
21
|
*/
|
|
22
22
|
export declare function createW3cV2Credential(options: W3cV2CredentialOptions): W3cV2Credential;
|
|
23
23
|
/** The plain JSON an RFC 0809 credential offer carries the unsigned credential as. */
|
package/build/utils/vcdm2.js
CHANGED
|
@@ -25,15 +25,13 @@ exports.CREDENTIALS_V2_CONTEXT = [
|
|
|
25
25
|
core_1.CREDENTIALS_CONTEXT_V2_URL,
|
|
26
26
|
exports.CREDENTIALS_UNDEFINED_TERMS_V2_URL,
|
|
27
27
|
];
|
|
28
|
-
const TEN_YEARS_MS = 10 * 365 * 24 * 60 * 60 * 1000;
|
|
29
28
|
/**
|
|
30
29
|
* Builds an unsigned VC Data Model 2.0 credential. Unless told otherwise it uses
|
|
31
|
-
* {@link CREDENTIALS_V2_CONTEXT} and is valid from now
|
|
30
|
+
* {@link CREDENTIALS_V2_CONTEXT} and is valid from now, with no `validUntil`.
|
|
32
31
|
*/
|
|
33
32
|
function createW3cV2Credential(options) {
|
|
34
|
-
var _a, _b
|
|
35
|
-
|
|
36
|
-
return new core_1.W3cV2Credential(Object.assign(Object.assign({}, options), { context: (_a = options.context) !== null && _a !== void 0 ? _a : exports.CREDENTIALS_V2_CONTEXT, validFrom: (_b = options.validFrom) !== null && _b !== void 0 ? _b : new Date(now).toISOString(), validUntil: (_c = options.validUntil) !== null && _c !== void 0 ? _c : new Date(now + TEN_YEARS_MS).toISOString() }));
|
|
33
|
+
var _a, _b;
|
|
34
|
+
return new core_1.W3cV2Credential(Object.assign(Object.assign({}, options), { context: (_a = options.context) !== null && _a !== void 0 ? _a : exports.CREDENTIALS_V2_CONTEXT, validFrom: (_b = options.validFrom) !== null && _b !== void 0 ? _b : new Date().toISOString() }));
|
|
37
35
|
}
|
|
38
36
|
/** The plain JSON an RFC 0809 credential offer carries the unsigned credential as. */
|
|
39
37
|
function toOfferedCredentialJson(credential) {
|
package/build/utils/vcdm2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vcdm2.js","sourceRoot":"","sources":["../../src/utils/vcdm2.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"vcdm2.js","sourceRoot":"","sources":["../../src/utils/vcdm2.ts"],"names":[],"mappings":";;;AAiCA,sDAMC;AAGD,0DAEC;AAGD,8CAIC;AAOD,wEASC;AAnED,yCAMuB;AAEvB;;;;GAIG;AACU,QAAA,kCAAkC,GAAG,sDAAsD,CAAA;AAExG;;;;;;;;GAQG;AACU,QAAA,sBAAsB,GAAa;IAC9C,iCAA0B;IAC1B,0CAAkC;CACnC,CAAA;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,OAA+B;;IACnE,OAAO,IAAI,sBAAe,iCACrB,OAAO,KACV,OAAO,EAAE,MAAA,OAAO,CAAC,OAAO,mCAAI,8BAAsB,EAClD,SAAS,EAAE,MAAA,OAAO,CAAC,SAAS,mCAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,IACxD,CAAA;AACJ,CAAC;AAED,sFAAsF;AACtF,SAAgB,uBAAuB,CAAC,UAA2B;IACjE,OAAO,sBAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;AAC3C,CAAC;AAED,qHAAqH;AACrH,SAAgB,iBAAiB,CAAC,UAAoC;IACpE,MAAM,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC,CAAA;IACtC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;IAC1D,OAAO,IAAI,KAAK,iCAA0B,CAAA;AAC5C,CAAC;AAED;;;;GAIG;AACH,SAAgB,8BAA8B,CAAC,UAAmB;IAChE,IAAI,CAAC,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC/D,MAAM,EAAE,KAAK,EAAE,GAAG,UAAiC,CAAA;IACnD,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAClE,OAAO,CACL,iBAAiB,CAAC,UAAsC,CAAC;QACzD,MAAM,CAAC,MAAM,GAAG,CAAC;QACjB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAmC,aAAnC,KAAK,uBAAL,KAAK,CAAgC,IAAI,MAAK,oBAAoB,CAAC,CAC3F,CAAA;AACH,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { JsonObject } from '@credo-ts/core';
|
|
2
2
|
import type { DidCommDataIntegrityOfferCredentialFormat } from '@credo-ts/didcomm';
|
|
3
|
-
import { VtFlowRecord, type VtFlowEcsIssuanceExemptionContext } from '@verana-labs/credo-ts-didcomm-vt-flow';
|
|
3
|
+
import { VtFlowRecord, type VtFlowCheckParticipantIdContext, type VtFlowEcsIssuanceExemptionContext, type VtFlowIssuance } from '@verana-labs/credo-ts-didcomm-vt-flow';
|
|
4
4
|
import { BaseAgentModules, VsAgent } from '../agent';
|
|
5
|
-
import { Participant } from '../blockchain/types';
|
|
5
|
+
import { Participant, ParticipantDto } from '../blockchain/types';
|
|
6
6
|
export interface VtFlowOrchestratorOptions {
|
|
7
7
|
publicApiBaseUrl?: string;
|
|
8
8
|
agentParticipantId?: number;
|
|
@@ -88,11 +88,27 @@ export declare class VtFlowOrchestrator {
|
|
|
88
88
|
private assertClaimsAndTerm;
|
|
89
89
|
private submissionPath;
|
|
90
90
|
private submitValidation;
|
|
91
|
+
private preflight;
|
|
92
|
+
private anchor;
|
|
91
93
|
resolveValidationTx(recordId: string): Promise<void>;
|
|
92
94
|
private failUnlessValidated;
|
|
95
|
+
/**
|
|
96
|
+
* [VSA-VTI-FLOW-OP-ISSUE]: moves the flow to VALIDATED and fills `validation` from the validated
|
|
97
|
+
* entry. Without the landed transaction, a recorded broadcast keeps its tx, and its submission
|
|
98
|
+
* unless that tx failed.
|
|
99
|
+
*/
|
|
100
|
+
markValidated(recordId: string, entry: ParticipantDto, landed?: {
|
|
101
|
+
hash: string;
|
|
102
|
+
height: number;
|
|
103
|
+
timestamp?: string;
|
|
104
|
+
}): Promise<VtFlowRecord>;
|
|
105
|
+
/** rejectFlow ended the flow with its transaction in flight, and no newer flow of the applicant replaced it ([VSA-ADM-VT-FL-REJECT-2]). */
|
|
106
|
+
isRejectedInFlight(record: VtFlowRecord): Promise<boolean>;
|
|
93
107
|
continueAfterValidated(recordId: string): Promise<VtFlowRecord>;
|
|
94
108
|
/** [VSA-ADM-VT-FL-VALIDATE-8]: at startup, resume every flow left in VALIDATION_TX_SUBMITTED. */
|
|
95
109
|
resumeValidationSubmissions(): Promise<void>;
|
|
110
|
+
/** [VSA-VTI-FLOW-ISSUE-1]: at startup, resume every anchoring left SUBMITTED through the stored issued credential. */
|
|
111
|
+
resumeIssuanceSubmissions(): Promise<void>;
|
|
96
112
|
acceptCredential(input: AcceptCredentialInput): Promise<VtFlowRecord>;
|
|
97
113
|
buildDirectIssuanceOffer(vtFlowRecordId: string): Promise<{
|
|
98
114
|
credentialFormats: {
|
|
@@ -110,15 +126,21 @@ export declare class VtFlowOrchestrator {
|
|
|
110
126
|
/** Per the spec the algorithm comes from the schema, never from the digest value. */
|
|
111
127
|
private digestAlgorithmForSchema;
|
|
112
128
|
private credentialSchema;
|
|
113
|
-
/** Fired after signing and before delivery
|
|
114
|
-
onCredentialIssued(vtFlowRecordId: string, signedCredential: Record<string, unknown>): Promise<
|
|
129
|
+
/** Fired after signing and before delivery. A failed anchoring comes back in `issuance`, and the credential stays undelivered. */
|
|
130
|
+
onCredentialIssued(vtFlowRecordId: string, signedCredential: Record<string, unknown>): Promise<{
|
|
131
|
+
credentialDigest: string;
|
|
132
|
+
issuance: VtFlowIssuance;
|
|
133
|
+
}>;
|
|
115
134
|
verifyOfferedCredential(vtFlowRecordId: string): Promise<void>;
|
|
135
|
+
/** [VSA-VTI-FLOW-FMT-1]. Credo already verified the proof and its assertionMethod key, for data model 2.0 only. */
|
|
136
|
+
private assertFlowCredentialFormat;
|
|
116
137
|
onCredentialRevoked(vtFlowRecordId: string): Promise<void>;
|
|
117
138
|
onCredentialCompleted(vtFlowRecordId: string): Promise<void>;
|
|
118
139
|
private triggerResolver;
|
|
119
140
|
/** The signed credential as the issuer attached it, which is the exact JSON its digest covers. */
|
|
120
141
|
private getReceivedCredentialJson;
|
|
121
142
|
checkEcsIssuanceExemption(context: VtFlowEcsIssuanceExemptionContext): Promise<boolean>;
|
|
143
|
+
checkParticipantId({ record }: VtFlowCheckParticipantIdContext): Promise<boolean | 'validated'>;
|
|
122
144
|
publishCredentialAsLinkedVp(vtFlowRecordId: string): Promise<void>;
|
|
123
145
|
private extractSchemaBaseId;
|
|
124
146
|
rotateRequesterDidToPeer(connectionId: string): Promise<void>;
|