peer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID uint32

ID is a peer ID

func (*ID) Decode

func (i *ID) Decode(buf []byte)

Decode a 4 byte ID

func (ID) Encode

func (i ID) Encode() []byte

Encode a 4 byte ID

func (ID) Equal

func (i ID) Equal(id int) bool

Equal checks for integer equality

func (ID) Scalar

func (i ID) Scalar() (*ristretto255.Scalar, error)

Scalar maps an ID to a new field element

type Transport

type Transport interface {
	Send(id ID, msg []byte) error // sends a message to a peer
	Recv(id ID) ([]byte, error)   // receives a message from a peer
}

Transport defines an abstraction over the message transport layer Used to route messages between peers during key generation and signing

Jump to

Keyboard shortcuts

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