diff --git a/packages/daf-w3c/src/action-handler.ts b/packages/daf-w3c/src/action-handler.ts index ec6093627..dab10b7fa 100644 --- a/packages/daf-w3c/src/action-handler.ts +++ b/packages/daf-w3c/src/action-handler.ts @@ -23,21 +23,25 @@ import { import Debug from 'debug' const debug = Debug('daf:w3c:action-handler') +export interface ICreateVerifiablePresentationArgs { + presentation: W3CPresentation + save?: boolean + proofFormat: 'jwt' +} + +export interface ICreateVerifiableCredentialArgs { + credential: W3CCredential + save?: boolean + proofFormat: 'jwt' +} + export interface IW3c extends IPluginMethodMap { - createVerifiablePresentation: ( - args: { - presentation: W3CPresentation - save?: boolean - proofFormat: 'jwt' - }, + createVerifiablePresentation( + args: ICreateVerifiablePresentationArgs, context: IContext, - ) => Promise + ): Promise createVerifiableCredential( - args: { - credential: W3CCredential - save?: boolean - proofFormat: 'jwt' - }, + args: ICreateVerifiableCredentialArgs, context: IContext, ): Promise } @@ -59,11 +63,7 @@ export class W3c implements IAgentPlugin { } async createVerifiablePresentation( - args: { - presentation: W3CPresentation - save?: boolean - proofFormat: 'jwt' - }, + args: ICreateVerifiablePresentationArgs, context: IContext, ): Promise { try { @@ -86,11 +86,7 @@ export class W3c implements IAgentPlugin { } async createVerifiableCredential( - args: { - credential: W3CCredential - save?: boolean - proofFormat: 'jwt' - }, + args: ICreateVerifiableCredentialArgs, context: IContext, ): Promise { try { diff --git a/packages/daf-w3c/src/index.ts b/packages/daf-w3c/src/index.ts index 8d6e8c35e..e42179e13 100644 --- a/packages/daf-w3c/src/index.ts +++ b/packages/daf-w3c/src/index.ts @@ -1,3 +1,8 @@ import { IAgentPlugin, IPluginMethodMap } from 'daf-core' export { W3cMessageHandler, MessageTypes } from './message-handler' -export { W3c, IW3c } from './action-handler' +export { + W3c, + IW3c, + ICreateVerifiableCredentialArgs, + ICreateVerifiablePresentationArgs, +} from './action-handler'