Skip to content

Commit

Permalink
support refresh service (#81)
Browse files Browse the repository at this point in the history
* support refresh service
* add custom type for refresh service

---------

Co-authored-by: vmidyllic <[email protected]>
  • Loading branch information
ilya-korotya and vmidyllic authored Oct 30, 2023
1 parent 6ce2c78 commit d34718c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
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"`
}

0 comments on commit d34718c

Please sign in to comment.