Documentation
¶
Index ¶
- Constants
- func BuildMultiAddress(ipAddr, protocol string, port uint, id peer.ID) (ma.Multiaddr, error)
- func CheckAddress(addr string) error
- func ConvertFromInterfacePrivKey(privkey crypto.PrivKey) (*ecdsa.PrivateKey, error)
- func ConvertFromInterfacePubKey(pubKey crypto.PubKey) *ecdsa.PublicKey
- func ConvertToInterfacePrivkey(privkey *ecdsa.PrivateKey) (crypto.PrivKey, error)
- func ConvertToInterfacePubkey(pubkey *ecdsa.PublicKey) (crypto.PubKey, error)
- func GenNetworkKey() (*ecdsa.PrivateKey, error)
- func IPAddr() (net.IP, error)
Constants ¶
View Source
const ( // DefaultIP is hte default ip address to use DefaultIP = "127.0.0.1" // DefaultTCP is the default tcp port used in SSV DefaultTCP = 12001 // DefaultUDP is the default udp port used in SSV DefaultUDP = 13001 )
Variables ¶
This section is empty.
Functions ¶
func BuildMultiAddress ¶
BuildMultiAddress creates a multiaddr from the given params
func CheckAddress ¶
CheckAddress checks that some address is accessible and returns error accordingly
func ConvertFromInterfacePrivKey ¶
func ConvertFromInterfacePrivKey(privkey crypto.PrivKey) (*ecdsa.PrivateKey, error)
ConvertFromInterfacePrivKey converts crypto.PrivKey back to ecdsa.PrivateKey
func ConvertFromInterfacePubKey ¶
ConvertFromInterfacePubKey converts crypto.PubKey to ecdsa.PublicKey
func ConvertToInterfacePrivkey ¶
func ConvertToInterfacePrivkey(privkey *ecdsa.PrivateKey) (crypto.PrivKey, error)
ConvertToInterfacePrivkey converts ecdsa.PrivateKey to crypto.PrivKey
func ConvertToInterfacePubkey ¶
ConvertToInterfacePubkey converts ecdsa.PublicKey to crypto.PubKey
func GenNetworkKey ¶
func GenNetworkKey() (*ecdsa.PrivateKey, error)
GenNetworkKey generates a new network key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.