Skip to content

Commit d34718c

Browse files
support refresh service (#81)
* support refresh service * add custom type for refresh service --------- Co-authored-by: vmidyllic <74898029+vmidyllic@users.noreply.github.com>
1 parent 6ce2c78 commit d34718c

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

verifiable/constants.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,7 @@ const (
7272

7373
// Iden3OnсhainSparseMerkleTreeProof2023 is a proof type for MTP proofs with iden3 metadata from blockchain
7474
Iden3OnchainSparseMerkleTreeProof2023 CredentialStatusType = "Iden3OnchainSparseMerkleTreeProof2023"
75+
76+
// Iden3RefreshService2023 is the type of refresh service
77+
Iden3RefreshService2023 RefreshServiceType = "Iden3RefreshService2023"
7578
)

verifiable/credential.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type W3CCredential struct {
2525
Issuer string `json:"issuer"`
2626
CredentialSchema CredentialSchema `json:"credentialSchema"`
2727
Proof CredentialProofs `json:"proof,omitempty"`
28+
RefreshService *RefreshService `json:"refreshService,omitempty"`
2829
}
2930

3031
// Merklize merklizes verifiable credential

verifiable/refreshService.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package verifiable
2+
3+
// RefreshServiceType represent refresh service types
4+
type RefreshServiceType string
5+
6+
// RefreshService is struct that represents refresh service json-ld document
7+
type RefreshService struct {
8+
ID string `json:"id"`
9+
Type RefreshServiceType `json:"type"`
10+
}

0 commit comments

Comments
 (0)