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 credential message #36

Merged
merged 7 commits into from
Oct 30, 2023
Merged
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
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"`
}
Loading