Skip to content
Snippets Groups Projects

Helm charts

Merged Konstantin Tsabolov requested to merge tsabolov/ocm-engine:chore/helm-charts into main
Files
16
import type { BaseEventInput } from './baseEvents.js';
import type { AnonCredsCredentialOffer } from '@aries-framework/anoncreds';
import {
CredentialExchangeRecord,
JsonTransformer,
} from '@aries-framework/core';
import { BaseEvent } from './baseEvents.js';
export type EventAnonCredsCredentialOfferGetAllInput = BaseEventInput;
@@ -11,7 +16,9 @@ export class EventAnonCredsCredentialOfferGetAll extends BaseEvent<
public static token = 'anoncreds.credentialOffers.getAll';
public get instance() {
return this.data;
return this.data.map((d) =>
JsonTransformer.fromJSON(d, CredentialExchangeRecord),
);
}
public static fromEvent(e: EventAnonCredsCredentialOfferGetAll) {
@@ -33,7 +40,9 @@ export class EventAnonCredsCredentialOfferGetById extends BaseEvent<AnonCredsCre
public static token = 'anoncreds.credentialOffers.getById';
public get instance() {
return this.data;
return this.data
? JsonTransformer.fromJSON(this.data, CredentialExchangeRecord)
: null;
}
public static fromEvent(e: EventAnonCredsCredentialOfferGetById) {
Loading