encodable

package
v0.14.0-patch.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2021 License: AGPL-3.0 Imports: 7 Imported by: 7

Documentation

Index

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

type NetworkPubKey struct {
	crypto.PublicKey
}

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

type RandomBeaconPubKey struct {
	crypto.PublicKey
}

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) EncodeRLP

func (pub *RandomBeaconPubKey) EncodeRLP(w io.Writer) error

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

type StakingPubKey struct {
	crypto.PublicKey
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL