@extrimian/agent 0.8.7
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/agent.d.ts +50 -0
- package/dist/agent.js +152 -0
- package/dist/agent.js.map +1 -0
- package/dist/data-share-behaviours/data-share-behavior.d.ts +4 -0
- package/dist/data-share-behaviours/data-share-behavior.js +3 -0
- package/dist/data-share-behaviours/data-share-behavior.js.map +1 -0
- package/dist/data-share-behaviours/identity-data-share-behavior.d.ts +16 -0
- package/dist/data-share-behaviours/identity-data-share-behavior.js +3 -0
- package/dist/data-share-behaviours/identity-data-share-behavior.js.map +1 -0
- package/dist/data-share-behaviours/identity-plaintext-data-share-behavior.d.ts +5 -0
- package/dist/data-share-behaviours/identity-plaintext-data-share-behavior.js +29 -0
- package/dist/data-share-behaviours/identity-plaintext-data-share-behavior.js.map +1 -0
- package/dist/did/did-services.d.ts +14 -0
- package/dist/did/did-services.js +15 -0
- package/dist/did/did-services.js.map +1 -0
- package/dist/exceptions/agent-plugin-not-found.d.ts +2 -0
- package/dist/exceptions/agent-plugin-not-found.js +7 -0
- package/dist/exceptions/agent-plugin-not-found.js.map +1 -0
- package/dist/exceptions/vc-protocol-not-found.d.ts +3 -0
- package/dist/exceptions/vc-protocol-not-found.js +12 -0
- package/dist/exceptions/vc-protocol-not-found.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -0
- package/dist/messaging/messaging.d.ts +37 -0
- package/dist/messaging/messaging.js +96 -0
- package/dist/messaging/messaging.js.map +1 -0
- package/dist/models/agent-identity.d.ts +81 -0
- package/dist/models/agent-identity.js +395 -0
- package/dist/models/agent-identity.js.map +1 -0
- package/dist/models/agent-pbk.d.ts +11 -0
- package/dist/models/agent-pbk.js +12 -0
- package/dist/models/agent-pbk.js.map +1 -0
- package/dist/models/agent-registry.d.ts +90 -0
- package/dist/models/agent-registry.js +142 -0
- package/dist/models/agent-registry.js.map +1 -0
- package/dist/models/agent-resolver.d.ts +19 -0
- package/dist/models/agent-resolver.js +51 -0
- package/dist/models/agent-resolver.js.map +1 -0
- package/dist/models/agent-secure-storage.d.ts +3 -0
- package/dist/models/agent-secure-storage.js +3 -0
- package/dist/models/agent-secure-storage.js.map +1 -0
- package/dist/models/agent-secure-storages/filesystem-agent-secure-storage.d.ts +14 -0
- package/dist/models/agent-secure-storages/filesystem-agent-secure-storage.js +64 -0
- package/dist/models/agent-secure-storages/filesystem-agent-secure-storage.js.map +1 -0
- package/dist/models/agent-storage.d.ts +9 -0
- package/dist/models/agent-storage.js +3 -0
- package/dist/models/agent-storage.js.map +1 -0
- package/dist/models/did.d.ts +19 -0
- package/dist/models/did.js +64 -0
- package/dist/models/did.js.map +1 -0
- package/dist/models/transports/connectable-transport.d.ts +25 -0
- package/dist/models/transports/connectable-transport.js +37 -0
- package/dist/models/transports/connectable-transport.js.map +1 -0
- package/dist/models/transports/dwn-transport.d.ts +30 -0
- package/dist/models/transports/dwn-transport.js +213 -0
- package/dist/models/transports/dwn-transport.js.map +1 -0
- package/dist/models/transports/messaging-transport.d.ts +3 -0
- package/dist/models/transports/messaging-transport.js +3 -0
- package/dist/models/transports/messaging-transport.js.map +1 -0
- package/dist/models/transports/transport.d.ts +29 -0
- package/dist/models/transports/transport.js +8 -0
- package/dist/models/transports/transport.js.map +1 -0
- package/dist/models/transports/websocket-client-transport.d.ts +5 -0
- package/dist/models/transports/websocket-client-transport.js +45 -0
- package/dist/models/transports/websocket-client-transport.js.map +1 -0
- package/dist/models/transports/websocket-server-transport.d.ts +7 -0
- package/dist/models/transports/websocket-server-transport.js +22 -0
- package/dist/models/transports/websocket-server-transport.js.map +1 -0
- package/dist/models/transports/websocket-transport.d.ts +30 -0
- package/dist/models/transports/websocket-transport.js +100 -0
- package/dist/models/transports/websocket-transport.js.map +1 -0
- package/dist/models/vc-storage.d.ts +8 -0
- package/dist/models/vc-storage.js +3 -0
- package/dist/models/vc-storage.js.map +1 -0
- package/dist/plugins/iplugin.d.ts +17 -0
- package/dist/plugins/iplugin.js +3 -0
- package/dist/plugins/iplugin.js.map +1 -0
- package/dist/plugins/plugin-dispatcher.d.ts +6 -0
- package/dist/plugins/plugin-dispatcher.js +31 -0
- package/dist/plugins/plugin-dispatcher.js.map +1 -0
- package/dist/transport/transport.d.ts +41 -0
- package/dist/transport/transport.js +99 -0
- package/dist/transport/transport.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/lite-event.d.ts +25 -0
- package/dist/utils/lite-event.js +33 -0
- package/dist/utils/lite-event.js.map +1 -0
- package/dist/vc/models/credentia-flow.d.ts +4 -0
- package/dist/vc/models/credentia-flow.js +9 -0
- package/dist/vc/models/credentia-flow.js.map +1 -0
- package/dist/vc/models/credential-request.d.ts +3 -0
- package/dist/vc/models/credential-request.js +3 -0
- package/dist/vc/models/credential-request.js.map +1 -0
- package/dist/vc/models/vc-create-key-request.d.ts +4 -0
- package/dist/vc/models/vc-create-key-request.js +3 -0
- package/dist/vc/models/vc-create-key-request.js.map +1 -0
- package/dist/vc/models/waci-message.d.ts +3 -0
- package/dist/vc/models/waci-message.js +8 -0
- package/dist/vc/models/waci-message.js.map +1 -0
- package/dist/vc/protocols/openid-protocol.d.ts +159 -0
- package/dist/vc/protocols/openid-protocol.js +147 -0
- package/dist/vc/protocols/openid-protocol.js.map +1 -0
- package/dist/vc/protocols/vc-protocol.d.ts +98 -0
- package/dist/vc/protocols/vc-protocol.js +37 -0
- package/dist/vc/protocols/vc-protocol.js.map +1 -0
- package/dist/vc/protocols/waci-protocol.d.ts +144 -0
- package/dist/vc/protocols/waci-protocol.js +391 -0
- package/dist/vc/protocols/waci-protocol.js.map +1 -0
- package/dist/vc/vc-setup/vc-setup.d.ts +0 -0
- package/dist/vc/vc-setup/vc-setup.js +1 -0
- package/dist/vc/vc-setup/vc-setup.js.map +1 -0
- package/dist/vc/vc.d.ts +152 -0
- package/dist/vc/vc.js +263 -0
- package/dist/vc/vc.js.map +1 -0
- package/package.json +50 -0
- package/readme.md +392 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VCMessageType = exports.VCProtocol = exports.ActorRole = void 0;
|
|
4
|
+
const lite_event_1 = require("../../utils/lite-event");
|
|
5
|
+
var ActorRole;
|
|
6
|
+
(function (ActorRole) {
|
|
7
|
+
ActorRole[ActorRole["Issuer"] = 0] = "Issuer";
|
|
8
|
+
ActorRole[ActorRole["Holder"] = 1] = "Holder";
|
|
9
|
+
ActorRole[ActorRole["Verifier"] = 2] = "Verifier";
|
|
10
|
+
})(ActorRole = exports.ActorRole || (exports.ActorRole = {}));
|
|
11
|
+
class VCProtocol {
|
|
12
|
+
constructor() {
|
|
13
|
+
// protected readonly onCredentialRequested = new LiteEvent<CredentialRequestedEventArg>;
|
|
14
|
+
// public get credentialRequested() { return this.onCredentialRequested.expose(); }
|
|
15
|
+
this.onVcArrived = new lite_event_1.LiteEvent;
|
|
16
|
+
this.onCredentialIssued = new lite_event_1.LiteEvent;
|
|
17
|
+
this.onVcVerified = new lite_event_1.LiteEvent;
|
|
18
|
+
this.onPresentationVerified = new lite_event_1.LiteEvent;
|
|
19
|
+
this.onAckCompleted = new lite_event_1.LiteEvent;
|
|
20
|
+
this.onProblemReport = new lite_event_1.LiteEvent;
|
|
21
|
+
}
|
|
22
|
+
get vcArrived() { return this.onVcArrived.expose(); }
|
|
23
|
+
get credentialIssued() { return this.onCredentialIssued.expose(); }
|
|
24
|
+
get vcVerified() { return this.onVcVerified.expose(); }
|
|
25
|
+
get presentationVerified() { return this.onPresentationVerified.expose(); }
|
|
26
|
+
get ackCompleted() { return this.onAckCompleted.expose(); }
|
|
27
|
+
get problemReport() { return this.onProblemReport.expose(); }
|
|
28
|
+
initialize(params) {
|
|
29
|
+
this.agent = params.agent;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.VCProtocol = VCProtocol;
|
|
33
|
+
var VCMessageType;
|
|
34
|
+
(function (VCMessageType) {
|
|
35
|
+
VCMessageType[VCMessageType["RequestCredential"] = 0] = "RequestCredential";
|
|
36
|
+
})(VCMessageType = exports.VCMessageType || (exports.VCMessageType = {}));
|
|
37
|
+
//# sourceMappingURL=vc-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vc-protocol.js","sourceRoot":"","sources":["../../../src/vc/protocols/vc-protocol.ts"],"names":[],"mappings":";;;AAKA,uDAAmD;AAGnD,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,6CAAM,CAAA;IACN,6CAAM,CAAA;IACN,iDAAQ,CAAA;AACZ,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB;AAED,MAAsB,UAAU;IA6B5B;QA5BA,yFAAyF;QACzF,mFAAmF;QAEhE,gBAAW,GAAG,IAAI,sBAAiG,CAAC;QAGpH,uBAAkB,GAAG,IAAI,sBAAmD,CAAC;QAG7E,iBAAY,GAAG,IAAI,sBAAyF,CAAC;QAG7G,2BAAsB,GAAG,IAAI,sBAAwI,CAAC;QAGtK,mBAAc,GAAG,IAAI,sBAAiE,CAAC;QAGvF,oBAAe,GAAG,IAAI,sBAA8E,CAAC;IAYxH,CAAC;IA1BD,IAAW,SAAS,KAAK,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAG5D,IAAW,gBAAgB,KAAK,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAG1E,IAAW,UAAU,KAAK,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAG9D,IAAW,oBAAoB,KAAK,OAAO,IAAI,CAAC,sBAAsB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAGlF,IAAW,YAAY,KAAK,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAGlE,IAAW,aAAa,KAAK,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAapE,UAAU,CAAC,MAEV;QACG,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC9B,CAAC;CACJ;AAtCD,gCAsCC;AAED,IAAY,aAEX;AAFD,WAAY,aAAa;IACrB,2EAAiB,CAAA;AACrB,CAAC,EAFW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAExB"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { UnsignedCredential, VerifiableCredential } from "@extrimian/vc-core";
|
|
2
|
+
import { Issuer } from "@extrimian/vc-core/dist/models/issuer";
|
|
3
|
+
import { ClaimFormat, CredentialManifestStyles, DisplayMappingObject, GoalCode, InputDescriptor, OutputDescriptor, PresentationDefinition, PresentationDefinitionFrame, WACIMessage } from "@extrimian/waci";
|
|
4
|
+
import { Agent } from "../../agent";
|
|
5
|
+
import { IStorage } from "../../models/agent-storage";
|
|
6
|
+
import { CredentialFlow } from "../models/credentia-flow";
|
|
7
|
+
import { VCProtocol, VCProtocolResponse } from "./vc-protocol";
|
|
8
|
+
export declare class WACIProtocol extends VCProtocol<WACIMessage> {
|
|
9
|
+
private waciInterpreter;
|
|
10
|
+
private storage;
|
|
11
|
+
issueCredentials: (waciInvitationId: string, holderDID: string) => Promise<WACICredentialOfferResponse>;
|
|
12
|
+
issuerVerificationRules?: (waciInvitationId: string, holdedDID: string) => Promise<IssuerVerificationRuleResult>;
|
|
13
|
+
selectVcToPresent?: (vcs: VerifiableCredential[]) => Promise<VerifiableCredential[]>;
|
|
14
|
+
presentationDefinition?: (invitationId: string) => Promise<{
|
|
15
|
+
inputDescriptors: InputDescriptor[];
|
|
16
|
+
frame?: PresentationDefinitionFrame;
|
|
17
|
+
}>;
|
|
18
|
+
credentialApplication?: (inputs: {
|
|
19
|
+
descriptor: InputDescriptor;
|
|
20
|
+
credentials: VerifiableCredentialWithInfo[];
|
|
21
|
+
}[], message?: WACIMessage, issuer?: (Issuer | CredentialManifestStyles), credentialsToReceive?: VerifiableCredentialWithInfo[]) => Promise<VerifiableCredential[]>;
|
|
22
|
+
constructor(params?: {
|
|
23
|
+
issuer?: {
|
|
24
|
+
issueCredentials?: (waciInvitationId: string, holderDID: string) => Promise<WACICredentialOfferResponse>;
|
|
25
|
+
issuerVerificationRules?: (waciInvitationId: string, holdedDID: string) => Promise<IssuerVerificationRuleResult>;
|
|
26
|
+
};
|
|
27
|
+
holder?: {
|
|
28
|
+
selectVcToPresent?: (vcs: VerifiableCredential[]) => Promise<VerifiableCredential[]>;
|
|
29
|
+
credentialApplication?: (inputs: {
|
|
30
|
+
descriptor: InputDescriptor;
|
|
31
|
+
credentials: VerifiableCredentialWithInfo[];
|
|
32
|
+
}[], message?: WACIMessage, issuer?: (Issuer | CredentialManifestStyles), credentialsToReceive?: {
|
|
33
|
+
data: VerifiableCredential;
|
|
34
|
+
styles: CredentialManifestStyles;
|
|
35
|
+
display: CredentialDisplay;
|
|
36
|
+
}[]) => Promise<VerifiableCredential[]>;
|
|
37
|
+
};
|
|
38
|
+
verifier?: {
|
|
39
|
+
presentationDefinition?: (invitationId: string) => Promise<{
|
|
40
|
+
inputDescriptors: InputDescriptor[];
|
|
41
|
+
frame?: PresentationDefinitionFrame;
|
|
42
|
+
}>;
|
|
43
|
+
};
|
|
44
|
+
storage: IStorage;
|
|
45
|
+
});
|
|
46
|
+
initialize(params: {
|
|
47
|
+
agent: Agent;
|
|
48
|
+
}): void;
|
|
49
|
+
processMessage(message: WACIMessage | string, context?: any): Promise<VCProtocolResponse | void>;
|
|
50
|
+
createOBBInvitation(goalCode: GoalCode): Promise<WACIMessage>;
|
|
51
|
+
createInvitationMessage(flow: CredentialFlow): Promise<WACIMessage>;
|
|
52
|
+
isProtocolMessage(message: any): Promise<boolean>;
|
|
53
|
+
private decodeMessage;
|
|
54
|
+
private validateSchema;
|
|
55
|
+
}
|
|
56
|
+
export declare enum WACIRequest {
|
|
57
|
+
CredentialManifestRequested = 0
|
|
58
|
+
}
|
|
59
|
+
export declare enum InternalStorageEnum {
|
|
60
|
+
CredentialManifests = "CredentialManifests"
|
|
61
|
+
}
|
|
62
|
+
export declare type VerifiableCredentialWithInfo = {
|
|
63
|
+
data: VerifiableCredential;
|
|
64
|
+
styles?: CredentialManifestStyles;
|
|
65
|
+
display?: CredentialDisplay;
|
|
66
|
+
};
|
|
67
|
+
export declare type CredentialManifestData = {
|
|
68
|
+
id: string;
|
|
69
|
+
version: string;
|
|
70
|
+
issuer: IssuerData;
|
|
71
|
+
format?: ClaimFormat;
|
|
72
|
+
output_descriptors: OutputDescriptor[];
|
|
73
|
+
presentation_definition?: PresentationDefinition;
|
|
74
|
+
};
|
|
75
|
+
export declare type IssuerData = {
|
|
76
|
+
id: string;
|
|
77
|
+
name: string;
|
|
78
|
+
styles?: CredentialManifestStyles;
|
|
79
|
+
};
|
|
80
|
+
export declare type CredentialDisplay = {
|
|
81
|
+
title?: DisplayMappingObject;
|
|
82
|
+
subtitle?: DisplayMappingObject;
|
|
83
|
+
description?: DisplayMappingObject;
|
|
84
|
+
properties?: (DisplayMappingObject & {
|
|
85
|
+
label?: string;
|
|
86
|
+
})[];
|
|
87
|
+
};
|
|
88
|
+
export declare class WACIEventArg {
|
|
89
|
+
request: WACIRequest;
|
|
90
|
+
}
|
|
91
|
+
export declare class CredentialRequestedEventArg extends WACIEventArg {
|
|
92
|
+
waciInvitationId: string;
|
|
93
|
+
fromDid: string;
|
|
94
|
+
}
|
|
95
|
+
export declare type IssuerVerificationRuleResult = {
|
|
96
|
+
verified: boolean;
|
|
97
|
+
rejectMsg: string;
|
|
98
|
+
};
|
|
99
|
+
export declare type WACICredentialOfferResponse = WACICredentialOfferWaitForResponse | WACICredentialOfferRejected | WACICredentialOfferSucceded;
|
|
100
|
+
export declare enum WACICredentialOfferResult {
|
|
101
|
+
Succeded = 0,
|
|
102
|
+
Failed = 1,
|
|
103
|
+
AsyncProcess = 2
|
|
104
|
+
}
|
|
105
|
+
export interface WACICredentialOfferWaitForResponse {
|
|
106
|
+
result: WACICredentialOfferResult.AsyncProcess;
|
|
107
|
+
}
|
|
108
|
+
export declare class WACICredentialOfferRejected {
|
|
109
|
+
result: WACICredentialOfferResult.Failed;
|
|
110
|
+
rejectMsg: string;
|
|
111
|
+
}
|
|
112
|
+
export declare class WACICredentialOfferSucceded {
|
|
113
|
+
result: WACICredentialOfferResult.Succeded;
|
|
114
|
+
credentialManifest: {
|
|
115
|
+
options?: {
|
|
116
|
+
challenge: string;
|
|
117
|
+
domain: string;
|
|
118
|
+
};
|
|
119
|
+
issuer: {
|
|
120
|
+
name: string;
|
|
121
|
+
styles: CredentialManifestStyles;
|
|
122
|
+
};
|
|
123
|
+
credentials: {
|
|
124
|
+
credential: UnsignedCredential;
|
|
125
|
+
outputDescriptor: OutputDescriptor;
|
|
126
|
+
}[];
|
|
127
|
+
inputDescriptors?: InputDescriptor[];
|
|
128
|
+
};
|
|
129
|
+
constructor(credentialManifest: {
|
|
130
|
+
options?: {
|
|
131
|
+
challenge: string;
|
|
132
|
+
domain: string;
|
|
133
|
+
};
|
|
134
|
+
issuer: {
|
|
135
|
+
name: string;
|
|
136
|
+
styles: CredentialManifestStyles;
|
|
137
|
+
};
|
|
138
|
+
credentials: {
|
|
139
|
+
credential: UnsignedCredential;
|
|
140
|
+
outputDescriptor: OutputDescriptor;
|
|
141
|
+
}[];
|
|
142
|
+
inputDescriptors?: InputDescriptor[];
|
|
143
|
+
});
|
|
144
|
+
}
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.WACICredentialOfferSucceded = exports.WACICredentialOfferRejected = exports.WACICredentialOfferResult = exports.CredentialRequestedEventArg = exports.WACIEventArg = exports.InternalStorageEnum = exports.WACIRequest = exports.WACIProtocol = void 0;
|
|
13
|
+
const waci_1 = require("@extrimian/waci");
|
|
14
|
+
const base_64_1 = require("base-64");
|
|
15
|
+
const jsonpath = require("jsonpath");
|
|
16
|
+
const jsonschema = require("jsonschema");
|
|
17
|
+
const did_1 = require("../../models/did");
|
|
18
|
+
const utils_1 = require("../../utils");
|
|
19
|
+
const credentia_flow_1 = require("../models/credentia-flow");
|
|
20
|
+
const vc_protocol_1 = require("./vc-protocol");
|
|
21
|
+
class WACIProtocol extends vc_protocol_1.VCProtocol {
|
|
22
|
+
constructor(params) {
|
|
23
|
+
var _a, _b, _c, _d, _e;
|
|
24
|
+
super();
|
|
25
|
+
this.validateSchema = (vc, inputDescriptor) => {
|
|
26
|
+
var _a;
|
|
27
|
+
for (const field of inputDescriptor.constraints.fields) {
|
|
28
|
+
const fieldValues = (_a = field.path) === null || _a === void 0 ? void 0 : _a.map((path) => {
|
|
29
|
+
return jsonpath.value(vc, path);
|
|
30
|
+
});
|
|
31
|
+
for (const value of fieldValues) {
|
|
32
|
+
if (!value)
|
|
33
|
+
return false;
|
|
34
|
+
if (field.filter) {
|
|
35
|
+
const { errors } = jsonschema.validate(value, field.filter);
|
|
36
|
+
if (errors.length) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
};
|
|
44
|
+
this.issueCredentials = (_a = params === null || params === void 0 ? void 0 : params.issuer) === null || _a === void 0 ? void 0 : _a.issueCredentials;
|
|
45
|
+
this.issuerVerificationRules = (_b = params === null || params === void 0 ? void 0 : params.issuer) === null || _b === void 0 ? void 0 : _b.issuerVerificationRules;
|
|
46
|
+
this.selectVcToPresent = (_c = params === null || params === void 0 ? void 0 : params.holder) === null || _c === void 0 ? void 0 : _c.selectVcToPresent;
|
|
47
|
+
this.presentationDefinition = (_d = params === null || params === void 0 ? void 0 : params.verifier) === null || _d === void 0 ? void 0 : _d.presentationDefinition;
|
|
48
|
+
this.credentialApplication = (_e = params === null || params === void 0 ? void 0 : params.holder) === null || _e === void 0 ? void 0 : _e.credentialApplication;
|
|
49
|
+
this.storage = params === null || params === void 0 ? void 0 : params.storage;
|
|
50
|
+
}
|
|
51
|
+
initialize(params) {
|
|
52
|
+
this.agent = params.agent;
|
|
53
|
+
this.waciInterpreter = new waci_1.WACIInterpreter();
|
|
54
|
+
if (this.issueCredentials) {
|
|
55
|
+
this.waciInterpreter.setUpFor({
|
|
56
|
+
getCredentialManifest: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const result = yield this.issueCredentials(p.invitationId, p.holderDid);
|
|
58
|
+
if (result.result == WACICredentialOfferResult.Succeded) {
|
|
59
|
+
return {
|
|
60
|
+
issuerDid: this.agent.identity.getOperationalDID().value,
|
|
61
|
+
issuerName: result.credentialManifest.issuer.name,
|
|
62
|
+
output: result.credentialManifest.credentials.map(x => ({
|
|
63
|
+
outputDescriptor: x.outputDescriptor,
|
|
64
|
+
verifiableCredential: x.credential,
|
|
65
|
+
format: "ldp_vc"
|
|
66
|
+
})),
|
|
67
|
+
issuerStyles: result.credentialManifest.issuer.styles,
|
|
68
|
+
input: result.credentialManifest.inputDescriptors,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
else if (result.result == WACICredentialOfferResult.Failed) {
|
|
72
|
+
throw new Error(result.rejectMsg);
|
|
73
|
+
}
|
|
74
|
+
}),
|
|
75
|
+
signCredential: (credentialToSign) => __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
const vc = yield this.agent.vc.signVC({
|
|
77
|
+
credential: credentialToSign,
|
|
78
|
+
});
|
|
79
|
+
this.onCredentialIssued.trigger({ vc: vc, toDID: did_1.DID.from(vc.credentialSubject.id) });
|
|
80
|
+
return vc;
|
|
81
|
+
}),
|
|
82
|
+
credentialVerificationResult: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const data = yield this.storage.get(p.thid);
|
|
84
|
+
const m = data[0];
|
|
85
|
+
const invitationId = data[0].pthid;
|
|
86
|
+
let issuerVerification = null;
|
|
87
|
+
if (this.issuerVerificationRules) {
|
|
88
|
+
issuerVerification = yield this.issuerVerificationRules(invitationId, m.from);
|
|
89
|
+
}
|
|
90
|
+
const verified = (!issuerVerification && p.result) || (issuerVerification.verified && p.result);
|
|
91
|
+
this.onPresentationVerified.trigger({
|
|
92
|
+
invitationId: invitationId,
|
|
93
|
+
rejectMsg: verified ? null : (p.error || issuerVerification.rejectMsg),
|
|
94
|
+
verified: verified,
|
|
95
|
+
thid: p.thid,
|
|
96
|
+
vcs: p.vcs,
|
|
97
|
+
messageId: p.message.id,
|
|
98
|
+
});
|
|
99
|
+
}),
|
|
100
|
+
verifyCredential: (vc) => __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
return yield this.agent.vc.verifyVC({
|
|
102
|
+
vc: vc
|
|
103
|
+
});
|
|
104
|
+
}),
|
|
105
|
+
handleIssuanceAck: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
return this.onAckCompleted.trigger({
|
|
107
|
+
status: p.status,
|
|
108
|
+
messageId: p.message.id,
|
|
109
|
+
role: vc_protocol_1.ActorRole.Issuer
|
|
110
|
+
});
|
|
111
|
+
}),
|
|
112
|
+
verifyPresentation: (vc) => __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
return yield this.agent.vc.verifyPresentation({
|
|
114
|
+
challenge: vc.challenge,
|
|
115
|
+
presentation: vc.presentation
|
|
116
|
+
});
|
|
117
|
+
}),
|
|
118
|
+
}, waci_1.Actor.Issuer);
|
|
119
|
+
}
|
|
120
|
+
if (this.credentialApplication || this.selectVcToPresent) {
|
|
121
|
+
this.waciInterpreter.setUpFor({
|
|
122
|
+
getHolderDID: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return this.agent.identity.getOperationalDID().value;
|
|
124
|
+
}),
|
|
125
|
+
getCredentialApplication: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
var _a, _b, _c;
|
|
127
|
+
if (this.credentialApplication) {
|
|
128
|
+
// Map the credential descriptors to the actual credentials
|
|
129
|
+
const credential_manifests = yield this.storage.get(InternalStorageEnum.CredentialManifests);
|
|
130
|
+
if (!(credential_manifests === null || credential_manifests === void 0 ? void 0 : credential_manifests.find(x => x.id == p.manifest.data.json.credential_manifest.id))) {
|
|
131
|
+
yield this.storage.add(InternalStorageEnum.CredentialManifests, credential_manifests ? [...credential_manifests, p.manifest.data.json.credential_manifest] : [p.manifest.data.json.credential_manifest]);
|
|
132
|
+
}
|
|
133
|
+
// Map the credential descriptors to the actual credentials
|
|
134
|
+
const credentialsToReceive = p.manifest.data.json.credential_manifest.output_descriptors.map((descriptor) => {
|
|
135
|
+
const credentialDescriptor = p.fulfillment.data.json.credential_fulfillment.descriptor_map.find((map) => map.id === descriptor.id);
|
|
136
|
+
return {
|
|
137
|
+
data: jsonpath.value(p.fulfillment.data.json, credentialDescriptor.path),
|
|
138
|
+
styles: descriptor.styles,
|
|
139
|
+
display: descriptor.display
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
// Get the credentials from the agent
|
|
143
|
+
const credentials = yield this.agent.vc.getVerifiableCredentialsWithInfo();
|
|
144
|
+
// Filter the credentials based on the input descriptors
|
|
145
|
+
const inputs = (((_a = p.manifest.data.json.credential_manifest.presentation_definition) === null || _a === void 0 ? void 0 : _a.input_descriptors) || []).map((descriptor) => {
|
|
146
|
+
return {
|
|
147
|
+
descriptor,
|
|
148
|
+
credentials: (credentials || []).reduce((acc, credential) => {
|
|
149
|
+
if (this.validateSchema(credential.data, descriptor)) {
|
|
150
|
+
acc.push(credential);
|
|
151
|
+
}
|
|
152
|
+
return acc;
|
|
153
|
+
}, [])
|
|
154
|
+
};
|
|
155
|
+
});
|
|
156
|
+
// Apply the credential application
|
|
157
|
+
const credentialsToPresent = yield this.credentialApplication(inputs, p.message, p.manifest.data.json.credential_manifest.issuer, credentialsToReceive);
|
|
158
|
+
return {
|
|
159
|
+
credentialsToPresent: credentialsToPresent,
|
|
160
|
+
presentationProofTypes: ["JsonWebSignature2020", "EcdsaSecp256k1Signature2019"],
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
if (!((_c = (_b = p.manifest.data.json.credential_manifest) === null || _b === void 0 ? void 0 : _b.presentation_definition) === null || _c === void 0 ? void 0 : _c.input_descriptors)) {
|
|
165
|
+
return {
|
|
166
|
+
credentialsToPresent: [],
|
|
167
|
+
presentationProofTypes: ["JsonWebSignature2020", "EcdsaSecp256k1Signature2019"]
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
let credentials = yield this.agent.vc.getVerifiableCredentials();
|
|
171
|
+
credentials = credentials.filter(vc => {
|
|
172
|
+
var _a, _b;
|
|
173
|
+
return (0, waci_1.validateVcByInputDescriptor)(vc, (_b = (_a = p.manifest.data.json.credential_manifest) === null || _a === void 0 ? void 0 : _a.presentation_definition) === null || _b === void 0 ? void 0 : _b.input_descriptors[0]);
|
|
174
|
+
});
|
|
175
|
+
const credentialsToPresent = yield this.selectVcToPresent(credentials);
|
|
176
|
+
return {
|
|
177
|
+
credentialsToPresent: credentialsToPresent,
|
|
178
|
+
presentationProofTypes: ["JsonWebSignature2020", "EcdsaSecp256k1Signature2019"],
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}),
|
|
182
|
+
getCredentialPresentation: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
183
|
+
if (this.credentialApplication) {
|
|
184
|
+
// Get the credentials from the agent
|
|
185
|
+
const credentials = yield this.agent.vc.getVerifiableCredentialsWithInfo();
|
|
186
|
+
// Filter the credentials based on the input descriptors
|
|
187
|
+
const inputs = (p.inputDescriptors || []).map((descriptor) => {
|
|
188
|
+
return {
|
|
189
|
+
descriptor,
|
|
190
|
+
credentials: (credentials || []).reduce((acc, credential) => {
|
|
191
|
+
if (this.validateSchema(credential.data, descriptor)) {
|
|
192
|
+
acc.push(credential);
|
|
193
|
+
}
|
|
194
|
+
return acc;
|
|
195
|
+
}, [])
|
|
196
|
+
};
|
|
197
|
+
});
|
|
198
|
+
// Apply the credential application
|
|
199
|
+
const credentialsToPresent = yield this.credentialApplication(inputs, p.message);
|
|
200
|
+
return {
|
|
201
|
+
credentialsToPresent: credentialsToPresent,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
let credentials = yield this.agent.vc.getVerifiableCredentials();
|
|
206
|
+
credentials = credentials.filter(vc => (0, waci_1.validateVcByInputDescriptor)(vc, p.inputDescriptors[0]));
|
|
207
|
+
const credentialsToPresent = yield this.selectVcToPresent(credentials);
|
|
208
|
+
return {
|
|
209
|
+
credentialsToPresent: credentialsToPresent,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}),
|
|
213
|
+
handleCredentialFulfillment: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
var _d;
|
|
215
|
+
const credentialManifests = yield this.storage.get(InternalStorageEnum.CredentialManifests);
|
|
216
|
+
const credentialManifest = credentialManifests.find(x => x.id === p.credentialFulfillment[0].data.json.credential_fulfillment.manifest_id);
|
|
217
|
+
yield this.storage.add(InternalStorageEnum.CredentialManifests, credentialManifests.filter(x => x.id !== p.credentialFulfillment[0].data.json.credential_fulfillment.manifest_id));
|
|
218
|
+
const credentials = credentialManifest.output_descriptors.map((descriptor) => {
|
|
219
|
+
const credentialDescriptor = p.credentialFulfillment[0].data.json.credential_fulfillment.descriptor_map.find((map) => map.id === descriptor.id);
|
|
220
|
+
return {
|
|
221
|
+
data: jsonpath.value(p.credentialFulfillment[0].data.json, credentialDescriptor.path),
|
|
222
|
+
styles: descriptor.styles,
|
|
223
|
+
display: descriptor.display,
|
|
224
|
+
};
|
|
225
|
+
});
|
|
226
|
+
this.onVcArrived.trigger({ credentials, issuer: credentialManifest.issuer, messageId: (_d = p.message) === null || _d === void 0 ? void 0 : _d.id });
|
|
227
|
+
return true;
|
|
228
|
+
}),
|
|
229
|
+
handlePresentationAck: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
return this.onAckCompleted.trigger({
|
|
231
|
+
status: p.status,
|
|
232
|
+
role: vc_protocol_1.ActorRole.Holder,
|
|
233
|
+
messageId: p.message.id,
|
|
234
|
+
});
|
|
235
|
+
}),
|
|
236
|
+
signPresentation: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
237
|
+
const signature = yield this.agent.vc.signPresentation({
|
|
238
|
+
contentToSign: p.contentToSign,
|
|
239
|
+
challenge: p.challenge,
|
|
240
|
+
domain: p.domain,
|
|
241
|
+
});
|
|
242
|
+
return signature;
|
|
243
|
+
}),
|
|
244
|
+
}, waci_1.Actor.Holder);
|
|
245
|
+
}
|
|
246
|
+
if (this.presentationDefinition) {
|
|
247
|
+
this.waciInterpreter.setUpFor({
|
|
248
|
+
getPresentationDefinition: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
249
|
+
return this.presentationDefinition(p.invitationId);
|
|
250
|
+
}),
|
|
251
|
+
credentialVerificationResult: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
var _e;
|
|
253
|
+
const data = yield this.storage.get(p.thid);
|
|
254
|
+
const invitationId = data[0].pthid;
|
|
255
|
+
this.onPresentationVerified.trigger({
|
|
256
|
+
invitationId: invitationId,
|
|
257
|
+
verified: p.result,
|
|
258
|
+
thid: p.thid,
|
|
259
|
+
vcs: p.vcs,
|
|
260
|
+
messageId: (_e = p.message) === null || _e === void 0 ? void 0 : _e.id
|
|
261
|
+
});
|
|
262
|
+
}),
|
|
263
|
+
verifyCredential: (vc) => __awaiter(this, void 0, void 0, function* () {
|
|
264
|
+
const result = yield this.agent.vc.verifyVC({ vc: vc });
|
|
265
|
+
this.onVcVerified.trigger({
|
|
266
|
+
verified: result.result,
|
|
267
|
+
presentationVerified: true,
|
|
268
|
+
vc: vc,
|
|
269
|
+
});
|
|
270
|
+
return result;
|
|
271
|
+
}),
|
|
272
|
+
verifyPresentation: (p) => __awaiter(this, void 0, void 0, function* () {
|
|
273
|
+
const result = yield this.agent.vc.verifyPresentation({
|
|
274
|
+
presentation: p.presentation,
|
|
275
|
+
challenge: p.challenge
|
|
276
|
+
});
|
|
277
|
+
if (!result) {
|
|
278
|
+
this.onVcVerified.trigger({
|
|
279
|
+
verified: false,
|
|
280
|
+
presentationVerified: false,
|
|
281
|
+
vc: p.presentation,
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
return result;
|
|
285
|
+
}),
|
|
286
|
+
}, waci_1.Actor.Verifier);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
processMessage(message, context) {
|
|
290
|
+
var _a;
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
if (typeof message == "string" && (0, utils_1.getSearchParam)('_oob', message)) {
|
|
293
|
+
const oob = this.decodeMessage((0, utils_1.getSearchParam)('_oob', message));
|
|
294
|
+
if (typeof oob === "string") {
|
|
295
|
+
message = JSON.parse(oob);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
const waciMessage = message;
|
|
299
|
+
let messages = waciMessage.thid ? (yield this.storage.get(waciMessage.thid)) || new Array() : new Array();
|
|
300
|
+
messages.push(waciMessage);
|
|
301
|
+
const response = yield this.waciInterpreter.processMessage(messages);
|
|
302
|
+
if (response && (response === null || response === void 0 ? void 0 : response.message.thid)) {
|
|
303
|
+
messages.push(response.message);
|
|
304
|
+
this.storage.update(response.message.thid, messages);
|
|
305
|
+
}
|
|
306
|
+
if (response) {
|
|
307
|
+
return {
|
|
308
|
+
to: did_1.DID.from(response.target),
|
|
309
|
+
message: (yield this.agent.messaging.packMessage({
|
|
310
|
+
message: response.message,
|
|
311
|
+
to: did_1.DID.from(response.target),
|
|
312
|
+
messageManagerCompatible: context === null || context === void 0 ? void 0 : context.messageManagerCompatible,
|
|
313
|
+
})).packedMessage
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
if (messages[messages.length - 1].type == waci_1.WACIMessageType.ProblemReport) {
|
|
317
|
+
const problemReportMessage = messages[messages.length - 1];
|
|
318
|
+
this.onProblemReport.trigger({
|
|
319
|
+
did: did_1.DID.from(problemReportMessage.from),
|
|
320
|
+
code: (_a = problemReportMessage.body) === null || _a === void 0 ? void 0 : _a.code,
|
|
321
|
+
messageId: waciMessage.id,
|
|
322
|
+
invitationId: problemReportMessage.thid,
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
createOBBInvitation(goalCode) {
|
|
328
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
329
|
+
return yield this.waciInterpreter.createOOBInvitation(this.agent.identity.getOperationalDID().value, goalCode);
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
createInvitationMessage(flow) {
|
|
333
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
+
return yield this.createOBBInvitation(flow == credentia_flow_1.CredentialFlow.Issuance ? waci_1.GoalCode.Issuance : waci_1.GoalCode.Presentation);
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
isProtocolMessage(message) {
|
|
338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
339
|
+
if (typeof message == "string" && (0, utils_1.getSearchParam)('_oob', message)) {
|
|
340
|
+
const oob = this.decodeMessage((0, utils_1.getSearchParam)('_oob', message));
|
|
341
|
+
if (typeof oob === "string") {
|
|
342
|
+
message = JSON.parse(oob);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return this.waciInterpreter.isWACIMessage(message);
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
decodeMessage(message) {
|
|
349
|
+
try {
|
|
350
|
+
return (0, base_64_1.decode)(message);
|
|
351
|
+
}
|
|
352
|
+
catch (error) {
|
|
353
|
+
return null;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
exports.WACIProtocol = WACIProtocol;
|
|
358
|
+
var WACIRequest;
|
|
359
|
+
(function (WACIRequest) {
|
|
360
|
+
WACIRequest[WACIRequest["CredentialManifestRequested"] = 0] = "CredentialManifestRequested";
|
|
361
|
+
})(WACIRequest = exports.WACIRequest || (exports.WACIRequest = {}));
|
|
362
|
+
var InternalStorageEnum;
|
|
363
|
+
(function (InternalStorageEnum) {
|
|
364
|
+
InternalStorageEnum["CredentialManifests"] = "CredentialManifests";
|
|
365
|
+
})(InternalStorageEnum = exports.InternalStorageEnum || (exports.InternalStorageEnum = {}));
|
|
366
|
+
class WACIEventArg {
|
|
367
|
+
}
|
|
368
|
+
exports.WACIEventArg = WACIEventArg;
|
|
369
|
+
class CredentialRequestedEventArg extends WACIEventArg {
|
|
370
|
+
}
|
|
371
|
+
exports.CredentialRequestedEventArg = CredentialRequestedEventArg;
|
|
372
|
+
var WACICredentialOfferResult;
|
|
373
|
+
(function (WACICredentialOfferResult) {
|
|
374
|
+
WACICredentialOfferResult[WACICredentialOfferResult["Succeded"] = 0] = "Succeded";
|
|
375
|
+
WACICredentialOfferResult[WACICredentialOfferResult["Failed"] = 1] = "Failed";
|
|
376
|
+
WACICredentialOfferResult[WACICredentialOfferResult["AsyncProcess"] = 2] = "AsyncProcess";
|
|
377
|
+
})(WACICredentialOfferResult = exports.WACICredentialOfferResult || (exports.WACICredentialOfferResult = {}));
|
|
378
|
+
class WACICredentialOfferRejected {
|
|
379
|
+
constructor() {
|
|
380
|
+
this.result = WACICredentialOfferResult.Failed;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
exports.WACICredentialOfferRejected = WACICredentialOfferRejected;
|
|
384
|
+
class WACICredentialOfferSucceded {
|
|
385
|
+
constructor(credentialManifest) {
|
|
386
|
+
this.result = WACICredentialOfferResult.Succeded;
|
|
387
|
+
this.credentialManifest = credentialManifest;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
exports.WACICredentialOfferSucceded = WACICredentialOfferSucceded;
|
|
391
|
+
//# sourceMappingURL=waci-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waci-protocol.js","sourceRoot":"","sources":["../../../src/vc/protocols/waci-protocol.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,0CAA8T;AAE9T,qCAAiC;AACjC,qCAAqC;AACrC,yCAAyC;AAGzC,0CAAuC;AAEvC,uCAA6C;AAC7C,6DAA0D;AAC1D,+CAA0E;AAE1E,MAAa,YAAa,SAAQ,wBAAuB;IAUrD,YAAY,MAgBX;;QACG,KAAK,EAAE,CAAC;QA8WJ,mBAAc,GAAG,CAAC,EAAwB,EAAE,eAAgC,EAAE,EAAE;;YACpF,KAAK,MAAM,KAAK,IAAI,eAAe,CAAC,WAAW,CAAC,MAAM,EAAE;gBACpD,MAAM,WAAW,GAAG,MAAA,KAAK,CAAC,IAAI,0CAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;oBACzC,OAAO,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC;gBAEH,KAAK,MAAM,KAAK,IAAI,WAAW,EAAE;oBAC7B,IAAI,CAAC,KAAK;wBAAE,OAAO,KAAK,CAAC;oBACzB,IAAI,KAAK,CAAC,MAAM,EAAE;wBACd,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;wBAC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