Documentation
¶
Overview ¶
Package protocol defines core protocol messages
Index ¶
- Constants
- type AcceptProfile
- type AnoncryptAlgorithms
- type AuthcryptAlgorithms
- type AuthorizationMessageResponseBody
- type AuthorizationRequestMessage
- type AuthorizationRequestMessageBody
- type AuthorizationResponseMessage
- type ContractInvokeRequestMessage
- type ContractInvokeRequestMessageBody
- type ContractInvokeResponseMessage
- type ContractInvokeResponseMessageBody
- type CredentialFetchRequestMessage
- type CredentialFetchRequestMessageBody
- type CredentialInfo
- type CredentialIssuanceMessage
- type CredentialIssuanceRequestMessage
- type CredentialIssuanceRequestMessageBody
- type CredentialOffer
- type CredentialPaymentBody
- type CredentialPaymentData
- type CredentialPaymentInfo
- type CredentialPaymentMessage
- type CredentialPaymentRequestBody
- type CredentialPaymentRequestMessage
- type CredentialProposalInfo
- type CredentialRefreshMessage
- type CredentialRefreshMessageBody
- type CredentialStatusUpdateMessage
- type CredentialStatusUpdateMessageBody
- type CredentialsOfferMessage
- type CredentialsOfferMessageBody
- type CredentialsOnchainOfferMessage
- type CredentialsOnchainOfferMessageBody
- type CredentialsProposalBody
- type CredentialsProposalMessage
- type CredentialsProposalRequestBody
- type CredentialsProposalRequestMessage
- type DeviceRegistrationRequestMessage
- type DeviceRegistrationRequestMessageBody
- type DiscoverFeatureDiscloseMessage
- type DiscoverFeatureDiscloseMessageBody
- type DiscoverFeatureDisclosure
- type DiscoverFeatureQueriesMessage
- type DiscoverFeatureQueriesMessageBody
- type DiscoverFeatureQuery
- type DiscoveryProtocolFeatureType
- type Eip712Data
- type Eip712Domain
- type EncryptedCredentialIssuanceMessage
- type EncryptedIssuanceMessageBody
- type EthereumEip712Signature2021
- type Iden3PaymentCryptoV1
- type Iden3PaymentRailsERC20RequestV1
- type Iden3PaymentRailsERC20V1
- type Iden3PaymentRailsRequestV1
- type Iden3PaymentRailsSolanaRequestV1
- type Iden3PaymentRailsSolanaSPLRequestV1
- type Iden3PaymentRailsSolanaSPLV1
- type Iden3PaymentRailsSolanaV1
- type Iden3PaymentRailsV1
- type Iden3PaymentRequestCryptoV1
- type IssuanceMessageBody
- type JWEJSONEncryption
- type JwsAlgorithms
- type JwzAlgorithms
- type MessageFetchRequestMessage
- type MessageFetchRequestMessageBody
- type Metadata
- type OnchainZeroKnowledgeProofResponse
- type Payment
- func NewPaymentCrypto(data Iden3PaymentCryptoV1) Payment
- func NewPaymentRails(data Iden3PaymentRailsV1) Payment
- func NewPaymentRailsERC20(data Iden3PaymentRailsERC20V1) Payment
- func NewPaymentRailsSolana(data Iden3PaymentRailsSolanaV1) Payment
- func NewPaymentRailsSolanaSPL(data Iden3PaymentRailsSolanaSPLV1) Payment
- type PaymentContext
- type PaymentFeatures
- type PaymentMessage
- type PaymentMessageBody
- type PaymentProof
- type PaymentProofItem
- type PaymentRequestInfo
- type PaymentRequestInfoCredentials
- type PaymentRequestInfoData
- type PaymentRequestInfoDataItem
- type PaymentRequestMessage
- type PaymentRequestMessageBody
- type PaymentRequestType
- type PaymentType
- type ProblemErrorCode
- type ProblemReportMessage
- type ProblemReportMessageBody
- type ProofGenerationRequestMessage
- type ProofGenerationRequestMessageBody
- type ProofGenerationResponseMessage
- type ResponseMessageBody
- type RevocationStatusRequestMessage
- type RevocationStatusRequestMessageBody
- type RevocationStatusResponseMessage
- type RevocationStatusResponseMessageBody
- type Schema
- type SolanaEd25519Domain
- type SolanaEd25519Signature2025
- type TransactionData
- type Version
- type ZeroKnowledgeProofRequest
- type ZeroKnowledgeProofResponse
Constants ¶
const ( // AuthorizationRequestMessageType defines auth request type of the communication protocol AuthorizationRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "authorization/1.0/request" // AuthorizationResponseMessageType defines auth response type of the communication protocol AuthorizationResponseMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "authorization/1.0/response" )
const ( // ContractInvokeRequestMessageType defines contract invoke request type of the communication protocol ContractInvokeRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "proofs/1.0/contract-invoke-request" // ContractInvokeResponseMessageType defines contract invoke response type of the communication protocol ContractInvokeResponseMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "proofs/1.0/contract-invoke-response" )
const ( // CredentialIssuanceRequestMessageType accepts request for credential creation CredentialIssuanceRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/1.0/issuance-request" // CredentialFetchRequestMessageType is type for request of credential generation CredentialFetchRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/1.0/fetch-request" // CredentialOfferMessageType is type of message with credential offering CredentialOfferMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/1.0/offer" // CredentialIssuanceResponseMessageType is type for message with a credential issuance CredentialIssuanceResponseMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/1.0/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" // CredentialOnchainOfferMessageType is type for message with a credential onchain offer CredentialOnchainOfferMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/1.0/onchain-offer" // CredentialProposalRequestMessageType is type for request of the credential proposal // // # Experimental // // Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases. CredentialProposalRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/0.1/proposal-request" // CredentialProposalMessageType is type for proposal of the verifiable credential // // # Experimental // // Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases. CredentialProposalMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/0.1/proposal" // CredentialOfferStatusPending is a type when a credential issuance is in the process // // # Experimental // // Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases. CredentialOfferStatusPending = "pending" // CredentialOfferStatusCompleted if credential issuance is happened successfully // // # Experimental // // Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases. CredentialOfferStatusCompleted = "completed" // CredentialOfferStatusRejected - if credential issuance is not possible for some reason // // # Experimental // // Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases. CredentialOfferStatusRejected = "rejected" // CredentialProposalTypeWeb - if credential issuance is not possible for some reason // // # Experimental // // Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases. CredentialProposalTypeWeb = "WebVerificationFormV1.0" // CredentialPaymentRequestMessageType is type for request of the credential payment request // // # Experimental // // Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases. CredentialPaymentRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/0.1/payment-request" // CredentialPaymentMessageType is type for request of the credential payment // // # Experimental // // Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases. CredentialPaymentMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/0.1/payment" // DiscoverFeatureQueriesMessageType is type for discover-features queries message DiscoverFeatureQueriesMessageType iden3comm.ProtocolMessage = iden3comm.DidCommProtocol + "discover-features/2.0/queries" // DiscoverFeatureDiscloseMessageType is type for discover-features disclose message DiscoverFeatureDiscloseMessageType iden3comm.ProtocolMessage = iden3comm.DidCommProtocol + "discover-features/2.0/disclose" // EncryptedCredentialIssuanceResponseMessageType is type for message with a encrypted credential issuance // # Experimental // Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases. EncryptedCredentialIssuanceResponseMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/0.1/encrypted-issuance-response" )
const ( // PaymentRequestMessageType is a Iden3PaymentMessage payment type PaymentRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/0.1/payment-request" // PaymentMessageType is a Iden3PaymentMessage payment type PaymentMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "credentials/0.1/payment" // Iden3PaymentRequestCryptoV1Type is a Iden3PaymentRequestCryptoV1 payment type Iden3PaymentRequestCryptoV1Type PaymentRequestType = "Iden3PaymentRequestCryptoV1" // Iden3PaymentRailsRequestV1Type is a Iden3PaymentRailsRequestV1 payment type Iden3PaymentRailsRequestV1Type PaymentRequestType = "Iden3PaymentRailsRequestV1" // Iden3PaymentRailsERC20RequestV1Type is a Iden3PaymentRequestCryptoV1 payment type Iden3PaymentRailsERC20RequestV1Type PaymentRequestType = "Iden3PaymentRailsERC20RequestV1" // Iden3PaymentRailsSolanaRequestV1Type is a Iden3PaymentRailsSolanaRequestV1 payment type Iden3PaymentRailsSolanaRequestV1Type PaymentRequestType = "Iden3PaymentRailsSolanaRequestV1" // Iden3PaymentRailsSolanaSPLRequestV1Type is a Iden3PaymentRailsSolanaSPLRequestV1 payment type Iden3PaymentRailsSolanaSPLRequestV1Type PaymentRequestType = "Iden3PaymentRailsSolanaSPLRequestV1" // Iden3PaymentCryptoV1Type is a Iden3PaymentCryptoV1 payment type Iden3PaymentCryptoV1Type PaymentType = "Iden3PaymentCryptoV1" // Iden3PaymentRailsV1Type is a Iden3PaymentRailsV1 payment type Iden3PaymentRailsV1Type PaymentType = "Iden3PaymentRailsV1" // Iden3PaymentRailsERC20V1Type is a Iden3PaymentRailsERC20V1 payment type Iden3PaymentRailsERC20V1Type PaymentType = "Iden3PaymentRailsERC20V1" // Iden3PaymentRailsSolanaV1Type is a Iden3PaymentRailsSolanaV1 payment type Iden3PaymentRailsSolanaV1Type PaymentType = "Iden3PaymentRailsSolanaV1" // Iden3PaymentRailsSolanaSPLV1Type is a Iden3PaymentRailsSolanaSPLV1 payment type Iden3PaymentRailsSolanaSPLV1Type PaymentType = "Iden3PaymentRailsSolanaSPLV1" // SolanaEd25519Signature2025Type is a Solana Ed25519 signature proof type. SolanaEd25519Signature2025Type verifiable.ProofType = "SolanaEd25519Signature2025" )
const ( // ProblemReportMessageType is type for problem report ProblemReportMessageType iden3comm.ProtocolMessage = iden3comm.DidCommProtocol + "report-problem/2.0/problem-report" // ProblemReportTypeError is type for error problem report ProblemReportTypeError = "e" // ProblemReportTypeWarning is type for error problem report ProblemReportTypeWarning = "w" // ReportDescriptorTrust - Failed to achieve required trust. ReportDescriptorTrust = "trust" // ReportDescriptorTrustCrypto - Cryptographic operation failed. ReportDescriptorTrustCrypto = "trust.crypto" // ReportDescriptorTransport - Unable to transport data ReportDescriptorTransport = "xfer" // ReportDescriptorDID - DID is unusable ReportDescriptorDID = "did" // ReportDescriptorMsg - Bad message ReportDescriptorMsg = "msg" // ReportDescriptorMe - Internal error ReportDescriptorMe = "me" // ReportDescriptorReq - Circumstances don’t satisfy requirements. Request cannot be processed because circumstances has changed ReportDescriptorReq = "req" // ReportDescriptorReqTime - Failed to satisfy timing constraints. ReportDescriptorReqTime = "req.time" // ReportDescriptorLegal - Failed for legal reasons. ReportDescriptorLegal = "legal" )
const ( // ProofGenerationRequestMessageType is type for request of proof generation ProofGenerationRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "proofs/1.0/request" // ProofGenerationResponseMessageType is type for response of proof generation ProofGenerationResponseMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "proofs/1.0/response" )
const ( // RevocationStatusRequestMessageType is type for request of revocation status RevocationStatusRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "revocation/1.0/request-status" // RevocationStatusResponseMessageType is type for response with a revocation status RevocationStatusResponseMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "revocation/1.0/status" )
const ( // DeviceRegistrationRequestMessageType defines device registration request type of the communication protocol DeviceRegistrationRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "devices/1.0/registration" )
const ( // MessageFetchRequestMessageType defines message fetch request type of the communication protocol. MessageFetchRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "messages/1.0/fetch" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptProfile ¶ added in v2.10.0
type AcceptProfile struct {
AcceptedVersion Version
Env iden3comm.MediaType
AcceptCircuits []circuits.CircuitID
AcceptJwzAlgorithms []JwzAlgorithms
AcceptJwsAlgorithms []JwsAlgorithms
AcceptAnoncryptAlgorithms []AnoncryptAlgorithms
AcceptAuthcryptAlgorithms []AuthcryptAlgorithms
}
AcceptProfile is a struct that represents the accept header
type AnoncryptAlgorithms ¶ added in v2.10.0
type AnoncryptAlgorithms string
AnoncryptAlgorithms is a type of accepted anoncrypt algorithms
const ( // AnoncryptECDHESA256KW is a ECDH-ES+A256KW accepted Anoncrypt algorithm AnoncryptECDHESA256KW AnoncryptAlgorithms = "ECDH-ES+A256KW" )
type AuthcryptAlgorithms ¶ added in v2.11.5
type AuthcryptAlgorithms string
AuthcryptAlgorithms is a type of accepted authcrypt algorithms
const ( // AuthcryptECDH1PUA256KW is a ECDH-1PU+A256KW accepted Authcrypt algorithm AuthcryptECDH1PUA256KW AuthcryptAlgorithms = "ECDH-1PU+A256KW" )
type AuthorizationMessageResponseBody ¶
type AuthorizationMessageResponseBody struct {
DIDDoc json.RawMessage `json:"did_doc,omitempty"`
Message string `json:"message,omitempty"`
Scope []ZeroKnowledgeProofResponse `json:"scope"`
}
AuthorizationMessageResponseBody is struct the represents authorization response data
type AuthorizationRequestMessage ¶
type AuthorizationRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body AuthorizationRequestMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
AuthorizationRequestMessage is struct the represents iden3message authorization request
type AuthorizationRequestMessageBody ¶
type AuthorizationRequestMessageBody struct {
CallbackURL string `json:"callbackUrl"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
DIDDoc json.RawMessage `json:"did_doc,omitempty"`
Scope []ZeroKnowledgeProofRequest `json:"scope"`
Accept []string `json:"accept,omitempty"`
}
AuthorizationRequestMessageBody is body for authorization request
type AuthorizationResponseMessage ¶
type AuthorizationResponseMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body AuthorizationMessageResponseBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
AuthorizationResponseMessage is struct the represents iden3message authorization response
type ContractInvokeRequestMessage ¶
type ContractInvokeRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body ContractInvokeRequestMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
ContractInvokeRequestMessage is struct the represents iden3message contract invoke request
type ContractInvokeRequestMessageBody ¶
type ContractInvokeRequestMessageBody struct {
Reason string `json:"reason,omitempty"`
TransactionData TransactionData `json:"transaction_data"`
DIDDoc json.RawMessage `json:"did_doc,omitempty"`
Scope []ZeroKnowledgeProofRequest `json:"scope"`
}
ContractInvokeRequestMessageBody is body for contract invoke request
type ContractInvokeResponseMessage ¶ added in v2.10.1
type ContractInvokeResponseMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body ContractInvokeResponseMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
}
ContractInvokeResponseMessage is struct the represents iden3message contract invoke response
type ContractInvokeResponseMessageBody ¶ added in v2.10.1
type ContractInvokeResponseMessageBody struct {
TransactionData TransactionData `json:"transaction_data"`
DIDDoc json.RawMessage `json:"did_doc,omitempty"`
Scope []OnchainZeroKnowledgeProofResponse `json:"scope"`
}
ContractInvokeResponseMessageBody is body for contract invoke response
type CredentialFetchRequestMessage ¶
type CredentialFetchRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body CredentialFetchRequestMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialFetchRequestMessage represent Iden3message for credential fetch request
type CredentialFetchRequestMessageBody ¶
type CredentialFetchRequestMessageBody struct {
ID string `json:"id"`
}
CredentialFetchRequestMessageBody is msg body for fetch request
type CredentialInfo ¶ added in v2.3.0
CredentialInfo is a part of credential proposal request bodys
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialIssuanceMessage ¶
type CredentialIssuanceMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body IssuanceMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialIssuanceMessage represent Iden3message for credential issuance
type CredentialIssuanceRequestMessage ¶
type CredentialIssuanceRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body CredentialIssuanceRequestMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialIssuanceRequestMessage represent Iden3message for credential request
type CredentialIssuanceRequestMessageBody ¶
type CredentialIssuanceRequestMessageBody struct {
Schema Schema `json:"schema"`
Data json.RawMessage `json:"data"`
Expiration int64 `json:"expiration"`
}
CredentialIssuanceRequestMessageBody represents data for credential issuance request
type CredentialOffer ¶
type CredentialOffer struct {
ID string `json:"id"`
Description string `json:"description"`
Status string `json:"status,omitempty"`
}
CredentialOffer is structure to fetch credential
type CredentialPaymentBody ¶ added in v2.4.0
type CredentialPaymentBody struct {
Payments []struct {
ID string `json:"id"`
Type string `json:"type"`
PaymentData struct {
TxID string `json:"txId"`
} `json:"paymentData"`
} `json:"payments"`
}
CredentialPaymentBody is msg body for payment
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialPaymentData ¶ added in v2.4.0
type CredentialPaymentData struct {
ID string `json:"id"`
Type string `json:"type"`
Amount string `json:"amount"`
ChainID string `json:"chainId"`
Address string `json:"address"`
Signature string `json:"signature,omitempty"`
Currency string `json:"currency"`
}
CredentialPaymentData is msg for payment data
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialPaymentInfo ¶ added in v2.4.0
type CredentialPaymentInfo struct {
Credentials []CredentialInfo `json:"credentials"`
Type string `json:"type"`
Data CredentialPaymentData `json:"data"`
Expiration string `json:"expiration,omitempty"`
Description string `json:"description,omitempty"`
}
CredentialPaymentInfo is msg for payment information
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialPaymentMessage ¶ added in v2.4.0
type CredentialPaymentMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body CredentialPaymentBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialPaymentMessage represent Iden3message for credential payment
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialPaymentRequestBody ¶ added in v2.4.0
type CredentialPaymentRequestBody struct {
Agent string `json:"agent"`
Payments []CredentialPaymentInfo `json:"payments"`
}
CredentialPaymentRequestBody is msg body for payment requests
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialPaymentRequestMessage ¶ added in v2.4.0
type CredentialPaymentRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body CredentialPaymentRequestBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialPaymentRequestMessage represent Iden3message for credential payment request
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialProposalInfo ¶ added in v2.3.0
type CredentialProposalInfo struct {
Credentials []CredentialInfo `json:"credentials,omitempty"`
Type string `json:"type"`
URL string `json:"url"`
Expiration string `json:"expiration,omitempty"`
Description string `json:"description,omitempty"`
}
CredentialProposalInfo is a info of specific proposal that can relate to many credentials
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialRefreshMessage ¶ added in v2.1.0
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"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialRefreshMessage represent Iden3message for credential refresh message
type CredentialRefreshMessageBody ¶ added in v2.1.0
CredentialRefreshMessageBody is msg body for refresh message
type CredentialStatusUpdateMessage ¶
type CredentialStatusUpdateMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body CredentialStatusUpdateMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialStatusUpdateMessage represents credential status update message
type CredentialStatusUpdateMessageBody ¶
type CredentialStatusUpdateMessageBody struct {
ID string `json:"id"`
Reason string `json:"reason"`
}
CredentialStatusUpdateMessageBody the structure that represents the body of credential status update message
type CredentialsOfferMessage ¶
type CredentialsOfferMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body CredentialsOfferMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialsOfferMessage represent Iden3message for credential offer
type CredentialsOfferMessageBody ¶
type CredentialsOfferMessageBody struct {
URL string `json:"url"`
Credentials []CredentialOffer `json:"credentials"`
}
CredentialsOfferMessageBody is struct the represents offer message
type CredentialsOnchainOfferMessage ¶ added in v2.3.0
type CredentialsOnchainOfferMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body CredentialsOnchainOfferMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialsOnchainOfferMessage represent Iden3message for credential onchain offer
type CredentialsOnchainOfferMessageBody ¶ added in v2.3.0
type CredentialsOnchainOfferMessageBody struct {
Credentials []CredentialOffer `json:"credentials"`
TransactionData TransactionData `json:"transaction_data"`
}
CredentialsOnchainOfferMessageBody is struct the represents onchain offer message
type CredentialsProposalBody ¶ added in v2.3.0
type CredentialsProposalBody struct {
Proposals []CredentialProposalInfo `json:"proposals"`
}
CredentialsProposalBody is a body for a credential proposal message
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialsProposalMessage ¶ added in v2.3.0
type CredentialsProposalMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body CredentialsProposalBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialsProposalMessage represents Iden3message for credential proposal
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialsProposalRequestBody ¶ added in v2.3.0
type CredentialsProposalRequestBody struct {
Credentials []CredentialInfo `json:"credentials"`
Metadata *Metadata `json:"metadata,omitempty"`
DIDDoc json.RawMessage `json:"did_doc,omitempty"`
}
CredentialsProposalRequestBody is msg body for proposal requests
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type CredentialsProposalRequestMessage ¶ added in v2.3.0
type CredentialsProposalRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body CredentialsProposalRequestBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
CredentialsProposalRequestMessage represent Iden3message for credential proposal request
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type DeviceRegistrationRequestMessage ¶
type DeviceRegistrationRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body DeviceRegistrationRequestMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
DeviceRegistrationRequestMessage represent Iden3message for register device request
type DeviceRegistrationRequestMessageBody ¶
type DeviceRegistrationRequestMessageBody struct {
AppID string `json:"app_id"`
PushToken string `json:"push_token"`
}
DeviceRegistrationRequestMessageBody is struct the represents body for register device request request
type DiscoverFeatureDiscloseMessage ¶ added in v2.10.0
type DiscoverFeatureDiscloseMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body DiscoverFeatureDiscloseMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
}
DiscoverFeatureDiscloseMessage represents discover feature disclose message.
type DiscoverFeatureDiscloseMessageBody ¶ added in v2.10.0
type DiscoverFeatureDiscloseMessageBody struct {
Disclosures []DiscoverFeatureDisclosure `json:"disclosures"`
}
DiscoverFeatureDiscloseMessageBody represents the body of the DiscoverFeatureDiscloseMessage.
type DiscoverFeatureDisclosure ¶ added in v2.10.0
type DiscoverFeatureDisclosure struct {
FeatureType DiscoveryProtocolFeatureType `json:"feature-type"`
ID string `json:"id"`
}
DiscoverFeatureDisclosure represents discover feature disclosure.
type DiscoverFeatureQueriesMessage ¶ added in v2.10.0
type DiscoverFeatureQueriesMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body DiscoverFeatureQueriesMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
}
DiscoverFeatureQueriesMessage represents discover feature queries message.
type DiscoverFeatureQueriesMessageBody ¶ added in v2.10.0
type DiscoverFeatureQueriesMessageBody struct {
Queries []DiscoverFeatureQuery `json:"queries"`
}
DiscoverFeatureQueriesMessageBody represents the body of the DiscoverFeatureQueriesMessage.
type DiscoverFeatureQuery ¶ added in v2.10.0
type DiscoverFeatureQuery struct {
FeatureType DiscoveryProtocolFeatureType `json:"feature-type"`
Match string `json:"match,omitempty"`
}
DiscoverFeatureQuery represents discover feature query.
type DiscoveryProtocolFeatureType ¶ added in v2.10.0
type DiscoveryProtocolFeatureType string
DiscoveryProtocolFeatureType is type for query feature-type.
const ( // DiscoveryProtocolFeatureTypeAccept is "accept" type for query feature-type. DiscoveryProtocolFeatureTypeAccept DiscoveryProtocolFeatureType = "accept" // DiscoveryProtocolFeatureTypeProtocol is "protocol" type for query feature-type. DiscoveryProtocolFeatureTypeProtocol DiscoveryProtocolFeatureType = "protocol" // DiscoveryProtocolFeatureTypeGoalCode is "goal-code" type for query feature-type. DiscoveryProtocolFeatureTypeGoalCode DiscoveryProtocolFeatureType = "goal-code" // DiscoveryProtocolFeatureTypeHeader is "header" type for query feature-type. DiscoveryProtocolFeatureTypeHeader DiscoveryProtocolFeatureType = "header" )
type Eip712Data ¶ added in v2.8.0
type Eip712Data struct {
Types string `json:"types"`
PrimaryType string `json:"primaryType"`
Domain Eip712Domain `json:"domain"`
}
Eip712Data represents the EIP712 data.
type Eip712Domain ¶ added in v2.8.0
type Eip712Domain struct {
Name string `json:"name"`
Version string `json:"version"`
ChainID string `json:"chainId"`
VerifyingContract string `json:"verifyingContract"`
}
Eip712Domain represents the EIP712 domain.
type EncryptedCredentialIssuanceMessage ¶ added in v2.11.6
type EncryptedCredentialIssuanceMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body EncryptedIssuanceMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
EncryptedCredentialIssuanceMessage represent Iden3message for encrypted credential issuance
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type EncryptedIssuanceMessageBody ¶ added in v2.11.6
type EncryptedIssuanceMessageBody struct {
ID string `json:"id"`
Data JWEJSONEncryption `json:"data"`
Type string `json:"type"`
Context string `json:"context"`
Proof verifiable.CredentialProofs `json:"proof,omitempty"`
}
EncryptedIssuanceMessageBody is struct the represents message when credential is issued and encrypted
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type EthereumEip712Signature2021 ¶ added in v2.8.0
type EthereumEip712Signature2021 struct {
Type verifiable.ProofType `json:"type"`
ProofPurpose string `json:"proofPurpose"`
ProofValue string `json:"proofValue"`
VerificationMethod string `json:"verificationMethod"`
Created string `json:"created"`
Eip712 Eip712Data `json:"eip712"`
}
EthereumEip712Signature2021 represents the Ethereum EIP712 signature.
func (EthereumEip712Signature2021) PaymentProofItem ¶ added in v2.9.0
func (e EthereumEip712Signature2021) PaymentProofItem() verifiable.ProofType
PaymentProofItem implements the PaymentProofItem interface.
type Iden3PaymentCryptoV1 ¶ added in v2.8.0
type Iden3PaymentCryptoV1 struct {
ID string `json:"id"`
Type PaymentType `json:"type"`
Context PaymentContext `json:"@context,omitempty"`
PaymentData struct {
TxID string `json:"txId"`
} `json:"paymentData"`
}
Iden3PaymentCryptoV1 represents the Iden3PaymentCryptoV1 payment data.
type Iden3PaymentRailsERC20RequestV1 ¶ added in v2.8.0
type Iden3PaymentRailsERC20RequestV1 struct {
Nonce string `json:"nonce"`
Type PaymentRequestType `json:"type"`
Context PaymentContext `json:"@context"`
Recipient string `json:"recipient"`
Amount string `json:"amount"` // Not negative number
ExpirationDate string `json:"expirationDate"`
Proof PaymentProof `json:"proof"`
Metadata string `json:"metadata"`
TokenAddress string `json:"tokenAddress"`
Features []PaymentFeatures `json:"features,omitempty"`
}
Iden3PaymentRailsERC20RequestV1 represents the Iden3PaymentRailsERC20RequestV1 payment request data.
func (Iden3PaymentRailsERC20RequestV1) PaymentRequestType ¶ added in v2.9.0
func (i Iden3PaymentRailsERC20RequestV1) PaymentRequestType() PaymentRequestType
PaymentRequestType implements the PaymentRequestInfoDataItem interface.
type Iden3PaymentRailsERC20V1 ¶ added in v2.8.0
type Iden3PaymentRailsERC20V1 struct {
Nonce string `json:"nonce"`
Type PaymentType `json:"type"`
Context PaymentContext `json:"@context,omitempty"`
PaymentData struct {
TxID string `json:"txId"`
ChainID string `json:"chainId"`
TokenAddress string `json:"tokenAddress"`
} `json:"paymentData"`
}
Iden3PaymentRailsERC20V1 represents the Iden3PaymentRailsERC20V1 payment data.
type Iden3PaymentRailsRequestV1 ¶ added in v2.8.0
type Iden3PaymentRailsRequestV1 struct {
Nonce string `json:"nonce"`
Type PaymentRequestType `json:"type"`
Context PaymentContext `json:"@context"`
Recipient string `json:"recipient"`
Amount string `json:"amount"` // Not negative number
ExpirationDate string `json:"expirationDate"`
Proof PaymentProof `json:"proof"`
Metadata string `json:"metadata"`
}
Iden3PaymentRailsRequestV1 represents the Iden3PaymentRailsRequestV1 payment request data.
func (Iden3PaymentRailsRequestV1) PaymentRequestType ¶ added in v2.9.0
func (i Iden3PaymentRailsRequestV1) PaymentRequestType() PaymentRequestType
PaymentRequestType implements the PaymentRequestInfoDataItem interface.
type Iden3PaymentRailsSolanaRequestV1 ¶ added in v2.11.2
type Iden3PaymentRailsSolanaRequestV1 struct {
Nonce string `json:"nonce"`
Type PaymentRequestType `json:"type"`
Context PaymentContext `json:"@context"`
Recipient string `json:"recipient"`
Amount string `json:"amount"` // Not negative number
ExpirationDate string `json:"expirationDate"`
Proof PaymentProof `json:"proof"`
Metadata string `json:"metadata"`
}
Iden3PaymentRailsSolanaRequestV1 represents the Iden3PaymentRailsSolanaRequestV1 payment request data.
func (Iden3PaymentRailsSolanaRequestV1) PaymentRequestType ¶ added in v2.11.2
func (i Iden3PaymentRailsSolanaRequestV1) PaymentRequestType() PaymentRequestType
PaymentRequestType implements the PaymentRequestInfoDataItem interface.
type Iden3PaymentRailsSolanaSPLRequestV1 ¶ added in v2.11.2
type Iden3PaymentRailsSolanaSPLRequestV1 struct {
Nonce string `json:"nonce"`
Type PaymentRequestType `json:"type"`
Context PaymentContext `json:"@context"`
Recipient string `json:"recipient"`
Amount string `json:"amount"` // Not negative number
ExpirationDate string `json:"expirationDate"`
Proof PaymentProof `json:"proof"`
Metadata string `json:"metadata"`
TokenAddress string `json:"tokenAddress"`
Features []PaymentFeatures `json:"features,omitempty"`
}
Iden3PaymentRailsSolanaSPLRequestV1 represents the Iden3PaymentRailsSolanaSPLRequestV1 payment request data.
func (Iden3PaymentRailsSolanaSPLRequestV1) PaymentRequestType ¶ added in v2.11.2
func (i Iden3PaymentRailsSolanaSPLRequestV1) PaymentRequestType() PaymentRequestType
PaymentRequestType implements the PaymentRequestInfoDataItem interface.
type Iden3PaymentRailsSolanaSPLV1 ¶ added in v2.11.2
type Iden3PaymentRailsSolanaSPLV1 Iden3PaymentRailsERC20V1
Iden3PaymentRailsSolanaSPLV1 represents the Iden3PaymentRailsSolanaSPLV1 payment data.
type Iden3PaymentRailsSolanaV1 ¶ added in v2.11.2
type Iden3PaymentRailsSolanaV1 Iden3PaymentRailsV1
Iden3PaymentRailsSolanaV1 represents the Iden3PaymentRailsSolanaV1 payment data.
type Iden3PaymentRailsV1 ¶ added in v2.8.0
type Iden3PaymentRailsV1 struct {
Nonce string `json:"nonce"`
Type PaymentType `json:"type"`
Context PaymentContext `json:"@context,omitempty"`
PaymentData struct {
TxID string `json:"txId"`
ChainID string `json:"chainId"`
} `json:"paymentData"`
}
Iden3PaymentRailsV1 represents the Iden3PaymentRailsV1 payment data.
type Iden3PaymentRequestCryptoV1 ¶ added in v2.8.0
type Iden3PaymentRequestCryptoV1 struct {
Type PaymentRequestType `json:"type"`
ID string `json:"id"`
Context string `json:"@context,omitempty"`
ChainID string `json:"chainId"`
Address string `json:"address"`
Amount string `json:"amount"`
Currency string `json:"currency"`
Expiration string `json:"expiration,omitempty"`
}
Iden3PaymentRequestCryptoV1 represents the Iden3PaymentRequestCryptoV1 payment request data.
func (Iden3PaymentRequestCryptoV1) PaymentRequestType ¶ added in v2.9.0
func (i Iden3PaymentRequestCryptoV1) PaymentRequestType() PaymentRequestType
PaymentRequestType implements the PaymentRequestInfoDataItem interface.
type IssuanceMessageBody ¶
type IssuanceMessageBody struct {
Credential verifiable.W3CCredential `json:"credential"`
}
IssuanceMessageBody is struct the represents message when credential is issued
type JWEJSONEncryption ¶ added in v2.11.6
type JWEJSONEncryption struct {
Protected string `json:"protected,omitempty"`
Unprotected string `json:"unprotected,omitempty"`
Header map[string]interface{} `json:"header,omitempty"`
Recipients []map[string]interface{} `json:"recipients,omitempty"`
Aad string `json:"aad,omitempty"`
EncryptedKey string `json:"encrypted_key,omitempty"`
Iv string `json:"iv,omitempty"`
Ciphertext string `json:"ciphertext,omitempty"`
Tag string `json:"tag,omitempty"`
}
JWEJSONEncryption is a structure representing JWE object
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type JwsAlgorithms ¶ added in v2.10.0
type JwsAlgorithms string
JwsAlgorithms is a type of accepted JWS algorithms
const ( // JwsAlgorithmsES256K is a ES256K accepted JWS algorithm JwsAlgorithmsES256K JwsAlgorithms = "ES256K" // JwsAlgorithmsES256KR is a ES256K-R accepted JWS algorithm JwsAlgorithmsES256KR JwsAlgorithms = "ES256K-R" )
type JwzAlgorithms ¶ added in v2.10.0
type JwzAlgorithms string
JwzAlgorithms is a type of accepted proving algorithms
const ( // JwzAlgorithmsGroth16 is a groth16 accepted proving algorithm JwzAlgorithmsGroth16 JwzAlgorithms = "groth16" )
type MessageFetchRequestMessage ¶
type MessageFetchRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body MessageFetchRequestMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
MessageFetchRequestMessage represent Iden3message for message fetch request.
type MessageFetchRequestMessageBody ¶
type MessageFetchRequestMessageBody struct {
ID string `json:"id"`
}
MessageFetchRequestMessageBody is struct the represents body for message fetch request.
type Metadata ¶ added in v2.3.0
Metadata is metadata for credential proposal
Experimental ¶
Notice: this functionality is in beta and can be deleted or be non-backward compatible in the future releases.
type OnchainZeroKnowledgeProofResponse ¶ added in v2.10.1
type OnchainZeroKnowledgeProofResponse struct {
ZeroKnowledgeProofResponse
TxHash string `json:"txHash"`
}
OnchainZeroKnowledgeProofResponse represents structure of zkp response given for onchain verification
func (OnchainZeroKnowledgeProofResponse) MarshalJSON ¶ added in v2.11.0
func (r OnchainZeroKnowledgeProofResponse) MarshalJSON() ([]byte, error)
MarshalJSON marshals protocol request message with typed body and basic structure
type Payment ¶ added in v2.8.0
type Payment struct {
// contains filtered or unexported fields
}
Payment is a union type for field Payments in PaymentMessageBody. Only one of the fields can be set at a time.
func NewPaymentCrypto ¶ added in v2.8.0
func NewPaymentCrypto(data Iden3PaymentCryptoV1) Payment
NewPaymentCrypto creates a new Payment with Iden3PaymentCryptoV1 data.
func NewPaymentRails ¶ added in v2.8.0
func NewPaymentRails(data Iden3PaymentRailsV1) Payment
NewPaymentRails creates a new Payment with Iden3PaymentRailsV1 data.
func NewPaymentRailsERC20 ¶ added in v2.9.0
func NewPaymentRailsERC20(data Iden3PaymentRailsERC20V1) Payment
NewPaymentRailsERC20 creates a new Payment with Iden3PaymentRailsERC20V1 data.
func NewPaymentRailsSolana ¶ added in v2.11.2
func NewPaymentRailsSolana(data Iden3PaymentRailsSolanaV1) Payment
NewPaymentRailsSolana creates a new Payment with Iden3PaymentRailsSolanaV1 data.
func NewPaymentRailsSolanaSPL ¶ added in v2.11.2
func NewPaymentRailsSolanaSPL(data Iden3PaymentRailsSolanaSPLV1) Payment
NewPaymentRailsSolanaSPL creates a new Payment with Iden3PaymentRailsSolanaSPLV1 data.
func (*Payment) Data ¶ added in v2.8.0
func (p *Payment) Data() interface{}
Data returns the data in the union. You can use Type() to determine the type of the data.
func (Payment) MarshalJSON ¶ added in v2.8.0
MarshalJSON marshals the Payment into JSON.
func (*Payment) Type ¶ added in v2.8.0
func (p *Payment) Type() PaymentType
Type returns the type of the data in the union. You can use Data() to get the data.
func (*Payment) UnmarshalJSON ¶ added in v2.8.0
UnmarshalJSON unmarshal the Payment from JSON.
type PaymentContext ¶ added in v2.8.0
type PaymentContext struct {
// contains filtered or unexported fields
}
PaymentContext represents the payment context.
func NewPaymentContextItemCol ¶ added in v2.8.0
func NewPaymentContextItemCol(itemCol ...interface{}) PaymentContext
NewPaymentContextItemCol creates a new PaymentContext with an interface{} collection.
func NewPaymentContextString ¶ added in v2.8.0
func NewPaymentContextString(str ...string) PaymentContext
NewPaymentContextString creates a new PaymentContext with a string.
func (PaymentContext) Data ¶ added in v2.8.0
func (p PaymentContext) Data() interface{}
Data returns the data in the union.
func (PaymentContext) MarshalJSON ¶ added in v2.8.0
func (p PaymentContext) MarshalJSON() ([]byte, error)
MarshalJSON marshals the PaymentContext into JSON.
func (*PaymentContext) UnmarshalJSON ¶ added in v2.8.0
func (p *PaymentContext) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshal the PaymentContext from JSON.
type PaymentFeatures ¶ added in v2.8.0
type PaymentFeatures string
PaymentFeatures represents type Features used in ERC20 payment request.
type PaymentMessage ¶ added in v2.8.0
type PaymentMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body PaymentMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
PaymentMessage represents Iden3message for payment.
type PaymentMessageBody ¶ added in v2.8.0
type PaymentMessageBody struct {
Payments []Payment `json:"payments"`
}
PaymentMessageBody represents the body of the PaymentMessage.
type PaymentProof ¶ added in v2.8.0
type PaymentProof []PaymentProofItem
PaymentProof represents a payment proof.
func (PaymentProof) MarshalJSON ¶ added in v2.8.0
func (p PaymentProof) MarshalJSON() ([]byte, error)
MarshalJSON marshals the PaymentProof into JSON.
func (*PaymentProof) UnmarshalJSON ¶ added in v2.8.0
func (p *PaymentProof) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshal the PaymentRequestInfoData from JSON.
type PaymentProofItem ¶ added in v2.9.0
type PaymentProofItem interface {
PaymentProofItem() verifiable.ProofType
}
PaymentProofItem is the interface that any PaymentProof item must implement.
type PaymentRequestInfo ¶ added in v2.8.0
type PaymentRequestInfo struct {
Credentials []PaymentRequestInfoCredentials `json:"credentials"`
Description string `json:"description"`
Data PaymentRequestInfoData `json:"data"`
}
PaymentRequestInfo represents the payments request information.
type PaymentRequestInfoCredentials ¶ added in v2.8.0
type PaymentRequestInfoCredentials struct {
Context string `json:"context,omitempty"`
Type string `json:"type,omitempty"`
}
PaymentRequestInfoCredentials represents the payment request credentials.
type PaymentRequestInfoData ¶ added in v2.8.0
type PaymentRequestInfoData []PaymentRequestInfoDataItem
PaymentRequestInfoData is a union type for field Data in PaymentRequestInfo.
func (PaymentRequestInfoData) MarshalJSON ¶ added in v2.8.0
func (p PaymentRequestInfoData) MarshalJSON() ([]byte, error)
MarshalJSON marshals the PaymentRequestInfoData into JSON.
func (*PaymentRequestInfoData) UnmarshalJSON ¶ added in v2.8.0
func (p *PaymentRequestInfoData) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshal the PaymentRequestInfoData from JSON.
type PaymentRequestInfoDataItem ¶ added in v2.9.0
type PaymentRequestInfoDataItem interface {
PaymentRequestType() PaymentRequestType
}
PaymentRequestInfoDataItem is the interface that any PaymentRequestInfoData.Data item must implement.
type PaymentRequestMessage ¶ added in v2.8.0
type PaymentRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body PaymentRequestMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
PaymentRequestMessage represents Iden3message for payment request.
type PaymentRequestMessageBody ¶ added in v2.8.0
type PaymentRequestMessageBody struct {
Agent string `json:"agent"`
Payments []PaymentRequestInfo `json:"payments"`
}
PaymentRequestMessageBody represents the body of the PaymentRequestMessage.
type PaymentRequestType ¶ added in v2.8.0
type PaymentRequestType string
PaymentRequestType is type for Payment request
type ProblemErrorCode ¶ added in v2.3.1
type ProblemErrorCode string
ProblemErrorCode is a string that represents an error code "e.p.xxxx.yyyy.zzzz"
func NewProblemReportErrorCode ¶ added in v2.3.1
func NewProblemReportErrorCode(sorter, scope string, descriptors []string) (ProblemErrorCode, error)
NewProblemReportErrorCode is a helper function to create a valid ProblemErrorCode
func ParseProblemErrorCode ¶ added in v2.3.1
func ParseProblemErrorCode(s string) (ProblemErrorCode, error)
ParseProblemErrorCode parses a string into a ProblemErrorCode. Useful to validate strings from external sources
type ProblemReportMessage ¶ added in v2.3.1
type ProblemReportMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
ParentThreadID string `json:"pthid"`
Ack []string `json:"ack,omitempty"`
Body ProblemReportMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
ProblemReportMessage represent Iden3Message for problem report
type ProblemReportMessageBody ¶ added in v2.3.1
type ProblemReportMessageBody struct {
Code ProblemErrorCode `json:"code"`
Comment string `json:"comment,omitempty"`
Args []string `json:"args,omitempty"`
EscalateTo string `json:"escalate_to,omitempty"`
}
ProblemReportMessageBody is struct the represents body for problem report Code is an error code. Example Comment is a human-readable description of the problem. Directly related to the error code. Args is a list of strings that can be used to replace placeholders in the error message. EscalateTo is a string that can be used to escalate the problem to a human operator. It can be an email
type ProofGenerationRequestMessage ¶
type ProofGenerationRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body ProofGenerationRequestMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
ProofGenerationRequestMessage is struct the represents body for proof generation request
type ProofGenerationRequestMessageBody ¶
type ProofGenerationRequestMessageBody struct {
Scope []ZeroKnowledgeProofRequest `json:"scope"`
}
ProofGenerationRequestMessageBody is struct the represents body for proof generation request
type ProofGenerationResponseMessage ¶
type ProofGenerationResponseMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body ResponseMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
ProofGenerationResponseMessage is struct the represents body for proof generation request
type ResponseMessageBody ¶
type ResponseMessageBody struct {
Scope []ZeroKnowledgeProofResponse `json:"scope"`
}
ResponseMessageBody is struct the represents request for revocation status
type RevocationStatusRequestMessage ¶
type RevocationStatusRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body RevocationStatusRequestMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
RevocationStatusRequestMessage is struct the represents body for proof generation request
type RevocationStatusRequestMessageBody ¶
type RevocationStatusRequestMessageBody struct {
RevocationNonce uint64 `json:"revocation_nonce"`
}
RevocationStatusRequestMessageBody is struct the represents request for revocation status
type RevocationStatusResponseMessage ¶
type RevocationStatusResponseMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body RevocationStatusResponseMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
CreatedTime *int64 `json:"created_time,omitempty"`
ExpiresTime *int64 `json:"expires_time,omitempty"`
Attachments []iden3comm.Attachment `json:"attachments,omitempty"`
}
RevocationStatusResponseMessage is struct the represents body for proof generation request
type RevocationStatusResponseMessageBody ¶
type RevocationStatusResponseMessageBody struct {
verifiable.RevocationStatus
}
RevocationStatusResponseMessageBody is struct the represents request for revocation status
type Schema ¶
type Schema struct {
Hash string `json:"hash,omitempty"`
URL string `json:"url"`
Type string `json:"type"`
}
Schema represents location and type where it's stored
type SolanaEd25519Domain ¶ added in v2.11.2
type SolanaEd25519Domain struct {
Version string `json:"version"`
ChainID string `json:"chainId"`
VerifyingContract string `json:"verifyingContract"`
}
SolanaEd25519Domain represents the Solana EIP712 domain.
type SolanaEd25519Signature2025 ¶ added in v2.11.2
type SolanaEd25519Signature2025 struct {
Type verifiable.ProofType `json:"type"`
ProofPurpose string `json:"proofPurpose"`
ProofValue string `json:"proofValue"`
VerificationMethod string `json:"verificationMethod"`
Created string `json:"created"`
Domain SolanaEd25519Domain `json:"domain"`
}
SolanaEd25519Signature2025 represents represents Ed25519 signature for Solana Payment Instruction.
func (SolanaEd25519Signature2025) PaymentProofItem ¶ added in v2.11.2
func (e SolanaEd25519Signature2025) PaymentProofItem() verifiable.ProofType
PaymentProofItem implements the PaymentProofItem interface.
type TransactionData ¶
type TransactionData struct {
ContractAddress string `json:"contract_address"`
MethodID string `json:"method_id"`
ChainID int `json:"chain_id"`
Network string `json:"network"`
}
TransactionData represents structure for on chain verification
type Version ¶ added in v2.10.0
type Version string
Version is a type of supported versions of the protocol used in the accept header
const ( // Iden3CommVersion1 is a V1 version of the protocol used in the accept header Iden3CommVersion1 Version = "iden3comm/v1" )
type ZeroKnowledgeProofRequest ¶
type ZeroKnowledgeProofRequest struct {
ID uint32
CircuitID string
Params map[string]interface{}
Optional *bool
Query map[string]interface{}
ExtendedID *big.Int
}
ZeroKnowledgeProofRequest represents structure of zkp request object
func (ZeroKnowledgeProofRequest) MarshalJSON ¶ added in v2.11.0
func (r ZeroKnowledgeProofRequest) MarshalJSON() ([]byte, error)
MarshalJSON - marshals the protocol zero-knowledge proof request depending on ID or ExtendedID value
func (*ZeroKnowledgeProofRequest) UnmarshalJSON ¶ added in v2.11.0
func (r *ZeroKnowledgeProofRequest) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarhaler
type ZeroKnowledgeProofResponse ¶
type ZeroKnowledgeProofResponse struct {
ID uint32
ExtendedID *big.Int
CircuitID string
VerifiablePresentation json.RawMessage
types.ZKProof
}
ZeroKnowledgeProofResponse represents structure of zkp response
func (ZeroKnowledgeProofResponse) MarshalJSON ¶ added in v2.11.0
func (r ZeroKnowledgeProofResponse) MarshalJSON() ([]byte, error)
MarshalJSON - marshals the protocol zero-knowledge proof response depending on ID or ExtendedID value
func (*ZeroKnowledgeProofResponse) UnmarshalJSON ¶ added in v2.11.0
func (r *ZeroKnowledgeProofResponse) UnmarshalJSON(bytes []byte) error
UnmarshalJSON unmarhaler