protocol

package
v2.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0, MIT Imports: 6 Imported by: 3

Documentation

Overview

Package protocol defines core protocol messages

Index

Constants

View Source
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"
)
View Source
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"
)
View Source
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"
)
View Source
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"
)
View Source
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"
)
View Source
const (
	// ContractInvokeRequestMessageType defines contract invoke request type of the communication protocol
	ContractInvokeRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "proofs/1.0/contract-invoke-request"
)
View Source
const (
	// DeviceRegistrationRequestMessageType defines device registration request type of the communication protocol
	DeviceRegistrationRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "devices/1.0/registration"
)
View Source
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 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"`
}

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"`
}

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"`
}

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"`
}

ContractInvokeRequestMessage is struct the represents iden3message contract invoke request

type ContractInvokeRequestMessageBody

type ContractInvokeRequestMessageBody struct {
	Reason          string                      `json:"reason,omitempty"`
	Message         string                      `json:"message,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 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"`
}

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

type CredentialInfo struct {
	Type    string `json:"type"`
	Context string `json:"context"`
}

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"`
}

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"`
}

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 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"`
}

CredentialRefreshMessage represent Iden3message for credential refresh message

type CredentialRefreshMessageBody added in v2.1.0

type CredentialRefreshMessageBody struct {
	ID     string `json:"id"`
	Reason string `json:"reason"`
}

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"`
}

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"`
}

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"`
}

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"`
}

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"`
}

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"`
}

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 IssuanceMessageBody

type IssuanceMessageBody struct {
	Credential verifiable.W3CCredential `json:"credential"`
}

IssuanceMessageBody is struct the represents message when credential is issued

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"`
}

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

type Metadata struct {
	Type string `json:"type"`
	Data string `json:"data"`
}

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 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"`
}

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"`
}

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"`
}

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"`
}

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"`
}

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 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 ZeroKnowledgeProofRequest

type ZeroKnowledgeProofRequest struct {
	ID        uint32                 `json:"id"` // unique request id
	CircuitID string                 `json:"circuitId"`
	Params    map[string]interface{} `json:"params,omitempty"`
	Optional  *bool                  `json:"optional,omitempty"`
	Query     map[string]interface{} `json:"query"`
}

ZeroKnowledgeProofRequest represents structure of zkp request object

type ZeroKnowledgeProofResponse

type ZeroKnowledgeProofResponse struct {
	ID                     uint32          `json:"id"` // unique id to present unique proof request
	CircuitID              string          `json:"circuitId"`
	VerifiablePresentation json.RawMessage `json:"vp,omitempty"`
	types.ZKProof
}

ZeroKnowledgeProofResponse represents structure of zkp response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL