aries

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOutOfBandV2Client added in v0.1.8

func CreateOutOfBandV2Client(ariesCtx outofbandv2.Provider) (*outofbandv2.Client, error)

CreateOutOfBandV2Client util function to create oob v2 client.

func CreateOutofbandClient

func CreateOutofbandClient(ariesCtx outofband.Provider) (*outofband.Client, error)

CreateOutofbandClient util function to create oob client.

func CreateVerification added in v0.1.8

func CreateVerification(keyManager kms.KeyManager, id string, kt kms.KeyType, relationship did.VerificationRelationship,
) (*did.Verification, error)

CreateVerification creates a did.Verification with a referenced did.VerificationMethod, with a new key of type kt.

func GetPublicDID added in v0.1.8

func GetPublicDID(ctx Ctx, cfg *PublicDIDConfig) (string, error)

GetPublicDID gets the public DID that this router will use for OOBv2 invitations.

Types

type Ctx

type Ctx interface {
	Service(id string) (interface{}, error)
	ServiceEndpoint() string
	RouterEndpoint() string
	StorageProvider() storage.Provider
	ProtocolStateStorageProvider() storage.Provider
	KMS() kms.KeyManager
	VDRegistry() vdrapi.Registry
	Crypto() ariescrypto.Crypto
	KeyType() kms.KeyType
	KeyAgreementType() kms.KeyType
	MediaTypeProfiles() []string
}

Ctx framework context provider.

type DIDExchange

type DIDExchange interface {
	CreateConnection(myDID string, theirDID *did.Doc, options ...didexchange.ConnectionOption) (string, error)
	RegisterActionEvent(chan<- service.DIDCommAction) error
	GetConnection(connectionID string) (*didexchange.Connection, error)
}

DIDExchange client.

func CreateDIDExchangeClient

func CreateDIDExchangeClient(ctx Ctx, actionCh chan service.DIDCommAction,
	stateMsgCh chan service.StateMsg) (DIDExchange, error)

CreateDIDExchangeClient util function to create did exchange client and registers for action event.

type Mediator

type Mediator interface {
	RegisterActionEvent(chan<- service.DIDCommAction) error
}

Mediator client.

func CreateMediatorClient

func CreateMediatorClient(ctx Ctx, actionCh chan service.DIDCommAction) (Mediator, error)

CreateMediatorClient util function to create mediator client and registers for action event.

type MsgService

type MsgService struct {
	// contains filtered or unexported fields
}

MsgService msg service implementation.

func NewMsgSvc

func NewMsgSvc(name, msgType string, msgCh chan service.DIDCommMsg) *MsgService

NewMsgSvc new msg service.

func (*MsgService) Accept

func (m *MsgService) Accept(msgType string, _ []string) bool

Accept validates whether the service handles msgType and purpose.

func (*MsgService) HandleInbound

func (m *MsgService) HandleInbound(msg service.DIDCommMsg, _ service.DIDCommContext) (string, error)

HandleInbound handles inbound didcomm msg.

func (*MsgService) Name

func (m *MsgService) Name() string

Name svc name.

type OutOfBand

type OutOfBand interface {
	CreateInvitation(services []interface{}, opts ...outofband.MessageOption) (*outofband.Invitation, error)
}

OutOfBand client.

type OutOfBandV2 added in v0.1.8

type OutOfBandV2 interface {
	CreateInvitation(opts ...outofbandv2.MessageOption) (*oobv2svc.Invitation, error)
}

OutOfBandV2 client.

type PublicDIDConfig added in v0.1.8

type PublicDIDConfig struct {
	TLSConfig       *tls.Config
	OrbDomains      []string
	DIDCommEndPoint string
	Token           string
}

PublicDIDConfig contains parameters for Orb public DID creation.

type PublicDIDGetter added in v0.1.8

type PublicDIDGetter struct {
	// contains filtered or unexported fields
}

PublicDIDGetter initializes and provides the public DID this router will use.

func (*PublicDIDGetter) Initialize added in v0.1.8

func (g *PublicDIDGetter) Initialize(didcommEndPoint string) (string, error)

Initialize initializes the PublicDIDGetter by creating a public orb DID.

Jump to

Keyboard shortcuts

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