Documentation ¶
Index ¶
- Constants
- Variables
- func AddressToPeerID(addr ethereum.Address) peer.ID
- func HexAddressToPeerID(a string) peer.ID
- func NewPrivKey(signer ethereum.Signer) crypto.PrivKey
- func NewPubKey(address ethereum.Address) crypto.PubKey
- func PeerIDToAddress(id peer.ID) ethereum.Address
- func UnmarshalEthPrivateKey(data []byte) (crypto.PrivKey, error)
- func UnmarshalEthPublicKey(data []byte) (crypto.PubKey, error)
- type PrivKey
- type PubKey
Constants ¶
View Source
const KeyTypeID cryptoPB.KeyType = 10
KeyTypeID uses the Ethereum keys to sign and verify messages.
Variables ¶
NewSigner points to a function which creates a new Ethereum signer used to verify signatures.
Functions ¶
func AddressToPeerID ¶
AddressToPeerID converts an Ethereum address to a peer ID. If address is invalid then empty ID will be returned.
func HexAddressToPeerID ¶
HexAddressToPeerID converts an Ethereum address given as hex string to a peer ID. If address is invalid then empty ID will be returned.
func UnmarshalEthPrivateKey ¶
UnmarshalEthPrivateKey should return private key from input bytes, but this not supported for ethereum keys.
Types ¶
type PrivKey ¶
type PrivKey struct {
// contains filtered or unexported fields
}
type PubKey ¶
type PubKey struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.