Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support refresh service #81

Merged
merged 6 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions verifiable/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
1 change: 1 addition & 0 deletions verifiable/credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions verifiable/refreshService.go
Original file line number Diff line number Diff line change
@@ -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"`
}