Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ed25519PublicKeyFromPeerPublicKey ¶
func Ed25519PublicKeyFromPeerPublicKey(pk PeerPublicKey) ed25519.PublicKey
Types ¶
type Address ¶
type Address string
Address represents a network address & port such as "192.168.1.2:8080". It can also contain special bind addresses such as "0.0.0.0:80".
type PeerID ¶
type PeerID [ed25519.PublicKeySize]byte
PeerID represents a unique identifier for another peer.
func PeerIDFromKeyring ¶
func PeerIDFromKeyring(keyring PeerKeyring) PeerID
func PeerIDFromPeerPublicKey ¶
func PeerIDFromPeerPublicKey(pk PeerPublicKey) PeerID
func PeerIDFromPrivateKey ¶
func PeerIDFromPrivateKey(sk ed25519.PrivateKey) (PeerID, error)
func (PeerID) MarshalBinary ¶
func (PeerID) MarshalText ¶
func (*PeerID) UnmarshalBinary ¶
func (*PeerID) UnmarshalText ¶
type PeerKeyring ¶
type PeerKeyring interface { // Sign returns an EdDSA-Ed25519 signature on msg produced using the // standard library's ed25519.Sign function. Must be fast. Sign(msg []byte) (signature []byte, err error) // PublicKey returns the public component of the keypair used in Sign. PublicKey() PeerPublicKey }
type PeerPublicKey ¶
type PeerPublicKey [ed25519.PublicKeySize]byte
PeerPublicKey is the public key used to cryptographically identify an oracle in p2p related communications and peer discovery.
func MustPeerPublicKeyFromGenericPublicKey ¶
func MustPeerPublicKeyFromGenericPublicKey(publickey crypto.PublicKey) PeerPublicKey
func PeerPublicKeyFromGenericPublicKey ¶
func PeerPublicKeyFromGenericPublicKey(publickey crypto.PublicKey) (PeerPublicKey, error)
Click to show internal directories.
Click to hide internal directories.