@credo-ts/anoncreds 0.6.0-pr-2143-20250106173054 → 0.6.0-pr-2195-20250217183709
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/AnonCredsApi.js +7 -4
- package/build/AnonCredsApi.js.map +1 -1
- package/build/AnonCredsModuleConfig.js +2 -4
- package/build/AnonCredsModuleConfig.js.map +1 -1
- package/build/anoncreds-rs/AnonCredsDataIntegrityService.js +13 -14
- package/build/anoncreds-rs/AnonCredsDataIntegrityService.js.map +1 -1
- package/build/anoncreds-rs/AnonCredsRsHolderService.js +22 -28
- package/build/anoncreds-rs/AnonCredsRsHolderService.js.map +1 -1
- package/build/anoncreds-rs/AnonCredsRsIssuerService.js +23 -17
- package/build/anoncreds-rs/AnonCredsRsIssuerService.js.map +1 -1
- package/build/anoncreds-rs/AnonCredsRsVerifierService.js +6 -7
- package/build/anoncreds-rs/AnonCredsRsVerifierService.js.map +1 -1
- package/build/anoncreds-rs/utils.js +3 -3
- package/build/anoncreds-rs/utils.js.map +1 -1
- package/build/formats/AnonCredsCredentialFormat.d.ts +1 -1
- package/build/formats/AnonCredsCredentialFormatService.d.ts +3 -2
- package/build/formats/AnonCredsCredentialFormatService.js +26 -39
- package/build/formats/AnonCredsCredentialFormatService.js.map +1 -1
- package/build/formats/AnonCredsProofFormat.d.ts +1 -1
- package/build/formats/AnonCredsProofFormatService.d.ts +2 -1
- package/build/formats/AnonCredsProofFormatService.js +26 -27
- package/build/formats/AnonCredsProofFormatService.js.map +1 -1
- package/build/formats/DataIntegrityCredentialFormatService.d.ts +3 -2
- package/build/formats/DataIntegrityCredentialFormatService.js +82 -83
- package/build/formats/DataIntegrityCredentialFormatService.js.map +1 -1
- package/build/formats/LegacyIndyCredentialFormat.d.ts +1 -1
- package/build/formats/LegacyIndyCredentialFormatService.d.ts +3 -2
- package/build/formats/LegacyIndyCredentialFormatService.js +19 -32
- package/build/formats/LegacyIndyCredentialFormatService.js.map +1 -1
- package/build/formats/LegacyIndyProofFormat.d.ts +1 -1
- package/build/formats/LegacyIndyProofFormatService.d.ts +2 -1
- package/build/formats/LegacyIndyProofFormatService.js +28 -30
- package/build/formats/LegacyIndyProofFormatService.js.map +1 -1
- package/build/models/AnonCredsProofRequest.js +2 -3
- package/build/models/AnonCredsProofRequest.js.map +1 -1
- package/build/models/AnonCredsRequestedAttribute.js +1 -2
- package/build/models/AnonCredsRequestedAttribute.js.map +1 -1
- package/build/models/AnonCredsRequestedPredicate.js +1 -2
- package/build/models/AnonCredsRequestedPredicate.js.map +1 -1
- package/build/models/AnonCredsRestriction.js +2 -3
- package/build/models/AnonCredsRestriction.js.map +1 -1
- package/build/protocols/credentials/v1/V1CredentialProtocol.d.ts +4 -3
- package/build/protocols/credentials/v1/V1CredentialProtocol.js +159 -155
- package/build/protocols/credentials/v1/V1CredentialProtocol.js.map +1 -1
- package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.d.ts +2 -2
- package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js +2 -2
- package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js.map +1 -1
- package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.d.ts +1 -1
- package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.d.ts +1 -1
- package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.d.ts +2 -2
- package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js +2 -1
- package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js.map +1 -1
- package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.d.ts +2 -2
- package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js +2 -2
- package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js.map +1 -1
- package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.d.ts +2 -2
- package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js +2 -2
- package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js.map +1 -1
- package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.d.ts +2 -2
- package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js +2 -1
- package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js.map +1 -1
- package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.d.ts +3 -3
- package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js +4 -4
- package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js.map +1 -1
- package/build/protocols/credentials/v1/messages/V1CredentialPreview.d.ts +3 -3
- package/build/protocols/credentials/v1/messages/V1CredentialPreview.js +8 -7
- package/build/protocols/credentials/v1/messages/V1CredentialPreview.js.map +1 -1
- package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.d.ts +3 -3
- package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js +4 -4
- package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js.map +1 -1
- package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.d.ts +2 -2
- package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js +8 -10
- package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js.map +1 -1
- package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.d.ts +2 -2
- package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js +7 -8
- package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js.map +1 -1
- package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.d.ts +3 -3
- package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js +5 -6
- package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js.map +1 -1
- package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.d.ts +2 -2
- package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js +7 -8
- package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js.map +1 -1
- package/build/protocols/proofs/v1/V1ProofProtocol.d.ts +4 -3
- package/build/protocols/proofs/v1/V1ProofProtocol.js +147 -156
- package/build/protocols/proofs/v1/V1ProofProtocol.js.map +1 -1
- package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.d.ts +2 -2
- package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js +2 -2
- package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js.map +1 -1
- package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.d.ts +1 -1
- package/build/protocols/proofs/v1/handlers/V1PresentationHandler.d.ts +2 -2
- package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js +2 -1
- package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js.map +1 -1
- package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.d.ts +1 -1
- package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.d.ts +2 -2
- package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js +2 -2
- package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js.map +1 -1
- package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.d.ts +2 -2
- package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js +2 -2
- package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js.map +1 -1
- package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.d.ts +3 -3
- package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js +4 -4
- package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js.map +1 -1
- package/build/protocols/proofs/v1/messages/V1PresentationMessage.d.ts +2 -2
- package/build/protocols/proofs/v1/messages/V1PresentationMessage.js +9 -11
- package/build/protocols/proofs/v1/messages/V1PresentationMessage.js.map +1 -1
- package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.d.ts +3 -3
- package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js +4 -4
- package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js.map +1 -1
- package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.d.ts +2 -2
- package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js +5 -6
- package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js.map +1 -1
- package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.d.ts +2 -2
- package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js +8 -10
- package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js.map +1 -1
- package/build/protocols/proofs/v1/models/V1PresentationPreview.d.ts +1 -1
- package/build/protocols/proofs/v1/models/V1PresentationPreview.js +6 -6
- package/build/protocols/proofs/v1/models/V1PresentationPreview.js.map +1 -1
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js +6 -4
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js.map +1 -1
- package/build/repository/AnonCredsCredentialDefinitionRecord.js +11 -4
- package/build/repository/AnonCredsCredentialDefinitionRecord.js.map +1 -1
- package/build/repository/AnonCredsCredentialRecord.js +12 -4
- package/build/repository/AnonCredsCredentialRecord.js.map +1 -1
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.js +6 -4
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.js.map +1 -1
- package/build/repository/AnonCredsLinkSecretRecord.js +5 -3
- package/build/repository/AnonCredsLinkSecretRecord.js.map +1 -1
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js +8 -4
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js.map +1 -1
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js +7 -4
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js.map +1 -1
- package/build/repository/AnonCredsSchemaRecord.js +11 -4
- package/build/repository/AnonCredsSchemaRecord.js.map +1 -1
- package/build/services/tails/BasicTailsFileService.js +2 -3
- package/build/services/tails/BasicTailsFileService.js.map +1 -1
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.d.ts +2 -1
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.js +2 -2
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.js.map +1 -1
- package/build/updates/0.3.1-0.4/linkSecret.js +2 -3
- package/build/updates/0.3.1-0.4/linkSecret.js.map +1 -1
- package/build/updates/0.4-0.5/anonCredsCredentialRecord.js +4 -4
- package/build/updates/0.4-0.5/anonCredsCredentialRecord.js.map +1 -1
- package/build/utils/bytesToBigint.d.ts +1 -0
- package/build/utils/bytesToBigint.js +14 -0
- package/build/utils/bytesToBigint.js.map +1 -0
- package/build/utils/composeAutoAccept.d.ts +1 -1
- package/build/utils/composeAutoAccept.js +3 -5
- package/build/utils/composeAutoAccept.js.map +1 -1
- package/build/utils/createRequestFromPreview.js +3 -4
- package/build/utils/createRequestFromPreview.js.map +1 -1
- package/build/utils/credential.d.ts +1 -1
- package/build/utils/credential.js +10 -10
- package/build/utils/credential.js.map +1 -1
- package/build/utils/credentialPreviewAttributes.d.ts +1 -1
- package/build/utils/credentialPreviewAttributes.js +1 -1
- package/build/utils/credentialPreviewAttributes.js.map +1 -1
- package/build/utils/getCredentialsForAnonCredsRequest.js +2 -3
- package/build/utils/getCredentialsForAnonCredsRequest.js.map +1 -1
- package/build/utils/getRevocationRegistries.js +13 -5
- package/build/utils/getRevocationRegistries.js.map +1 -1
- package/build/utils/indyIdentifiers.js +23 -12
- package/build/utils/indyIdentifiers.js.map +1 -1
- package/build/utils/proofRequest.js +7 -10
- package/build/utils/proofRequest.js.map +1 -1
- package/build/utils/w3cAnonCredsUtils.js +29 -21
- package/build/utils/w3cAnonCredsUtils.js.map +1 -1
- package/package.json +4 -5
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AnonCredsProofFormatService = void 0;
|
|
4
4
|
const core_1 = require("@credo-ts/core");
|
|
5
|
+
const didcomm_1 = require("@credo-ts/didcomm");
|
|
5
6
|
const AnonCredsProofRequest_1 = require("../models/AnonCredsProofRequest");
|
|
6
7
|
const services_1 = require("../services");
|
|
7
8
|
const utils_1 = require("../utils");
|
|
@@ -15,8 +16,7 @@ class AnonCredsProofFormatService {
|
|
|
15
16
|
this.formatKey = 'anoncreds';
|
|
16
17
|
}
|
|
17
18
|
async createProposal(agentContext, { attachmentId, proofFormats }) {
|
|
18
|
-
|
|
19
|
-
const format = new core_1.ProofFormatSpec({
|
|
19
|
+
const format = new didcomm_1.ProofFormatSpec({
|
|
20
20
|
format: ANONCREDS_PRESENTATION_PROPOSAL,
|
|
21
21
|
attachmentId,
|
|
22
22
|
});
|
|
@@ -25,10 +25,10 @@ class AnonCredsProofFormatService {
|
|
|
25
25
|
throw Error('Missing anoncreds format to create proposal attachment format');
|
|
26
26
|
}
|
|
27
27
|
const proofRequest = (0, utils_1.createRequestFromPreview)({
|
|
28
|
-
attributes:
|
|
29
|
-
predicates:
|
|
30
|
-
name:
|
|
31
|
-
version:
|
|
28
|
+
attributes: anoncredsFormat.attributes ?? [],
|
|
29
|
+
predicates: anoncredsFormat.predicates ?? [],
|
|
30
|
+
name: anoncredsFormat.name ?? 'Proof request',
|
|
31
|
+
version: anoncredsFormat.version ?? '1.0',
|
|
32
32
|
nonce: await agentContext.wallet.generateNonce(),
|
|
33
33
|
nonRevokedInterval: anoncredsFormat.nonRevokedInterval,
|
|
34
34
|
});
|
|
@@ -43,20 +43,21 @@ class AnonCredsProofFormatService {
|
|
|
43
43
|
(0, utils_1.assertNoDuplicateGroupsNamesInProofRequest)(proposalJson);
|
|
44
44
|
}
|
|
45
45
|
async acceptProposal(agentContext, { proposalAttachment, attachmentId }) {
|
|
46
|
-
const format = new
|
|
46
|
+
const format = new didcomm_1.ProofFormatSpec({
|
|
47
47
|
format: ANONCREDS_PRESENTATION_REQUEST,
|
|
48
48
|
attachmentId,
|
|
49
49
|
});
|
|
50
50
|
const proposalJson = proposalAttachment.getDataAsJson();
|
|
51
|
-
const request =
|
|
51
|
+
const request = {
|
|
52
|
+
...proposalJson,
|
|
52
53
|
// We never want to reuse the nonce from the proposal, as this will allow replay attacks
|
|
53
|
-
nonce: await agentContext.wallet.generateNonce()
|
|
54
|
+
nonce: await agentContext.wallet.generateNonce(),
|
|
55
|
+
};
|
|
54
56
|
const attachment = this.getFormatData(request, format.attachmentId);
|
|
55
57
|
return { attachment, format };
|
|
56
58
|
}
|
|
57
59
|
async createRequest(agentContext, { attachmentId, proofFormats }) {
|
|
58
|
-
|
|
59
|
-
const format = new core_1.ProofFormatSpec({
|
|
60
|
+
const format = new didcomm_1.ProofFormatSpec({
|
|
60
61
|
format: ANONCREDS_PRESENTATION_REQUEST,
|
|
61
62
|
attachmentId,
|
|
62
63
|
});
|
|
@@ -68,8 +69,8 @@ class AnonCredsProofFormatService {
|
|
|
68
69
|
name: anoncredsFormat.name,
|
|
69
70
|
version: anoncredsFormat.version,
|
|
70
71
|
nonce: await agentContext.wallet.generateNonce(),
|
|
71
|
-
requested_attributes:
|
|
72
|
-
requested_predicates:
|
|
72
|
+
requested_attributes: anoncredsFormat.requested_attributes ?? {},
|
|
73
|
+
requested_predicates: anoncredsFormat.requested_predicates ?? {},
|
|
73
74
|
non_revoked: anoncredsFormat.non_revoked,
|
|
74
75
|
};
|
|
75
76
|
// Assert attribute and predicate (group) names do not match
|
|
@@ -85,15 +86,16 @@ class AnonCredsProofFormatService {
|
|
|
85
86
|
(0, utils_1.assertNoDuplicateGroupsNamesInProofRequest)(requestJson);
|
|
86
87
|
}
|
|
87
88
|
async acceptRequest(agentContext, { proofFormats, requestAttachment, attachmentId }) {
|
|
88
|
-
const format = new
|
|
89
|
+
const format = new didcomm_1.ProofFormatSpec({
|
|
89
90
|
format: ANONCREDS_PRESENTATION,
|
|
90
91
|
attachmentId,
|
|
91
92
|
});
|
|
92
93
|
const requestJson = requestAttachment.getDataAsJson();
|
|
93
|
-
const anoncredsFormat = proofFormats
|
|
94
|
-
const selectedCredentials = anoncredsFormat
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
const anoncredsFormat = proofFormats?.anoncreds;
|
|
95
|
+
const selectedCredentials = anoncredsFormat ??
|
|
96
|
+
(await this._selectCredentialsForRequest(agentContext, requestJson, {
|
|
97
|
+
filterByNonRevocationRequirements: true,
|
|
98
|
+
}));
|
|
97
99
|
const proof = await this.createProof(agentContext, requestJson, selectedCredentials);
|
|
98
100
|
const attachment = this.getFormatData(proof, format.attachmentId);
|
|
99
101
|
return {
|
|
@@ -102,7 +104,6 @@ class AnonCredsProofFormatService {
|
|
|
102
104
|
};
|
|
103
105
|
}
|
|
104
106
|
async processPresentation(agentContext, { requestAttachment, attachment }) {
|
|
105
|
-
var _a;
|
|
106
107
|
const verifierService = agentContext.dependencyManager.resolve(services_1.AnonCredsVerifierServiceSymbol);
|
|
107
108
|
const proofRequestJson = requestAttachment.getDataAsJson();
|
|
108
109
|
// NOTE: we don't do validation here, as this is handled by the AnonCreds implementation, however
|
|
@@ -117,7 +118,7 @@ class AnonCredsProofFormatService {
|
|
|
117
118
|
`Actual '${attribute.encoded}'`);
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
|
-
for (const [, attributeGroup] of Object.entries(
|
|
121
|
+
for (const [, attributeGroup] of Object.entries(proofJson.requested_proof.revealed_attr_groups ?? {})) {
|
|
121
122
|
for (const [attributeName, attribute] of Object.entries(attributeGroup.values)) {
|
|
122
123
|
if (!(0, utils_1.checkValidCredentialValueEncoding)(attribute.raw, attribute.encoded)) {
|
|
123
124
|
throw new core_1.CredoError(`The encoded value for '${attributeName}' is invalid. ` +
|
|
@@ -139,20 +140,18 @@ class AnonCredsProofFormatService {
|
|
|
139
140
|
return verified;
|
|
140
141
|
}
|
|
141
142
|
async getCredentialsForRequest(agentContext, { requestAttachment, proofFormats }) {
|
|
142
|
-
var _a;
|
|
143
143
|
const proofRequestJson = requestAttachment.getDataAsJson();
|
|
144
144
|
// Set default values
|
|
145
|
-
const { filterByNonRevocationRequirements = true } =
|
|
145
|
+
const { filterByNonRevocationRequirements = true } = proofFormats?.anoncreds ?? {};
|
|
146
146
|
const credentialsForRequest = await (0, getCredentialsForAnonCredsRequest_1.getCredentialsForAnonCredsProofRequest)(agentContext, proofRequestJson, {
|
|
147
147
|
filterByNonRevocationRequirements,
|
|
148
148
|
});
|
|
149
149
|
return credentialsForRequest;
|
|
150
150
|
}
|
|
151
151
|
async selectCredentialsForRequest(agentContext, { requestAttachment, proofFormats }) {
|
|
152
|
-
var _a;
|
|
153
152
|
const proofRequestJson = requestAttachment.getDataAsJson();
|
|
154
153
|
// Set default values
|
|
155
|
-
const { filterByNonRevocationRequirements = true } =
|
|
154
|
+
const { filterByNonRevocationRequirements = true } = proofFormats?.anoncreds ?? {};
|
|
156
155
|
const selectedCredentials = this._selectCredentialsForRequest(agentContext, proofRequestJson, {
|
|
157
156
|
filterByNonRevocationRequirements,
|
|
158
157
|
});
|
|
@@ -253,7 +252,7 @@ class AnonCredsProofFormatService {
|
|
|
253
252
|
*/
|
|
254
253
|
async createProof(agentContext, proofRequest, selectedCredentials) {
|
|
255
254
|
const holderService = agentContext.dependencyManager.resolve(services_1.AnonCredsHolderServiceSymbol);
|
|
256
|
-
const credentialObjects = await Promise.all([...Object.values(selectedCredentials.attributes), ...Object.values(selectedCredentials.predicates)].map(async (c) =>
|
|
255
|
+
const credentialObjects = await Promise.all([...Object.values(selectedCredentials.attributes), ...Object.values(selectedCredentials.predicates)].map(async (c) => c.credentialInfo ?? holderService.getCredential(agentContext, { id: c.credentialId })));
|
|
257
256
|
const schemas = await this.getSchemas(agentContext, new Set(credentialObjects.map((c) => c.schemaId)));
|
|
258
257
|
const credentialDefinitions = await this.getCredentialDefinitions(agentContext, new Set(credentialObjects.map((c) => c.credentialDefinitionId)));
|
|
259
258
|
// selectedCredentials are overridden with specified timestamps of the revocation status list that
|
|
@@ -275,10 +274,10 @@ class AnonCredsProofFormatService {
|
|
|
275
274
|
* @param id the attach id from the formats component of the message
|
|
276
275
|
*/
|
|
277
276
|
getFormatData(data, id) {
|
|
278
|
-
const attachment = new
|
|
277
|
+
const attachment = new didcomm_1.Attachment({
|
|
279
278
|
id,
|
|
280
279
|
mimeType: 'application/json',
|
|
281
|
-
data: new
|
|
280
|
+
data: new didcomm_1.AttachmentData({
|
|
282
281
|
base64: core_1.JsonEncoder.toBase64(data),
|
|
283
282
|
}),
|
|
284
283
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnonCredsProofFormatService.js","sourceRoot":"","sources":["../../src/formats/AnonCredsProofFormatService.ts"],"names":[],"mappings":";;;AA4BA,
|
|
1
|
+
{"version":3,"file":"AnonCredsProofFormatService.js","sourceRoot":"","sources":["../../src/formats/AnonCredsProofFormatService.ts"],"names":[],"mappings":";;;AA4BA,yCAAyE;AACzE,+CAA+E;AAE/E,2EAAqG;AACrG,0CAA0F;AAC1F,oCASiB;AACjB,oDAA2D;AAC3D,kGAAmG;AAEnG,MAAM,+BAA+B,GAAG,8BAA8B,CAAA;AACtE,MAAM,8BAA8B,GAAG,8BAA8B,CAAA;AACrE,MAAM,sBAAsB,GAAG,sBAAsB,CAAA;AAErD,MAAa,2BAA2B;IAAxC;QACkB,cAAS,GAAG,WAAoB,CAAA;IA0YlD,CAAC;IAxYQ,KAAK,CAAC,cAAc,CACzB,YAA0B,EAC1B,EAAE,YAAY,EAAE,YAAY,EAA0D;QAEtF,MAAM,MAAM,GAAG,IAAI,yBAAe,CAAC;YACjC,MAAM,EAAE,+BAA+B;YACvC,YAAY;SACb,CAAC,CAAA;QAEF,MAAM,eAAe,GAAG,YAAY,CAAC,SAAS,CAAA;QAC9C,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,KAAK,CAAC,+DAA+D,CAAC,CAAA;QAC9E,CAAC;QAED,MAAM,YAAY,GAAG,IAAA,gCAAwB,EAAC;YAC5C,UAAU,EAAE,eAAe,CAAC,UAAU,IAAI,EAAE;YAC5C,UAAU,EAAE,eAAe,CAAC,UAAU,IAAI,EAAE;YAC5C,IAAI,EAAE,eAAe,CAAC,IAAI,IAAI,eAAe;YAC7C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Aa,EAAE,EAAU;QAC7C,MAAM,UAAU,GAAG,IAAI,oBAAU,CAAC;YAChC,EAAE;YACF,QAAQ,EAAE,kBAAkB;YAC5B,IAAI,EAAE,IAAI,wBAAc,CAAC;gBACvB,MAAM,EAAE,kBAAW,CAAC,QAAQ,CAAC,IAAI,CAAC;aACnC,CAAC;SACH,CAAC,CAAA;QAEF,OAAO,UAAU,CAAA;IACnB,CAAC;CACF;AA3YD,kEA2YC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
1
|
+
import type { AgentContext } from '@credo-ts/core';
|
|
2
|
+
import type { DataIntegrityCredentialFormat, CredentialFormatService, CredentialFormatCreateProposalOptions, CredentialFormatCreateProposalReturn, CredentialFormatProcessOptions, CredentialFormatAcceptProposalOptions, CredentialFormatCreateOfferReturn, CredentialFormatCreateOfferOptions, CredentialFormatAcceptOfferOptions, CredentialFormatCreateReturn, CredentialFormatAcceptRequestOptions, CredentialFormatProcessCredentialOptions, CredentialFormatAutoRespondProposalOptions, CredentialFormatAutoRespondOfferOptions, CredentialFormatAutoRespondRequestOptions, CredentialFormatAutoRespondCredentialOptions } from '@credo-ts/didcomm';
|
|
3
|
+
import { CredentialFormatSpec, Attachment } from '@credo-ts/didcomm';
|
|
3
4
|
export declare class DataIntegrityCredentialFormatService implements CredentialFormatService<DataIntegrityCredentialFormat> {
|
|
4
5
|
/** formatKey is the key used when calling agent.credentials.xxx with credentialFormats.anoncreds */
|
|
5
6
|
readonly formatKey: "dataIntegrity";
|