didexchange

package
v0.30.18 Latest Latest
Warning

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

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

Documentation

Overview

Package didexchange is currently used for connection protocol implementation

Index

Constants

This section is empty.

Variables

View Source
var Creator = &Factor{}
View Source
var ResponseCreator = &ResponseFactor{}

Functions

func RouteForConnection added in v0.25.27

func RouteForConnection(conn *Connection) (route []string)

Types

type AFGOConnection added in v0.30.15

type AFGOConnection struct {
	DID string   `json:"DID,omitempty"`
	Doc *did.Doc `json:"DIDDoc,omitempty"`
}

type Connection

type Connection struct {
	DID    string
	DIDDoc core.DIDDoc // handles both types of DIDDoc: sov and AFGO
}

Connection is a connection definition

func (*Connection) MarshalJSON added in v0.30.15

func (c *Connection) MarshalJSON() (_ []byte, err error)

func (*Connection) UnmarshalJSON added in v0.30.15

func (c *Connection) UnmarshalJSON(b []byte) (err error)

type ConnectionSignature

type ConnectionSignature struct {
	Type       string `json:"@type,omitempty"`
	Signature  string `json:"signature,omitempty"`
	SignedData string `json:"sig_data,omitempty"`
	SignVerKey string `json:"signer,omitempty"` // Todo: was signers
}

ConnectionSignature connection signature

type DataConnection added in v0.30.15

type DataConnection struct {
	DID string   `json:"DID,omitempty"`
	Doc *sov.Doc `json:"DIDDoc,omitempty"`
}

type Factor

type Factor struct{}

func (*Factor) NewMessage

func (f *Factor) NewMessage(data []byte) didcomm.MessageHdr

func (*Factor) NewMsg

func (f *Factor) NewMsg(init didcomm.MsgInit) didcomm.MessageHdr

type Request

type Request struct {
	Type       string            `json:"@type,omitempty"`
	ID         string            `json:"@id,omitempty"`
	Label      string            `json:"label,omitempty"`
	Connection *Connection       `json:"connection,omitempty"`
	Thread     *decorator.Thread `json:"~thread,omitempty"`
}

Request defines a2a DID exchange request https://github.com/hyperledger/aries-rfcs/tree/master/features/0023-did-exchange#1-exchange-request

type RequestImpl

type RequestImpl struct {
	*Request
}

func NewMsg

func NewMsg(data []byte) *RequestImpl

func NewRequest

func NewRequest(r *Request) *RequestImpl

func (*RequestImpl) Did

func (m *RequestImpl) Did() string

func (*RequestImpl) Endpoint

func (m *RequestImpl) Endpoint() service.Addr

func (*RequestImpl) FieldObj

func (m *RequestImpl) FieldObj() interface{}

func (*RequestImpl) ID

func (m *RequestImpl) ID() string

func (*RequestImpl) JSON

func (m *RequestImpl) JSON() []byte

func (*RequestImpl) Name

func (m *RequestImpl) Name() string

func (*RequestImpl) Nonce

func (m *RequestImpl) Nonce() string

func (*RequestImpl) SetEndpoint

func (m *RequestImpl) SetEndpoint(ae service.Addr)

func (*RequestImpl) SetID

func (m *RequestImpl) SetID(id string)

func (*RequestImpl) SetType

func (m *RequestImpl) SetType(t string)

func (*RequestImpl) Thread

func (m *RequestImpl) Thread() *decorator.Thread

func (*RequestImpl) Type

func (m *RequestImpl) Type() string

func (*RequestImpl) VerKey

func (m *RequestImpl) VerKey() string

type Response

type Response struct {
	Type                string               `json:"@type,omitempty"`
	ID                  string               `json:"@id,omitempty"`
	ConnectionSignature *ConnectionSignature `json:"connection~sig,omitempty"`
	Thread              *decorator.Thread    `json:"~thread,omitempty"`

	Connection *Connection `json:"-"` // Actual data, to be signed or verified
}

Response defines a2a DID exchange response https://github.com/hyperledger/aries-rfcs/tree/master/features/0023-did-exchange#2-exchange-response

func (*Response) Endpoint

func (r *Response) Endpoint() service.Addr

func (*Response) SetEndpoint

func (r *Response) SetEndpoint(ae service.Addr)

type ResponseFactor

type ResponseFactor struct{}

func (*ResponseFactor) Create

func (*ResponseFactor) NewMessage

func (f *ResponseFactor) NewMessage(data []byte) didcomm.MessageHdr

func (*ResponseFactor) NewMsg

type ResponseImpl

type ResponseImpl struct {
	*Response
}

func NewResponse

func NewResponse(r *Response) *ResponseImpl

func NewResponseMsg

func NewResponseMsg(data []byte) *ResponseImpl

func (*ResponseImpl) Did

func (m *ResponseImpl) Did() string

func (*ResponseImpl) FieldObj

func (m *ResponseImpl) FieldObj() interface{}

func (*ResponseImpl) ID

func (m *ResponseImpl) ID() string

func (*ResponseImpl) JSON

func (m *ResponseImpl) JSON() []byte

func (*ResponseImpl) Name

func (m *ResponseImpl) Name() string

func (*ResponseImpl) Nonce

func (m *ResponseImpl) Nonce() string

func (*ResponseImpl) SetID

func (m *ResponseImpl) SetID(id string)

func (*ResponseImpl) SetType

func (m *ResponseImpl) SetType(t string)

func (*ResponseImpl) Thread

func (m *ResponseImpl) Thread() *decorator.Thread

func (*ResponseImpl) Type

func (m *ResponseImpl) Type() string

func (*ResponseImpl) VerKey

func (m *ResponseImpl) VerKey() string

Directories

Path Synopsis
Package invitation is for invitation data model.
Package invitation is for invitation data model.

Jump to

Keyboard shortcuts

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