Documentation ¶
Index ¶
- Constants
- type AcceptPresentationArgs
- type AcceptPresentationResponse
- type AcceptProblemReportArgs
- type AcceptProblemReportResponse
- type AcceptProposePresentationArgs
- type AcceptProposePresentationResponse
- type AcceptProposePresentationV2Args
- type AcceptProposePresentationV3Args
- type AcceptRequestPresentationArgs
- type AcceptRequestPresentationResponse
- type AcceptRequestPresentationV2Args
- type AcceptRequestPresentationV3Args
- type ActionsResponse
- type Command
- func (c *Command) AcceptPresentation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) AcceptProblemReport(rw io.Writer, req io.Reader) command.Error
- func (c *Command) AcceptProposePresentation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) AcceptRequestPresentation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) Actions(rw io.Writer, _ io.Reader) command.Error
- func (c *Command) DeclinePresentation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) DeclineProposePresentation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) DeclineRequestPresentation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) GetHandlers() []command.Handler
- func (c *Command) NegotiateRequestPresentation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) SendProposePresentation(rw io.Writer, req io.Reader) command.Error
- func (c *Command) SendRequestPresentation(rw io.Writer, req io.Reader) command.Error
- type DeclinePresentationArgs
- type DeclinePresentationResponse
- type DeclineProposePresentationArgs
- type DeclineProposePresentationResponse
- type DeclineRequestPresentationArgs
- type DeclineRequestPresentationResponse
- type NegotiateRequestPresentationArgs
- type NegotiateRequestPresentationResponse
- type NegotiateRequestPresentationV2Args
- type NegotiateRequestPresentationV3Args
- type Provider
- type SendProposePresentationArgs
- type SendProposePresentationResponse
- type SendProposePresentationV2Args
- type SendProposePresentationV3Args
- type SendRequestPresentationArgs
- type SendRequestPresentationResponse
- type SendRequestPresentationV2Args
- type SendRequestPresentationV3Args
Constants ¶
const ( // InvalidRequestErrorCode is typically a code for validation errors // for invalid present proof controller requests. InvalidRequestErrorCode = command.Code(iota + command.PresentProof) // ActionsErrorCode is for failures in actions command. ActionsErrorCode // SendRequestPresentationErrorCode is for failures in send request presentation command. SendRequestPresentationErrorCode // AcceptRequestPresentationErrorCode is for failures in accept request presentation command. AcceptRequestPresentationErrorCode // AcceptProblemReportErrorCode is for failures in accept problem report command. AcceptProblemReportErrorCode // NegotiateRequestPresentationErrorCode is for failures in negotiate request presentation command. NegotiateRequestPresentationErrorCode // DeclineRequestPresentationErrorCode is for failures in decline request presentation command. DeclineRequestPresentationErrorCode // SendProposePresentationErrorCode is for failures in send propose presentation command. SendProposePresentationErrorCode // AcceptProposePresentationErrorCode is for failures in accept propose presentation command. AcceptProposePresentationErrorCode // DeclineProposePresentationErrorCode is for failures in decline propose presentation command. DeclineProposePresentationErrorCode // AcceptPresentationErrorCode is for failures in accept presentation command. AcceptPresentationErrorCode // DeclinePresentationErrorCode is for failures in decline presentation command. DeclinePresentationErrorCode )
const ( // command name. CommandName = "presentproof" Actions = "Actions" SendRequestPresentation = "SendRequestPresentation" SendRequestPresentationV2 = "SendRequestPresentationV2" SendRequestPresentationV3 = "SendRequestPresentationV3" AcceptRequestPresentation = "AcceptRequestPresentation" AcceptRequestPresentationV2 = "AcceptRequestPresentationV2" AcceptRequestPresentationV3 = "AcceptRequestPresentationV3" NegotiateRequestPresentation = "NegotiateRequestPresentation" NegotiateRequestPresentationV2 = "NegotiateRequestPresentationV2" NegotiateRequestPresentationV3 = "NegotiateRequestPresentationV3" AcceptProblemReport = "AcceptProblemReport" DeclineRequestPresentation = "DeclineRequestPresentation" SendProposePresentation = "SendProposePresentation" SendProposePresentationV2 = "SendProposePresentationV2" SendProposePresentationV3 = "SendProposePresentationV3" AcceptProposePresentation = "AcceptProposePresentation" AcceptProposePresentationV2 = "AcceptProposePresentationV2" AcceptProposePresentationV3 = "AcceptProposePresentationV3" DeclineProposePresentation = "DeclineProposePresentation" AcceptPresentation = "AcceptPresentation" DeclinePresentation = "DeclinePresentation" )
constants for the PresentProof operations.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptPresentationArgs ¶
type AcceptPresentationArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Names represent the names of how presentations will be stored Names []string `json:"names"` // RedirectURL is optional web redirect URL that can be sent to prover. // Useful in cases where verifier would want prover to redirect once protocol is over. RedirectURL string `json:"redirectURL"` }
AcceptPresentationArgs model
This is used for accepting a presentation.
type AcceptPresentationResponse ¶
type AcceptPresentationResponse struct{}
AcceptPresentationResponse model
Represents a AcceptPresentation response message.
type AcceptProblemReportArgs ¶ added in v0.1.4
type AcceptProblemReportArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` }
AcceptProblemReportArgs model
This is used for accepting a problem report.
type AcceptProblemReportResponse ¶ added in v0.1.4
type AcceptProblemReportResponse struct{}
AcceptProblemReportResponse model
Represents a AcceptProblemReport response message.
type AcceptProposePresentationArgs ¶
type AcceptProposePresentationArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // RequestPresentation describes values that need to be revealed and predicates that need to be fulfilled. RequestPresentation *presentproof.RequestPresentation `json:"request_presentation"` }
AcceptProposePresentationArgs model
This is used for accepting a propose presentation.
type AcceptProposePresentationResponse ¶
type AcceptProposePresentationResponse struct{}
AcceptProposePresentationResponse model
Represents a AcceptProposePresentation response message.
type AcceptProposePresentationV2Args ¶ added in v0.1.8
type AcceptProposePresentationV2Args struct { // PIID Protocol instance ID PIID string `json:"piid"` // RequestPresentation describes values that need to be revealed and predicates that need to be fulfilled. RequestPresentation *presentproof.RequestPresentationV2 `json:"request_presentation"` }
AcceptProposePresentationV2Args model
This is used for accepting a propose presentation.
type AcceptProposePresentationV3Args ¶ added in v0.1.7
type AcceptProposePresentationV3Args struct { // PIID Protocol instance ID PIID string `json:"piid"` // RequestPresentation describes values that need to be revealed and predicates that need to be fulfilled. RequestPresentation *presentproof.RequestPresentationV3 `json:"request_presentation"` }
AcceptProposePresentationV3Args model
This is used for accepting a propose presentation.
type AcceptRequestPresentationArgs ¶
type AcceptRequestPresentationArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Presentation is a message that contains signed presentations. Presentation *presentproof.Presentation `json:"presentation"` }
AcceptRequestPresentationArgs model
This is used for accepting a request presentation.
type AcceptRequestPresentationResponse ¶
type AcceptRequestPresentationResponse struct{}
AcceptRequestPresentationResponse model
Represents a AcceptRequestPresentation response message.
type AcceptRequestPresentationV2Args ¶ added in v0.1.8
type AcceptRequestPresentationV2Args struct { // PIID Protocol instance ID PIID string `json:"piid"` // Presentation is a message that contains signed presentations. Presentation *presentproof.PresentationV2 `json:"presentation"` }
AcceptRequestPresentationV2Args model
This is used for accepting a request presentation.
type AcceptRequestPresentationV3Args ¶ added in v0.1.7
type AcceptRequestPresentationV3Args struct { // PIID Protocol instance ID PIID string `json:"piid"` // Presentation is a message that contains signed presentations. Presentation *presentproof.PresentationV3 `json:"presentation"` }
AcceptRequestPresentationV3Args model
This is used for accepting a request presentation.
type ActionsResponse ¶
type ActionsResponse struct {
Actions []presentproof.Action `json:"actions"`
}
ActionsResponse model
Represents Actions response message.
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is controller command for present proof.
func (*Command) AcceptPresentation ¶
AcceptPresentation is used by the Verifier to accept a presentation.
func (*Command) AcceptProblemReport ¶ added in v0.1.4
AcceptProblemReport is used for accepting problem report.
func (*Command) AcceptProposePresentation ¶
AcceptProposePresentation is used when the Verifier is willing to accept the propose presentation.
func (*Command) AcceptRequestPresentation ¶
AcceptRequestPresentation is used by the Prover is to accept a presentation request.
func (*Command) Actions ¶
Actions returns pending actions that have not yet to be executed or canceled.
func (*Command) DeclinePresentation ¶
DeclinePresentation is used by the Verifier to decline a presentation.
func (*Command) DeclineProposePresentation ¶
DeclineProposePresentation is used when the Verifier does not want to accept the propose presentation.
func (*Command) DeclineRequestPresentation ¶
DeclineRequestPresentation is used when the Prover does not want to accept the request presentation.
func (*Command) GetHandlers ¶
GetHandlers returns list of all commands supported by this controller command.
func (*Command) NegotiateRequestPresentation ¶
NegotiateRequestPresentation is used by the Prover to counter a presentation request they received with a proposal.
func (*Command) SendProposePresentation ¶
SendProposePresentation is used by the Prover to send a propose presentation.
type DeclinePresentationArgs ¶
type DeclinePresentationArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Reason why presentation is declined Reason string `json:"reason"` // RedirectURL is optional web redirect URL that can be sent to prover. // Useful in cases where verifier would want prover to redirect once presentation is declined. RedirectURL string `json:"redirectURL"` }
DeclinePresentationArgs model
This is used when the presentation needs to be rejected.
type DeclinePresentationResponse ¶
type DeclinePresentationResponse struct{}
DeclinePresentationResponse model
Represents a DeclinePresentation response message.
type DeclineProposePresentationArgs ¶
type DeclineProposePresentationArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Reason why proposal is declined Reason string `json:"reason"` // RedirectURL is optional web redirect URL that can be sent to prover. // Useful in cases where verifier would want prover to redirect after its proposal gets declined. RedirectURL string `json:"redirectURL"` }
DeclineProposePresentationArgs model
This is used when proposal needs to be rejected.
type DeclineProposePresentationResponse ¶
type DeclineProposePresentationResponse struct{}
DeclineProposePresentationResponse model
Represents a DeclineProposePresentation response message.
type DeclineRequestPresentationArgs ¶
type DeclineRequestPresentationArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // Reason why request is declined Reason string `json:"reason"` }
DeclineRequestPresentationArgs model
This is used when the request needs to be rejected.
type DeclineRequestPresentationResponse ¶
type DeclineRequestPresentationResponse struct{}
DeclineRequestPresentationResponse model
Represents a DeclineRequestPresentation response message.
type NegotiateRequestPresentationArgs ¶
type NegotiateRequestPresentationArgs struct { // PIID Protocol instance ID PIID string `json:"piid"` // ProposePresentation is a response message to a request-presentation message when the Prover wants to // propose using a different presentation format. ProposePresentation *presentproof.ProposePresentation `json:"propose_presentation"` }
NegotiateRequestPresentationArgs model
This is used by the Prover to counter a presentation request they received with a proposal.
type NegotiateRequestPresentationResponse ¶
type NegotiateRequestPresentationResponse struct{}
NegotiateRequestPresentationResponse model
Represents a NegotiateRequestPresentation response message.
type NegotiateRequestPresentationV2Args ¶ added in v0.1.8
type NegotiateRequestPresentationV2Args struct { // PIID Protocol instance ID PIID string `json:"piid"` // ProposePresentation is a response message to a request-presentation message when the Prover wants to // propose using a different presentation format. ProposePresentation *presentproof.ProposePresentationV2 `json:"propose_presentation"` }
NegotiateRequestPresentationV2Args model
This is used by the Prover to counter a presentation request they received with a proposal.
type NegotiateRequestPresentationV3Args ¶ added in v0.1.7
type NegotiateRequestPresentationV3Args struct { // PIID Protocol instance ID PIID string `json:"piid"` // ProposePresentation is a response message to a request-presentation message when the Prover wants to // propose using a different presentation format. ProposePresentation *presentproof.ProposePresentationV3 `json:"propose_presentation"` }
NegotiateRequestPresentationV3Args model
This is used by the Prover to counter a presentation request they received with a proposal.
type Provider ¶ added in v0.1.8
type Provider interface { Service(id string) (interface{}, error) ConnectionLookup() *connection.Lookup }
Provider contains dependencies for the protocol and is typically created by using aries.Context().
type SendProposePresentationArgs ¶
type SendProposePresentationArgs struct { // MyDID sender's did MyDID string `json:"my_did"` // TheirDID receiver's did TheirDID string `json:"their_did"` // ConnectionID ID of connection between sender and receiver. // Optional: if present, is used instead of MyDID + TheirDID. ConnectionID string `json:"connection_id"` // ProposePresentation is a message sent by the Prover to the verifier to initiate a proof // presentation process. ProposePresentation *presentproof.ProposePresentation `json:"propose_presentation"` }
SendProposePresentationArgs model
This is used for sending a propose presentation.
type SendProposePresentationResponse ¶
type SendProposePresentationResponse struct { // PIID Protocol instance ID. It can be used as a correlation ID PIID string `json:"piid"` }
SendProposePresentationResponse model
Represents a SendProposePresentation response message.
type SendProposePresentationV2Args ¶ added in v0.1.8
type SendProposePresentationV2Args struct { // MyDID sender's did MyDID string `json:"my_did"` // TheirDID receiver's did TheirDID string `json:"their_did"` // ConnectionID ID of connection between sender and receiver. // Optional: if present, is used instead of MyDID + TheirDID. ConnectionID string `json:"connection_id"` // ProposePresentation is a message sent by the Prover to the verifier to initiate a proof // presentation process. ProposePresentation *presentproof.ProposePresentationV2 `json:"propose_presentation"` }
SendProposePresentationV2Args model
This is used for sending a propose presentation.
type SendProposePresentationV3Args ¶ added in v0.1.7
type SendProposePresentationV3Args struct { // MyDID sender's did MyDID string `json:"my_did"` // TheirDID receiver's did TheirDID string `json:"their_did"` // ConnectionID ID of connection between sender and receiver. // Optional: if present, is used instead of MyDID + TheirDID. ConnectionID string `json:"connection_id"` // ProposePresentation is a message sent by the Prover to the verifier to initiate a proof // presentation process. ProposePresentation *presentproof.ProposePresentationV3 `json:"propose_presentation"` }
SendProposePresentationV3Args model
This is used for sending a propose presentation.
type SendRequestPresentationArgs ¶
type SendRequestPresentationArgs struct { // MyDID sender's did MyDID string `json:"my_did"` // TheirDID receiver's did TheirDID string `json:"their_did"` // ConnectionID ID of connection between sender and receiver. // Optional: if present, is used instead of MyDID + TheirDID. ConnectionID string `json:"connection_id"` // RequestPresentation describes values that need to be revealed and predicates that need to be fulfilled. RequestPresentation *presentproof.RequestPresentation `json:"request_presentation"` }
SendRequestPresentationArgs model
This is used for sending a request presentation.
type SendRequestPresentationResponse ¶
type SendRequestPresentationResponse struct { // PIID Protocol instance ID. It can be used as a correlation ID PIID string `json:"piid"` }
SendRequestPresentationResponse model
Represents a SendRequestPresentation response message.
type SendRequestPresentationV2Args ¶ added in v0.1.8
type SendRequestPresentationV2Args struct { // MyDID sender's did MyDID string `json:"my_did"` // TheirDID receiver's did TheirDID string `json:"their_did"` // ConnectionID ID of connection between sender and receiver. // Optional: if present, is used instead of MyDID + TheirDID. ConnectionID string `json:"connection_id"` // RequestPresentation describes values that need to be revealed and predicates that need to be fulfilled. RequestPresentation *presentproof.RequestPresentationV2 `json:"request_presentation"` }
SendRequestPresentationV2Args model
This is used for sending a request presentation.
type SendRequestPresentationV3Args ¶ added in v0.1.7
type SendRequestPresentationV3Args struct { // MyDID sender's did MyDID string `json:"my_did"` // TheirDID receiver's did TheirDID string `json:"their_did"` // ConnectionID ID of connection between sender and receiver. // Optional: if present, is used instead of MyDID + TheirDID. ConnectionID string `json:"connection_id"` // RequestPresentation describes values that need to be revealed and predicates that need to be fulfilled. RequestPresentation *presentproof.RequestPresentationV3 `json:"request_presentation"` }
SendRequestPresentationV3Args model
This is used for sending a request presentation.