presentproof

package
v0.1.6-0...-5c25bcb Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
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
)
View Source
const (
	// command name.
	CommandName = "presentproof"

	Actions                      = "Actions"
	SendRequestPresentation      = "SendRequestPresentation"
	AcceptRequestPresentation    = "AcceptRequestPresentation"
	NegotiateRequestPresentation = "NegotiateRequestPresentation"
	AcceptProblemReport          = "AcceptProblemReport"
	DeclineRequestPresentation   = "DeclineRequestPresentation"
	SendProposePresentation      = "SendProposePresentation"
	AcceptProposePresentation    = "AcceptProposePresentation"
	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"`
}

AcceptPresentationArgs model

This is used for accepting a presentation

type AcceptPresentationResponse

type AcceptPresentationResponse struct{}

AcceptPresentationResponse model

Represents a AcceptPresentation response message

type AcceptProblemReportArgs

type AcceptProblemReportArgs struct {
	// PIID Protocol instance ID
	PIID string `json:"piid"`
}

AcceptProblemReportArgs model

This is used for accepting a problem report

type AcceptProblemReportResponse

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

func New(ctx presentproof.Provider, notifier command.Notifier) (*Command, error)

New returns new present proof controller command instance.

func (*Command) AcceptPresentation

func (c *Command) AcceptPresentation(rw io.Writer, req io.Reader) command.Error

AcceptPresentation is used by the Verifier to accept a presentation. nolint: dupl

func (*Command) AcceptProblemReport

func (c *Command) AcceptProblemReport(rw io.Writer, req io.Reader) command.Error

AcceptProblemReport is used for accepting problem report. nolint: dupl

func (*Command) AcceptProposePresentation

func (c *Command) AcceptProposePresentation(rw io.Writer, req io.Reader) command.Error

AcceptProposePresentation is used when the Verifier is willing to accept the propose presentation. nolint: dupl

func (*Command) AcceptRequestPresentation

func (c *Command) AcceptRequestPresentation(rw io.Writer, req io.Reader) command.Error

AcceptRequestPresentation is used by the Prover is to accept a presentation request. nolint: dupl

func (*Command) Actions

func (c *Command) Actions(rw io.Writer, _ io.Reader) command.Error

Actions returns pending actions that have not yet to be executed or canceled.

func (*Command) DeclinePresentation

func (c *Command) DeclinePresentation(rw io.Writer, req io.Reader) command.Error

DeclinePresentation is used by the Verifier to decline a presentation. nolint: dupl

func (*Command) DeclineProposePresentation

func (c *Command) DeclineProposePresentation(rw io.Writer, req io.Reader) command.Error

DeclineProposePresentation is used when the Verifier does not want to accept the propose presentation. nolint: dupl

func (*Command) DeclineRequestPresentation

func (c *Command) DeclineRequestPresentation(rw io.Writer, req io.Reader) command.Error

DeclineRequestPresentation is used when the Prover does not want to accept the request presentation. nolint: dupl

func (*Command) GetHandlers

func (c *Command) GetHandlers() []command.Handler

GetHandlers returns list of all commands supported by this controller command.

func (*Command) NegotiateRequestPresentation

func (c *Command) NegotiateRequestPresentation(rw io.Writer, req io.Reader) command.Error

NegotiateRequestPresentation is used by the Prover to counter a presentation request they received with a proposal. nolint: dupl

func (*Command) SendProposePresentation

func (c *Command) SendProposePresentation(rw io.Writer, req io.Reader) command.Error

SendProposePresentation is used by the Prover to send a propose presentation. nolint: dupl

func (*Command) SendRequestPresentation

func (c *Command) SendRequestPresentation(rw io.Writer, req io.Reader) command.Error

SendRequestPresentation is used by the Verifier to send a request presentation. nolint: dupl

type DeclinePresentationArgs

type DeclinePresentationArgs struct {
	// PIID Protocol instance ID
	PIID string `json:"piid"`
	// Reason why presentation is declined
	Reason string `json:"reason"`
}

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

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 SendProposePresentationArgs

type SendProposePresentationArgs struct {
	// MyDID sender's did
	MyDID string `json:"my_did"`
	// TheirDID receiver's did
	TheirDID string `json:"their_did"`
	// 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 SendRequestPresentationArgs

type SendRequestPresentationArgs struct {
	// MyDID sender's did
	MyDID string `json:"my_did"`
	// TheirDID receiver's did
	TheirDID string `json:"their_did"`
	// 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

Jump to

Keyboard shortcuts

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