did

package
v0.0.0-...-a5ce5ae Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolID = protocol.ID("/tcfw/did/0.0.1")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStore

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

func NewFileStore

func NewFileStore(path string) (*FileStore, error)

func (*FileStore) Add

func (fs *FileStore) Add(id did.PrivateIdentity) error

func (*FileStore) Find

func (fs *FileStore) Find(id string) (did.PrivateIdentity, error)

func (*FileStore) List

func (fs *FileStore) List() ([]did.PrivateIdentity, error)

type Handler

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

func NewHandler

func NewHandler(n node.Node) *Handler

func (*Handler) Consensus

func (h *Handler) Consensus() *consensus.Consensus

func (*Handler) Handle

func (h *Handler) Handle(nstream network.Stream)

func (*Handler) ReqTip

func (h *Handler) ReqTip(ctx context.Context, p peer.ID) (string, error)

func (*Handler) Start

func (h *Handler) Start() error

type IdentityFileStore

type IdentityFileStore struct {
	Ids []IdentityFileStoreId `yaml:"ids"`
}

type IdentityFileStoreId

type IdentityFileStoreId struct {
	Type string `yaml:"type"`
	Data string `yaml:"data"`
}

Jump to

Keyboard shortcuts

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