invitation

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

View Source
const DIDKeyPrefix = "did:key"

Variables

This section is empty.

Functions

func Build added in v0.1.26

func Build(inv Invitation) (s string, err error)

Types

type AgentInfo added in v0.2.0

type AgentInfo struct {
	InvitationType string
	InvitationID   string
	EndpointURL    string
	RecipientKey   string
	AgentLabel     string
}

type DIDExchangeVersion added in v0.2.0

type DIDExchangeVersion int
const (
	DIDExchangeVersionV0 DIDExchangeVersion = 0
	DIDExchangeVersionV1 DIDExchangeVersion = 10
	DIDExchangeVersionV2 DIDExchangeVersion = 20
)

type Invitation

type Invitation interface {
	Build() (string, error)
	Version() DIDExchangeVersion
	Type() string
	ID() string
	Label() string
	Services() []ServiceEndpoint
	ImageURL() string
	Accept() []string
	HandshakeProtocols() []string
}

func Create added in v0.2.0

func Create(version DIDExchangeVersion, info AgentInfo) (inv Invitation, err error)

func CreateInvitationV0 added in v0.2.0

func CreateInvitationV0(info *AgentInfo) Invitation

func CreateInvitationV1 added in v0.2.0

func CreateInvitationV1(info *AgentInfo) Invitation

func Translate added in v0.1.26

func Translate(s string) (i Invitation, err error)

type ServiceEndpoint added in v0.2.0

type ServiceEndpoint struct {
	ID              string
	ServiceEndpoint string
	Type            string
	RecipientKeys   []string
	RoutingKeys     []string
}

func (ServiceEndpoint) RecipientKeysAsB58 added in v0.2.0

func (s ServiceEndpoint) RecipientKeysAsB58() []string

func (ServiceEndpoint) RoutingKeysAsB58 added in v0.2.0

func (s ServiceEndpoint) RoutingKeysAsB58() []string

type V0 added in v0.2.0

type V0 struct {
	// the Image URL of the connection invitation
	ImageURL string `json:"imageUrl,omitempty"`

	// the Service endpoint of the connection invitation
	ServiceEndpoint string `json:"serviceEndpoint,omitempty"`

	// the RecipientKeys for the connection invitation
	RecipientKeys []string `json:"recipientKeys,omitempty"`

	// the ID of the connection invitation
	ID string `json:"@id,omitempty"`

	// the Label of the connection invitation
	Label string `json:"label,omitempty"`

	// the RoutingKeys of the connection invitation
	RoutingKeys []string `json:"routingKeys,omitempty"`

	// the Type of the connection invitation
	Type string `json:"@type,omitempty"`
}

type V1 added in v0.2.0

type V1 struct {
	// the Type of the connection invitation
	Type string `json:"@type,omitempty"`

	// the ID of the connection invitation
	ID string `json:"@id,omitempty"`

	// the Label of the connection invitation
	Label string `json:"label,omitempty"`

	Accept []string `json:"accept,omitempty"`

	HandshakeProtocols []string `json:"handshake_protocols,omitempty"`

	Services []V1Service `json:"services,omitempty"`

	// the Image URL of the connection invitation
	ImageURL string `json:"imageUrl,omitempty"`
}

type V1Service added in v0.2.0

type V1Service struct {
	ID              string   `json:"id,omitempty"`
	ServiceEndpoint string   `json:"serviceEndpoint,omitempty"`
	Type            string   `json:"type,omitempty"`
	RecipientKeys   []string `json:"recipientKeys,omitempty"`
	RoutingKeys     []string `json:"routingKeys,omitempty"`
}

Jump to

Keyboard shortcuts

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