Skip to content

Commit

Permalink
feat(verifiable-credentials): add credential status eip712 type
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiter committed Jun 2, 2022
1 parent 28c556f commit d9db01f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/modules/verifiable-credentials/types/eip712.types.ts
Expand Up @@ -8,6 +8,7 @@ export const verifiableCredentialEIP712Types = {
{ name: 'issuanceDate', type: 'string' },
{ name: 'credentialSubject', type: 'CredentialSubject' },
{ name: 'proof', type: 'Proof' },
{ name: 'credentialStatus', type: 'StatusList2021Entry' },
],
EWFRole: [
{ name: 'namespace', type: 'string' },
Expand All @@ -22,6 +23,13 @@ export const verifiableCredentialEIP712Types = {
{ name: 'role', type: 'EWFRole' },
{ name: 'issuerFields', type: 'IssuerFields[]' },
],
StatusList2021Entry: [
{ name: 'id', type: 'string' },
{ name: 'type', type: 'string' },
{ name: 'statusPurpose', type: 'string' },
{ name: 'statusListIndex', type: 'string' },
{ name: 'statusListCredential', type: 'string' },
],
Proof: [
{ name: '@context', type: 'string' },
{ name: 'verificationMethod', type: 'string' },
Expand Down Expand Up @@ -50,6 +58,7 @@ export const verifiablePresentationWithCredentialEIP712Types = {
],
VC712DomainData: [],
VC712DomainSchema: [
{ name: 'StatusList2021Entry', type: 'VC712DomainTypedDataField[]' },
{ name: 'CredentialSubject', type: 'VC712DomainTypedDataField[]' },
{ name: 'EIP712Domain', type: 'VC712DomainTypedDataField[]' },
{ name: 'EWFRole', type: 'VC712DomainTypedDataField[]' },
Expand All @@ -65,6 +74,7 @@ export const verifiablePresentationWithCredentialEIP712Types = {
EWFRole: verifiableCredentialEIP712Types.EWFRole,
IssuerFields: verifiableCredentialEIP712Types.IssuerFields,
CredentialSubject: verifiableCredentialEIP712Types.CredentialSubject,
StatusList2021Entry: verifiableCredentialEIP712Types.StatusList2021Entry,
VCProof: [
...verifiableCredentialEIP712Types.Proof,
{ type: 'string', name: 'proofValue' },
Expand All @@ -77,6 +87,7 @@ export const verifiablePresentationWithCredentialEIP712Types = {
{ type: 'string', name: 'issuer' },
{ type: 'string', name: 'issuanceDate' },
{ type: 'CredentialSubject', name: 'credentialSubject' },
{ type: 'StatusList2021Entry', name: 'credentialStatus' },
{ type: 'VCProof', name: 'proof' },
],
Proof: verifiableCredentialEIP712Types.Proof,
Expand Down

0 comments on commit d9db01f

Please sign in to comment.