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 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"` }
Click to show internal directories.
Click to hide internal directories.