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 ¶ added in v0.2.0
BuildMultiAddress creates a multiaddr from the given params
func CheckAddress ¶ added in v0.2.0
CheckAddress checks that some address is accessible and returns error accordingly
func ConvertFromInterfacePrivKey ¶ added in v0.3.0
func ConvertFromInterfacePrivKey(privkey crypto.PrivKey) (*ecdsa.PrivateKey, error)
ConvertFromInterfacePrivKey converts crypto.PrivKey back to ecdsa.PrivateKey
func ConvertFromInterfacePubKey ¶ added in v0.3.0
ConvertFromInterfacePubKey converts crypto.PubKey to ecdsa.PublicKey
func ConvertToInterfacePrivkey ¶ added in v0.3.0
func ConvertToInterfacePrivkey(privkey *ecdsa.PrivateKey) (crypto.PrivKey, error)
ConvertToInterfacePrivkey converts ecdsa.PrivateKey to crypto.PrivKey
func ConvertToInterfacePubkey ¶ added in v0.3.0
ConvertToInterfacePubkey converts ecdsa.PublicKey to crypto.PubKey
func GenNetworkKey ¶ added in v0.2.0
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.