agent

package
v0.0.0-...-e237cb8 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDIDExStateCompResp

func GetDIDExStateCompResp(controllerURL, msgSvcName string) error

GetDIDExStateCompResp get didex state complete message.

func PullMsgFromWebhookURL

func PullMsgFromWebhookURL(webhookURL, topic string, match func(message WebhookMessage) bool) (*service.DIDCommMsgMap, map[string]interface{}, error)

PullMsgFromWebhookURL pulls incoming message from webhook URL.

func RegisterMsgService

func RegisterMsgService(controllerURL, msgSvcName, msgType string) error

RegisterMsgService registers a new message services.

func UnregisterAllMsgServices

func UnregisterAllMsgServices(controllerURL string) error

UnregisterAllMsgServices unregisters all the message services.

Types

type Steps

type Steps struct {
	ControllerURLs map[string]string
	WebhookURLs    map[string]string
	// contains filtered or unexported fields
}

Steps contains steps for aries agent.

func NewSteps

func NewSteps(ctx *context.BDDContext) *Steps

NewSteps returns new agent steps.

func (*Steps) AcceptOOBInvitation

func (a *Steps) AcceptOOBInvitation(agentID string, invitation *outofband.Invitation, label string) (string, error)

AcceptOOBInvitation makes agentID accept the invitation, returning the connection ID.

func (*Steps) AcceptOOBInvitationV2

func (a *Steps) AcceptOOBInvitationV2(agentID string, invitation *outofbandv2.Invitation, label string,
) (string, error)

AcceptOOBInvitationV2 makes agentID accept the oob v2 invitation, returning the connection ID.

func (*Steps) AcceptRequestPresentation

func (a *Steps) AcceptRequestPresentation(agent string, presentation *verifiable.Presentation) error

AcceptRequestPresentation accepts the request for presentation.

func (*Steps) BlindedRouting

func (a *Steps) BlindedRouting(agentID, connID, routerURL string) error

BlindedRouting agent(wallet) registers the other agent(adapter) with the router

func (*Steps) Connect

func (a *Steps) Connect(inviter, invitee string) error

Connect establishes a didcomm connection between the two agents.

func (*Steps) ConnectToWalletBridge

func (a *Steps) ConnectToWalletBridge(userID, walletID string) error

ConnectToWalletBridge connects to remote wallet by resolving invitation from deeplink

func (*Steps) CreateConnection

func (a *Steps) CreateConnection(agent, myDID, label string, theirDID *did.Doc) (string, error)

CreateConnection creates a didcomm connection for the agent between myDID and theirDID.

func (*Steps) CreateKey

func (a *Steps) CreateKey(agent string, t kms.KeyType) (id string, key []byte, err error)

CreateKey creates a key of the given type. Returns the key's ID and the public key material.

func (*Steps) GeneratePresentation

func (a *Steps) GeneratePresentation(agent, signingDID, verificationMethod string,
	vp *verifiable.Presentation, vcs ...*verifiable.Credential) (*verifiable.Presentation, error)

GeneratePresentation generates a new, signed presentation.

func (*Steps) GetAuthZDIDDoc

func (a *Steps) GetAuthZDIDDoc(agent, connID string) (*did.Doc, error)

GetAuthZDIDDoc returns the DID Doc.

func (*Steps) GetConnectionBetweenAgents

func (a *Steps) GetConnectionBetweenAgents(agentA, agentB string) (*didexchange.Connection, error)

GetConnectionBetweenAgents returns a didcomm connection record between the two agents, if one exists.

func (*Steps) RegisterCHAPIMsgHandler

func (a *Steps) RegisterCHAPIMsgHandler(agentID string) error

RegisterCHAPIMsgHandler registers CHAPI request message handler in remote wallet

func (*Steps) RegisterSteps

func (a *Steps) RegisterSteps(s *godog.Suite)

RegisterSteps registers agent steps. nolint: lll

func (*Steps) ResolveDID

func (a *Steps) ResolveDID(agent, didID string) (*did.Doc, error)

ResolveDID resolves the did on behalf of the agent.

func (*Steps) SaveDID

func (a *Steps) SaveDID(agent, friendlyName string, d *did.Doc) error

SaveDID saves the did document.

func (*Steps) SignCredential

func (a *Steps) SignCredential(agent, signingDID string, cred *verifiable.Credential) (*verifiable.Credential, error)

SignCredential signs the credential.

func (*Steps) SubmitWACIPresentation

func (a *Steps) SubmitWACIPresentation(walletID, connID string) error

SubmitWACIPresentation submits presentation through WACI flow.

func (*Steps) ValidateAgentConnection

func (a *Steps) ValidateAgentConnection(agentID, inboundHost, inboundPort, controllerURL string) error

ValidateAgentConnection checks if the controller agent is running.

func (*Steps) ValidateAgentConnectionWithWebhook

func (a *Steps) ValidateAgentConnectionWithWebhook(agentID, inboundHost,
	inboundPort, webhookURL, controllerURL string) error

ValidateAgentConnectionWithWebhook checks if the controller agent is running along with webhook.

func (*Steps) ValidateConnection

func (a *Steps) ValidateConnection(agentID, connID string) (*didexchange.Connection, error)

ValidateConnection retrieves the agent's connection record and tests whether its state is completed.

type WebhookIncoming

type WebhookIncoming struct {
	ID         string         `json:"id"`
	Topic      string         `json:"topic"`
	WebhookMsg WebhookMessage `json:"message"`
}

WebhookIncoming is incoming message model from webhook notifier.

type WebhookMessage

type WebhookMessage struct {
	ProtocolName string
	Message      *service.DIDCommMsgMap
	StateID      string
	Properties   map[string]interface{}
	Type         string
}

WebhookMessage model to hold webhook message model.

Jump to

Keyboard shortcuts

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