identity

package
v0.0.0-...-80c7550 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity interface {
	GetPrivateKey() []byte

	// Marshal marshals a identity to bytes
	Marshal() ([]byte, error)
}

Identity node interface

func CreateIdentity

func CreateIdentity() (Identity, error)

CreateIdentity creates a new identity

func UnmarshalIdentity

func UnmarshalIdentity(r io.Reader) (Identity, error)

UnmarshalIdentity unmarshal identity from a reader

type Libp2pIdentity

type Libp2pIdentity struct {
	pb.Identity
	// contains filtered or unexported fields
}

Libp2pIdentity identity provided by libp2p core

func (*Libp2pIdentity) GetLibp2pPrivateKey

func (id *Libp2pIdentity) GetLibp2pPrivateKey() libp2pCrypto.PrivKey

func (*Libp2pIdentity) GetPrivateKey

func (id *Libp2pIdentity) GetPrivateKey() []byte

func (*Libp2pIdentity) Marshal

func (id *Libp2pIdentity) Marshal() ([]byte, error)

Jump to

Keyboard shortcuts

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