diff --git a/verifiable/constants.go b/verifiable/constants.go index 85b8596..191dbbb 100644 --- a/verifiable/constants.go +++ b/verifiable/constants.go @@ -72,4 +72,7 @@ const ( // Iden3OnсhainSparseMerkleTreeProof2023 is a proof type for MTP proofs with iden3 metadata from blockchain Iden3OnchainSparseMerkleTreeProof2023 CredentialStatusType = "Iden3OnchainSparseMerkleTreeProof2023" + + // Iden3RefreshService2023 is the type of refresh service + Iden3RefreshService2023 RefreshServiceType = "Iden3RefreshService2023" ) diff --git a/verifiable/credential.go b/verifiable/credential.go index 7929ccd..8088845 100644 --- a/verifiable/credential.go +++ b/verifiable/credential.go @@ -25,6 +25,7 @@ type W3CCredential struct { Issuer string `json:"issuer"` CredentialSchema CredentialSchema `json:"credentialSchema"` Proof CredentialProofs `json:"proof,omitempty"` + RefreshService *RefreshService `json:"refreshService,omitempty"` } // Merklize merklizes verifiable credential diff --git a/verifiable/refreshService.go b/verifiable/refreshService.go new file mode 100644 index 0000000..82b7dc9 --- /dev/null +++ b/verifiable/refreshService.go @@ -0,0 +1,10 @@ +package verifiable + +// RefreshServiceType represent refresh service types +type RefreshServiceType string + +// RefreshService is struct that represents refresh service json-ld document +type RefreshService struct { + ID string `json:"id"` + Type RefreshServiceType `json:"type"` +}