Documentation ¶
Index ¶
- type NetworkPrivKey
- type NetworkPubKey
- type RandomBeaconPrivKey
- type RandomBeaconPubKey
- func (pub *RandomBeaconPubKey) EncodeRLP(w io.Writer) error
- func (pub RandomBeaconPubKey) MarshalJSON() ([]byte, error)
- func (pub RandomBeaconPubKey) MarshalMsgpack() ([]byte, error)
- func (pub *RandomBeaconPubKey) UnmarshalJSON(b []byte) error
- func (pub *RandomBeaconPubKey) UnmarshalMsgpack(b []byte) error
- type StakingPrivKey
- type StakingPubKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkPrivKey ¶
type NetworkPrivKey struct {
crypto.PrivateKey
}
NetworkPrivKey wraps a private key and allows it to be JSON encoded and decoded. It is not defined in the crypto package since the crypto package should not know about the different key types. More importantly, private keys should not be automatically encodable/serializable to prevent accidental secret sharing. The bootstrapping package is an exception, since it generates private keys that need to be serialized.
func (NetworkPrivKey) MarshalJSON ¶
func (priv NetworkPrivKey) MarshalJSON() ([]byte, error)
func (*NetworkPrivKey) UnmarshalJSON ¶
func (priv *NetworkPrivKey) UnmarshalJSON(b []byte) error
type NetworkPubKey ¶
NetworkPubKey wraps a public key and allows it to be JSON encoded and decoded. It is not defined in the crypto package since the crypto package should not know about the different key types.
func (NetworkPubKey) MarshalJSON ¶
func (pub NetworkPubKey) MarshalJSON() ([]byte, error)
func (*NetworkPubKey) UnmarshalJSON ¶
func (pub *NetworkPubKey) UnmarshalJSON(b []byte) error
type RandomBeaconPrivKey ¶
type RandomBeaconPrivKey struct {
crypto.PrivateKey
}
RandomBeaconPrivKey wraps a private key and allows it to be JSON encoded and decoded. It is not defined in the crypto package since the crypto package should not know about the different key types. More importantly, private keys should not be automatically encodable/serializable to prevent accidental secret sharing. The bootstrapping package is an exception, since it generates private keys that need to be serialized.
func (RandomBeaconPrivKey) MarshalJSON ¶
func (priv RandomBeaconPrivKey) MarshalJSON() ([]byte, error)
func (*RandomBeaconPrivKey) UnmarshalJSON ¶
func (priv *RandomBeaconPrivKey) UnmarshalJSON(b []byte) error
type RandomBeaconPubKey ¶
RandomBeaconPubKey wraps a public key and allows it to be JSON encoded and decoded. It is not defined in the crypto package since the crypto package should not know about the different key types.
func (RandomBeaconPubKey) MarshalJSON ¶
func (pub RandomBeaconPubKey) MarshalJSON() ([]byte, error)
func (RandomBeaconPubKey) MarshalMsgpack ¶
func (pub RandomBeaconPubKey) MarshalMsgpack() ([]byte, error)
func (*RandomBeaconPubKey) UnmarshalJSON ¶
func (pub *RandomBeaconPubKey) UnmarshalJSON(b []byte) error
func (*RandomBeaconPubKey) UnmarshalMsgpack ¶
func (pub *RandomBeaconPubKey) UnmarshalMsgpack(b []byte) error
type StakingPrivKey ¶
type StakingPrivKey struct {
crypto.PrivateKey
}
StakingPrivKey wraps a private key and allows it to be JSON encoded and decoded. It is not defined in the crypto package since the crypto package should not know about the different key types. More importantly, private keys should not be automatically encodable/serializable to prevent accidental secret sharing. The bootstrapping package is an exception, since it generates private keys that need to be serialized.
func (StakingPrivKey) MarshalJSON ¶
func (priv StakingPrivKey) MarshalJSON() ([]byte, error)
func (*StakingPrivKey) UnmarshalJSON ¶
func (priv *StakingPrivKey) UnmarshalJSON(b []byte) error
type StakingPubKey ¶
StakingPubKey wraps a public key and allows it to be JSON encoded and decoded. It is not defined in the crypto package since the crypto package should not know about the different key types.
func (StakingPubKey) MarshalJSON ¶
func (pub StakingPubKey) MarshalJSON() ([]byte, error)
func (*StakingPubKey) UnmarshalJSON ¶
func (pub *StakingPubKey) UnmarshalJSON(b []byte) error