didexchange

package
v0.24.9 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 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

This section is empty.

Types

type Connection

type Connection struct {
	DID    string   `json:"DID,omitempty"`
	DIDDoc *did.Doc `json:"DIDDoc,omitempty"` // todo: was did_doc
}

Connection connection

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 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"`
	// contains filtered or unexported fields
}

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)

func (*Response) Sign

func (r *Response) Sign(pipe sec.Pipe) (err error)

func (*Response) Verify

func (r *Response) Verify() (ok bool, err error)

type ResponseFactor

type ResponseFactor struct{}

func (*ResponseFactor) Create

func (*ResponseFactor) NewAnonDecryptedMsg

func (f *ResponseFactor) NewAnonDecryptedMsg(wallet int, cryptStr string, did *ssi.DID) didcomm.Msg

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