issuecredential

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithFriendlyNames

func WithFriendlyNames(names ...string) issuecredential.Opt

WithFriendlyNames allows providing names for the credentials. USAGE: This function should be used when the Holder receives IssueCredential message

func WithIssueCredential

func WithIssueCredential(msg *IssueCredential) issuecredential.Opt

WithIssueCredential allows providing IssueCredential message USAGE: This message should be provided after receiving a RequestCredential message

func WithOfferCredential

func WithOfferCredential(msg *OfferCredential) issuecredential.Opt

WithOfferCredential allows providing OfferCredential message USAGE: This message should be provided after receiving a ProposeCredential message

func WithProposeCredential

func WithProposeCredential(msg *ProposeCredential) issuecredential.Opt

WithProposeCredential allows providing ProposeCredential message USAGE: This message should be provided after receiving an OfferCredential message

Types

type Action

type Action issuecredential.Action

Action contains helpful information about action

type Client

type Client struct {
	service.Event
	// contains filtered or unexported fields
}

Client enable access to issuecredential API

func New

func New(ctx Provider) (*Client, error)

New return new instance of the issuecredential client

func (*Client) AcceptCredential

func (c *Client) AcceptCredential(piID string, names ...string) error

AcceptCredential is used when the Holder is willing to accept the IssueCredential. NOTE: For async usage.

func (*Client) AcceptOffer

func (c *Client) AcceptOffer(piID string) error

AcceptOffer is used when the Holder is willing to accept the offer.

func (*Client) AcceptProposal

func (c *Client) AcceptProposal(piID string, msg *OfferCredential) error

AcceptProposal is used when the Issuer is willing to accept the proposal. NOTE: For async usage.

func (*Client) AcceptRequest

func (c *Client) AcceptRequest(piID string, msg *IssueCredential) error

AcceptRequest is used when the Issuer is willing to accept the request. NOTE: For async usage.

func (*Client) Actions

func (c *Client) Actions() ([]Action, error)

Actions returns unfinished actions for the async usage

func (*Client) DeclineCredential

func (c *Client) DeclineCredential(piID, reason string) error

DeclineCredential is used when the Holder does not want to accept the IssueCredential. NOTE: For async usage.

func (*Client) DeclineOffer

func (c *Client) DeclineOffer(piID, reason string) error

DeclineOffer is used when the Holder does not want to accept the offer. NOTE: For async usage.

func (*Client) DeclineProposal

func (c *Client) DeclineProposal(piID, reason string) error

DeclineProposal is used when the Issuer does not want to accept the proposal. NOTE: For async usage.

func (*Client) DeclineRequest

func (c *Client) DeclineRequest(piID, reason string) error

DeclineRequest is used when the Issuer does not want to accept the request. NOTE: For async usage.

func (*Client) NegotiateProposal

func (c *Client) NegotiateProposal(piID string, msg *ProposeCredential) error

NegotiateProposal is used when the Holder wants to negotiate about an offer he received. NOTE: For async usage. This function can be used only after receiving OfferCredential

func (*Client) SendOffer

func (c *Client) SendOffer(offer *OfferCredential, myDID, theirDID string) error

SendOffer is used by the Issuer to send an offer.

func (*Client) SendProposal

func (c *Client) SendProposal(proposal *ProposeCredential, myDID, theirDID string) error

SendProposal is used by the Holder to send a proposal.

func (*Client) SendRequest

func (c *Client) SendRequest(request *RequestCredential, myDID, theirDID string) error

SendRequest is used by the Holder to send a request.

type IssueCredential

type IssueCredential issuecredential.IssueCredential

IssueCredential contains as attached payload the credentials being issued and is sent in response to a valid Request Credential message.

type OfferCredential

type OfferCredential issuecredential.OfferCredential

OfferCredential is a message sent by the Issuer to the potential Holder, describing the credential they intend to offer and possibly the price they expect to be paid.

type ProposeCredential

type ProposeCredential issuecredential.ProposeCredential

ProposeCredential is an optional message sent by the potential Holder to the Issuer to initiate the protocol or in response to a offer-credential message when the Holder wants some adjustments made to the credential data offered by Issuer.

type ProtocolService

type ProtocolService interface {
	service.DIDComm
	Actions() ([]issuecredential.Action, error)
	ActionContinue(piID string, opt issuecredential.Opt) error
	ActionStop(piID string, err error) error
}

ProtocolService defines the issuecredential service.

type Provider

type Provider interface {
	Service(id string) (interface{}, error)
}

Provider contains dependencies for the issuecredential protocol and is typically created by using aries.Context()

type RequestCredential

type RequestCredential issuecredential.RequestCredential

RequestCredential is a message sent by the potential Holder to the Issuer, to request the issuance of a credential. Where circumstances do not require a preceding Offer Credential message (e.g., there is no cost to issuance that the Issuer needs to explain in advance, and there is no need for cryptographic negotiation), this message initiates the protocol.

Jump to

Keyboard shortcuts

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