Documentation
¶
Index ¶
- func WithFriendlyNames(names ...string) issuecredential.Opt
- func WithIssueCredential(msg *IssueCredential) issuecredential.Opt
- func WithOfferCredential(msg *OfferCredential) issuecredential.Opt
- func WithProposeCredential(msg *ProposeCredential) issuecredential.Opt
- type Action
- type Client
- func (c *Client) AcceptCredential(piID string, names ...string) error
- func (c *Client) AcceptOffer(piID string) error
- func (c *Client) AcceptProposal(piID string, msg *OfferCredential) error
- func (c *Client) AcceptRequest(piID string, msg *IssueCredential) error
- func (c *Client) Actions() ([]Action, error)
- func (c *Client) DeclineCredential(piID, reason string) error
- func (c *Client) DeclineOffer(piID, reason string) error
- func (c *Client) DeclineProposal(piID, reason string) error
- func (c *Client) DeclineRequest(piID, reason string) error
- func (c *Client) NegotiateProposal(piID string, msg *ProposeCredential) error
- func (c *Client) SendOffer(offer *OfferCredential, myDID, theirDID string) error
- func (c *Client) SendProposal(proposal *ProposeCredential, myDID, theirDID string) error
- func (c *Client) SendRequest(request *RequestCredential, myDID, theirDID string) error
- type IssueCredential
- type OfferCredential
- type ProposeCredential
- type ProtocolService
- type Provider
- type RequestCredential
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 Client ¶
Client enable access to issuecredential API
func (*Client) AcceptCredential ¶
AcceptCredential is used when the Holder is willing to accept the IssueCredential. NOTE: For async usage.
func (*Client) AcceptOffer ¶
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) DeclineCredential ¶
DeclineCredential is used when the Holder does not want to accept the IssueCredential. NOTE: For async usage.
func (*Client) DeclineOffer ¶
DeclineOffer is used when the Holder does not want to accept the offer. NOTE: For async usage.
func (*Client) DeclineProposal ¶
DeclineProposal is used when the Issuer does not want to accept the proposal. NOTE: For async usage.
func (*Client) DeclineRequest ¶
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 ¶
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.