@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
|
@@ -10,28 +10,26 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.V1IssueCredentialMessage = exports.INDY_CREDENTIAL_ATTACHMENT_ID = void 0;
|
|
13
|
-
const
|
|
13
|
+
const didcomm_1 = require("@credo-ts/didcomm");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
16
16
|
exports.INDY_CREDENTIAL_ATTACHMENT_ID = 'libindy-cred-0';
|
|
17
|
-
class V1IssueCredentialMessage extends
|
|
17
|
+
class V1IssueCredentialMessage extends didcomm_1.AgentMessage {
|
|
18
18
|
constructor(options) {
|
|
19
|
-
var _a;
|
|
20
19
|
super();
|
|
21
20
|
this.allowDidSovPrefix = true;
|
|
22
21
|
this.type = V1IssueCredentialMessage.type.messageTypeUri;
|
|
23
22
|
if (options) {
|
|
24
|
-
this.id =
|
|
23
|
+
this.id = options.id ?? this.generateId();
|
|
25
24
|
this.comment = options.comment;
|
|
26
25
|
this.credentialAttachments = options.credentialAttachments;
|
|
27
26
|
this.appendedAttachments = options.attachments;
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
get indyCredential() {
|
|
31
|
-
var _a;
|
|
32
30
|
const attachment = this.credentialAttachments.find((attachment) => attachment.id === exports.INDY_CREDENTIAL_ATTACHMENT_ID);
|
|
33
31
|
// Extract credential from attachment
|
|
34
|
-
const credentialJson =
|
|
32
|
+
const credentialJson = attachment?.getDataAsJson() ?? null;
|
|
35
33
|
return credentialJson;
|
|
36
34
|
}
|
|
37
35
|
getCredentialAttachmentById(id) {
|
|
@@ -39,9 +37,9 @@ class V1IssueCredentialMessage extends core_1.AgentMessage {
|
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
39
|
exports.V1IssueCredentialMessage = V1IssueCredentialMessage;
|
|
42
|
-
V1IssueCredentialMessage.type = (0,
|
|
40
|
+
V1IssueCredentialMessage.type = (0, didcomm_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/issue-credential');
|
|
43
41
|
__decorate([
|
|
44
|
-
(0,
|
|
42
|
+
(0, didcomm_1.IsValidMessageType)(V1IssueCredentialMessage.type),
|
|
45
43
|
__metadata("design:type", Object)
|
|
46
44
|
], V1IssueCredentialMessage.prototype, "type", void 0);
|
|
47
45
|
__decorate([
|
|
@@ -51,12 +49,12 @@ __decorate([
|
|
|
51
49
|
], V1IssueCredentialMessage.prototype, "comment", void 0);
|
|
52
50
|
__decorate([
|
|
53
51
|
(0, class_transformer_1.Expose)({ name: 'credentials~attach' }),
|
|
54
|
-
(0, class_transformer_1.Type)(() =>
|
|
52
|
+
(0, class_transformer_1.Type)(() => didcomm_1.Attachment),
|
|
55
53
|
(0, class_validator_1.IsArray)(),
|
|
56
54
|
(0, class_validator_1.ValidateNested)({
|
|
57
55
|
each: true,
|
|
58
56
|
}),
|
|
59
|
-
(0, class_validator_1.IsInstance)(
|
|
57
|
+
(0, class_validator_1.IsInstance)(didcomm_1.Attachment, { each: true }),
|
|
60
58
|
__metadata("design:type", Array)
|
|
61
59
|
], V1IssueCredentialMessage.prototype, "credentialAttachments", void 0);
|
|
62
60
|
//# sourceMappingURL=V1IssueCredentialMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1IssueCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1IssueCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA
|
|
1
|
+
{"version":3,"file":"V1IssueCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1IssueCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+CAAkG;AAClG,yDAAgD;AAChD,qDAA2F;AAE9E,QAAA,6BAA6B,GAAG,gBAAgB,CAAA;AAS7D,MAAa,wBAAyB,SAAQ,sBAAY;IAGxD,YAAmB,OAAwC;QACzD,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAcxB,SAAI,GAAG,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAA;QATjE,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,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age } from '@credo-ts/
|
|
2
|
+
import { Attachment, AgentMessage } from '@credo-ts/didcomm';
|
|
3
3
|
import { V1CredentialPreview } from './V1CredentialPreview';
|
|
4
4
|
export declare const INDY_CREDENTIAL_OFFER_ATTACHMENT_ID = "libindy-cred-offer-0";
|
|
5
5
|
export interface V1OfferCredentialMessageOptions {
|
|
@@ -18,7 +18,7 @@ export declare class V1OfferCredentialMessage extends AgentMessage {
|
|
|
18
18
|
readonly allowDidSovPrefix = true;
|
|
19
19
|
constructor(options: V1OfferCredentialMessageOptions);
|
|
20
20
|
readonly type: string;
|
|
21
|
-
static readonly type: import("@credo-ts/
|
|
21
|
+
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
22
22
|
comment?: string;
|
|
23
23
|
credentialPreview: V1CredentialPreview;
|
|
24
24
|
offerAttachments: Attachment[];
|
|
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.V1OfferCredentialMessage = exports.INDY_CREDENTIAL_OFFER_ATTACHMENT_ID = void 0;
|
|
13
|
-
const
|
|
13
|
+
const didcomm_1 = require("@credo-ts/didcomm");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
16
16
|
const V1CredentialPreview_1 = require("./V1CredentialPreview");
|
|
@@ -20,7 +20,7 @@ exports.INDY_CREDENTIAL_OFFER_ATTACHMENT_ID = 'libindy-cred-offer-0';
|
|
|
20
20
|
*
|
|
21
21
|
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#offer-credential
|
|
22
22
|
*/
|
|
23
|
-
class V1OfferCredentialMessage extends
|
|
23
|
+
class V1OfferCredentialMessage extends didcomm_1.AgentMessage {
|
|
24
24
|
constructor(options) {
|
|
25
25
|
super();
|
|
26
26
|
this.allowDidSovPrefix = true;
|
|
@@ -34,10 +34,9 @@ class V1OfferCredentialMessage extends core_1.AgentMessage {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
get indyCredentialOffer() {
|
|
37
|
-
var _a;
|
|
38
37
|
const attachment = this.offerAttachments.find((attachment) => attachment.id === exports.INDY_CREDENTIAL_OFFER_ATTACHMENT_ID);
|
|
39
38
|
// Extract credential offer from attachment
|
|
40
|
-
const credentialOfferJson =
|
|
39
|
+
const credentialOfferJson = attachment?.getDataAsJson() ?? null;
|
|
41
40
|
return credentialOfferJson;
|
|
42
41
|
}
|
|
43
42
|
getOfferAttachmentById(id) {
|
|
@@ -45,9 +44,9 @@ class V1OfferCredentialMessage extends core_1.AgentMessage {
|
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
exports.V1OfferCredentialMessage = V1OfferCredentialMessage;
|
|
48
|
-
V1OfferCredentialMessage.type = (0,
|
|
47
|
+
V1OfferCredentialMessage.type = (0, didcomm_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/offer-credential');
|
|
49
48
|
__decorate([
|
|
50
|
-
(0,
|
|
49
|
+
(0, didcomm_1.IsValidMessageType)(V1OfferCredentialMessage.type),
|
|
51
50
|
__metadata("design:type", Object)
|
|
52
51
|
], V1OfferCredentialMessage.prototype, "type", void 0);
|
|
53
52
|
__decorate([
|
|
@@ -64,12 +63,12 @@ __decorate([
|
|
|
64
63
|
], V1OfferCredentialMessage.prototype, "credentialPreview", void 0);
|
|
65
64
|
__decorate([
|
|
66
65
|
(0, class_transformer_1.Expose)({ name: 'offers~attach' }),
|
|
67
|
-
(0, class_transformer_1.Type)(() =>
|
|
66
|
+
(0, class_transformer_1.Type)(() => didcomm_1.Attachment),
|
|
68
67
|
(0, class_validator_1.IsArray)(),
|
|
69
68
|
(0, class_validator_1.ValidateNested)({
|
|
70
69
|
each: true,
|
|
71
70
|
}),
|
|
72
|
-
(0, class_validator_1.IsInstance)(
|
|
71
|
+
(0, class_validator_1.IsInstance)(didcomm_1.Attachment, { each: true }),
|
|
73
72
|
__metadata("design:type", Array)
|
|
74
73
|
], V1OfferCredentialMessage.prototype, "offerAttachments", void 0);
|
|
75
74
|
//# sourceMappingURL=V1OfferCredentialMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1OfferCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1OfferCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA
|
|
1
|
+
{"version":3,"file":"V1OfferCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1OfferCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+CAAkG;AAClG,yDAAgD;AAChD,qDAA2F;AAE3F,+DAA2D;AAE9C,QAAA,mCAAmC,GAAG,sBAAsB,CAAA;AAUzE;;;;GAIG;AACH,MAAa,wBAAyB,SAAQ,sBAAY;IAGxD,YAAmB,OAAwC;QACzD,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAexB,SAAI,GAAG,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAA;QAVjE,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAA;YAClD,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAA;YAChD,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAA;QAChD,CAAC;IACH,CAAC;IAyBD,IAAW,mBAAmB;QAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,2CAAmC,CAAC,CAAA;QAEpH,2CAA2C;QAC3C,MAAM,mBAAmB,GAAG,UAAU,EAAE,aAAa,EAA4B,IAAI,IAAI,CAAA;QAEzF,OAAO,mBAAmB,CAAA;IAC5B,CAAC;IAEM,sBAAsB,CAAC,EAAU;QACtC,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IACzE,CAAC;;AAjDH,4DAkDC;AAjCwB,6BAAI,GAAG,IAAA,0BAAgB,EAAC,2DAA2D,CAAC,AAAhF,CAAgF;AAD3F;IADf,IAAA,4BAAkB,EAAC,wBAAwB,CAAC,IAAI,CAAC;;sDACiB;AAK5D;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACU;AAMhB;IAJN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;IACtC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,yCAAmB,CAAC;IAC/B,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,EAAC,yCAAmB,CAAC;8BACL,yCAAmB;mEAAA;AASvC;IAPN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACjC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oBAAU,CAAC;IACtB,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC;QACd,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,4BAAU,EAAC,oBAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;kEACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Attachment } from '@credo-ts/
|
|
2
|
-
import { AgentMessage } from '@credo-ts/
|
|
1
|
+
import type { Attachment } from '@credo-ts/didcomm';
|
|
2
|
+
import { AgentMessage } from '@credo-ts/didcomm';
|
|
3
3
|
import { V1CredentialPreview } from './V1CredentialPreview';
|
|
4
4
|
export interface V1ProposeCredentialMessageOptions {
|
|
5
5
|
id?: string;
|
|
@@ -22,7 +22,7 @@ export declare class V1ProposeCredentialMessage extends AgentMessage {
|
|
|
22
22
|
readonly allowDidSovPrefix = true;
|
|
23
23
|
constructor(options: V1ProposeCredentialMessageOptions);
|
|
24
24
|
readonly type: string;
|
|
25
|
-
static readonly type: import("@credo-ts/
|
|
25
|
+
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
26
26
|
/**
|
|
27
27
|
* Human readable information about this Credential Proposal,
|
|
28
28
|
* so the proposal can be evaluated by human judgment.
|
|
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.V1ProposeCredentialMessage = void 0;
|
|
13
|
-
const
|
|
13
|
+
const didcomm_1 = require("@credo-ts/didcomm");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
16
16
|
const utils_1 = require("../../../../utils");
|
|
@@ -20,14 +20,13 @@ const V1CredentialPreview_1 = require("./V1CredentialPreview");
|
|
|
20
20
|
*
|
|
21
21
|
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#propose-credential
|
|
22
22
|
*/
|
|
23
|
-
class V1ProposeCredentialMessage extends
|
|
23
|
+
class V1ProposeCredentialMessage extends didcomm_1.AgentMessage {
|
|
24
24
|
constructor(options) {
|
|
25
|
-
var _a;
|
|
26
25
|
super();
|
|
27
26
|
this.allowDidSovPrefix = true;
|
|
28
27
|
this.type = V1ProposeCredentialMessage.type.messageTypeUri;
|
|
29
28
|
if (options) {
|
|
30
|
-
this.id =
|
|
29
|
+
this.id = options.id ?? this.generateId();
|
|
31
30
|
this.comment = options.comment;
|
|
32
31
|
this.credentialPreview = options.credentialPreview;
|
|
33
32
|
this.schemaIssuerDid = options.schemaIssuerDid;
|
|
@@ -41,9 +40,9 @@ class V1ProposeCredentialMessage extends core_1.AgentMessage {
|
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
exports.V1ProposeCredentialMessage = V1ProposeCredentialMessage;
|
|
44
|
-
V1ProposeCredentialMessage.type = (0,
|
|
43
|
+
V1ProposeCredentialMessage.type = (0, didcomm_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/propose-credential');
|
|
45
44
|
__decorate([
|
|
46
|
-
(0,
|
|
45
|
+
(0, didcomm_1.IsValidMessageType)(V1ProposeCredentialMessage.type),
|
|
47
46
|
__metadata("design:type", Object)
|
|
48
47
|
], V1ProposeCredentialMessage.prototype, "type", void 0);
|
|
49
48
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1ProposeCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1ProposeCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA
|
|
1
|
+
{"version":3,"file":"V1ProposeCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1ProposeCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+CAAsF;AACtF,yDAAgD;AAChD,qDAA2F;AAE3F,6CAK0B;AAE1B,+DAA2D;AAe3D;;;;GAIG;AACH,MAAa,0BAA2B,SAAQ,sBAAY;IAG1D,YAAmB,OAA0C;QAC3D,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAoBxB,SAAI,GAAG,0BAA0B,CAAC,IAAI,CAAC,cAAc,CAAA;QAfnE,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAA;YAClD,IAAI,CA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,0BAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC/B,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8DACa;AAWnB;IANN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAClC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,qCAA6B,EAAE;QACtC,OAAO,EAAE,8BAA8B;KACxC,CAAC;;iEAC2B;AAStB;IAJN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC/B,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,8CAAsC,CAAC;;0EACV;AAS/B;IAJN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IAC9B,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,+BAAuB,CAAC;;6DACR"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LegacyIndyCredentialRequest } from '../../../../formats';
|
|
2
|
-
import { Attachment, AgentMessage } from '@credo-ts/
|
|
2
|
+
import { Attachment, AgentMessage } from '@credo-ts/didcomm';
|
|
3
3
|
export declare const INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID = "libindy-cred-request-0";
|
|
4
4
|
export interface V1RequestCredentialMessageOptions {
|
|
5
5
|
id?: string;
|
|
@@ -11,7 +11,7 @@ export declare class V1RequestCredentialMessage extends AgentMessage {
|
|
|
11
11
|
readonly allowDidSovPrefix = true;
|
|
12
12
|
constructor(options: V1RequestCredentialMessageOptions);
|
|
13
13
|
readonly type: string;
|
|
14
|
-
static readonly type: import("@credo-ts/
|
|
14
|
+
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
15
15
|
comment?: string;
|
|
16
16
|
requestAttachments: Attachment[];
|
|
17
17
|
get indyCredentialRequest(): LegacyIndyCredentialRequest | null;
|
|
@@ -10,11 +10,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.V1RequestCredentialMessage = exports.INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID = void 0;
|
|
13
|
-
const
|
|
13
|
+
const didcomm_1 = require("@credo-ts/didcomm");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
16
16
|
exports.INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID = 'libindy-cred-request-0';
|
|
17
|
-
class V1RequestCredentialMessage extends
|
|
17
|
+
class V1RequestCredentialMessage extends didcomm_1.AgentMessage {
|
|
18
18
|
constructor(options) {
|
|
19
19
|
super();
|
|
20
20
|
this.allowDidSovPrefix = true;
|
|
@@ -27,10 +27,9 @@ class V1RequestCredentialMessage extends core_1.AgentMessage {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
get indyCredentialRequest() {
|
|
30
|
-
var _a;
|
|
31
30
|
const attachment = this.requestAttachments.find((attachment) => attachment.id === exports.INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID);
|
|
32
31
|
// Extract proof request from attachment
|
|
33
|
-
const credentialReqJson =
|
|
32
|
+
const credentialReqJson = attachment?.getDataAsJson() ?? null;
|
|
34
33
|
return credentialReqJson;
|
|
35
34
|
}
|
|
36
35
|
getRequestAttachmentById(id) {
|
|
@@ -38,9 +37,9 @@ class V1RequestCredentialMessage extends core_1.AgentMessage {
|
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
exports.V1RequestCredentialMessage = V1RequestCredentialMessage;
|
|
41
|
-
V1RequestCredentialMessage.type = (0,
|
|
40
|
+
V1RequestCredentialMessage.type = (0, didcomm_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/request-credential');
|
|
42
41
|
__decorate([
|
|
43
|
-
(0,
|
|
42
|
+
(0, didcomm_1.IsValidMessageType)(V1RequestCredentialMessage.type),
|
|
44
43
|
__metadata("design:type", Object)
|
|
45
44
|
], V1RequestCredentialMessage.prototype, "type", void 0);
|
|
46
45
|
__decorate([
|
|
@@ -50,12 +49,12 @@ __decorate([
|
|
|
50
49
|
], V1RequestCredentialMessage.prototype, "comment", void 0);
|
|
51
50
|
__decorate([
|
|
52
51
|
(0, class_transformer_1.Expose)({ name: 'requests~attach' }),
|
|
53
|
-
(0, class_transformer_1.Type)(() =>
|
|
52
|
+
(0, class_transformer_1.Type)(() => didcomm_1.Attachment),
|
|
54
53
|
(0, class_validator_1.IsArray)(),
|
|
55
54
|
(0, class_validator_1.ValidateNested)({
|
|
56
55
|
each: true,
|
|
57
56
|
}),
|
|
58
|
-
(0, class_validator_1.IsInstance)(
|
|
57
|
+
(0, class_validator_1.IsInstance)(didcomm_1.Attachment, { each: true }),
|
|
59
58
|
__metadata("design:type", Array)
|
|
60
59
|
], V1RequestCredentialMessage.prototype, "requestAttachments", void 0);
|
|
61
60
|
//# sourceMappingURL=V1RequestCredentialMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1RequestCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1RequestCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA
|
|
1
|
+
{"version":3,"file":"V1RequestCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1RequestCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+CAAkG;AAClG,yDAAgD;AAChD,qDAA2F;AAE9E,QAAA,qCAAqC,GAAG,wBAAwB,CAAA;AAS7E,MAAa,0BAA2B,SAAQ,sBAAY;IAG1D,YAAmB,OAA0C;QAC3D,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAcxB,SAAI,GAAG,0BAA0B,CAAC,IAAI,CAAC,cA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EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sEACC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LegacyIndyProofFormatService } from '../../../formats';
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
2
|
+
import type { AgentContext } from '@credo-ts/core';
|
|
3
|
+
import type { ProofProtocol, ProofProtocolOptions, InboundMessageContext, AgentMessage, ProblemReportMessage, GetProofFormatDataReturn, ProofFormat, FeatureRegistry, MessageHandlerRegistry } from '@credo-ts/didcomm';
|
|
4
|
+
import { BaseProofProtocol, ProofExchangeRecord } from '@credo-ts/didcomm';
|
|
4
5
|
import { V1PresentationAckMessage, V1PresentationMessage, V1ProposePresentationMessage, V1RequestPresentationMessage } from './messages';
|
|
5
6
|
export interface V1ProofProtocolConfig {
|
|
6
7
|
indyProofFormat: LegacyIndyProofFormatService;
|
|
@@ -15,7 +16,7 @@ export declare class V1ProofProtocol extends BaseProofProtocol implements ProofP
|
|
|
15
16
|
/**
|
|
16
17
|
* Registers the protocol implementation (handlers, feature registry) on the agent.
|
|
17
18
|
*/
|
|
18
|
-
register(
|
|
19
|
+
register(messageHandlerRegistry: MessageHandlerRegistry, featureRegistry: FeatureRegistry): void;
|
|
19
20
|
createProposal(agentContext: AgentContext, { proofFormats, connectionRecord, comment, parentThreadId, autoAcceptProof, }: ProofProtocolOptions.CreateProofProposalOptions<[LegacyIndyProofFormatService]>): Promise<ProofProtocolOptions.ProofProtocolMsgReturnType<V1ProposePresentationMessage>>;
|
|
20
21
|
processProposal(messageContext: InboundMessageContext<V1ProposePresentationMessage>): Promise<ProofExchangeRecord>;
|
|
21
22
|
acceptProposal(agentContext: AgentContext, { proofRecord, proofFormats, comment, autoAcceptProof, }: ProofProtocolOptions.AcceptProofProposalOptions<[LegacyIndyProofFormatService]>): Promise<ProofProtocolOptions.ProofProtocolMsgReturnType<V1RequestPresentationMessage>>;
|