diff --git a/package.json b/package.json index 37ca942..53e93d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tanglelabs/web-identity-adapter", - "version": "0.2.0", + "version": "0.2.1", "description": "did:web adapter", "main": "dist/index.js", "types": "dist/index.d.js", diff --git a/src/index.ts b/src/index.ts index 34e2b9e..1e6067b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -337,6 +337,7 @@ export class DidKeyCredentialsManager< alg: "EdDSA", }; const types = Array.isArray(type) ? [...type] : [type]; + const extras = options.extras ?? {}; const credential: JwtCredentialPayload = { sub: recipientDid, nbf: Math.floor(Date.now() / 1000), @@ -348,6 +349,7 @@ export class DidKeyCredentialsManager< ], type: ["VerifiableCredential", "OpenBadgeCredential"], id, + ...extras, name: type, issuer: { id: new URL("/", id).toString(),