Skip to content

Commit

Permalink
support refresh credential message (#36)
Browse files Browse the repository at this point in the history
support refresh credential message
  • Loading branch information
ilya-korotya authored Oct 30, 2023
1 parent 68b9ee9 commit 7a0511d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions protocol/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ const (
// CredentialIssuanceResponseMessageType is type for message with a credential issuance
CredentialIssuanceResponseMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/1.0/issuance-response"

// CredentialMultipleIssuanceResponseMessageType is type for message with multiple credential issuance
CredentialMultipleIssuanceResponseMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/1.0/multiple-issuance-response"

// CredentialStatusUpdateMessageType is type for message with a credential status update
CredentialStatusUpdateMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/1.0/status-update"

// CredentialRefreshMessageType is type for message with a credential refresh
CredentialRefreshMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/1.0/refresh"
)

// CredentialIssuanceRequestMessage represent Iden3message for credential request
Expand Down Expand Up @@ -130,3 +136,22 @@ type CredentialStatusUpdateMessageBody struct {
ID string `json:"id"`
Reason string `json:"reason"`
}

// CredentialRefreshMessage represent Iden3message for credential refresh message
type CredentialRefreshMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`

Body CredentialRefreshMessageBody `json:"body,omitempty"`

From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
}

// CredentialRefreshMessageBody is msg body for refresh message
type CredentialRefreshMessageBody struct {
ID string `json:"id"`
Reason string `json:"reason"`
}

0 comments on commit 7a0511d

Please sign in to comment.