Skip to content

Commit

Permalink
Require passing a credential plugin as argument when creating `LtoCre…
Browse files Browse the repository at this point in the history
…dentialPlugin`
  • Loading branch information
jasny committed Jul 25, 2023
1 parent 225e502 commit d9f6007
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"dependencies": {
"@ltonetwork/lto": "^0.15.13",
"@veramo/core": "^4.2.0",
"@veramo/credential-w3c": "^4.2.0",
"@veramo/did-manager": "^4.2.0"
}
}
4 changes: 1 addition & 3 deletions src/lto-credential-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
CredentialStatusReference,
CredentialPayload,
} from '@veramo/core';
import { CredentialPlugin } from '@veramo/credential-w3c';
import canonicalize from 'canonicalize';
import { sha256 } from '@noble/hashes/sha256';
import { base58 } from '@scure/base';
Expand Down Expand Up @@ -53,10 +52,9 @@ export class LtoCredentialPlugin implements IAgentPlugin {
readonly issueStatement: boolean;

constructor(
plugin: { methods: ICredentialPlugin; schema?: IAgentPluginSchema },
options: LtoOptions & { addCredentialStatus?: boolean; issueStatement?: boolean },
plugin?: { methods: ICredentialPlugin; schema?: IAgentPluginSchema },
) {
plugin ??= new CredentialPlugin();
const { methods, schema } = plugin;

this.methods = {
Expand Down

0 comments on commit d9f6007

Please sign in to comment.