encodable

package
v0.29.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: AGPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const ConsensusVoteSigLen = uint(crypto.SignatureLenBLSBLS12381)

ConsensusVoteSigLen is the length of a consensus vote as well as aggregated consensus votes.

View Source
const RandomBeaconSigLen = uint(crypto.SignatureLenBLSBLS12381)

RandomBeaconSigLen is the length of a random beacon signature share as well as the random beacon resonstructed signature.

Variables

This section is empty.

Functions

This section is empty.

Types

type MachineAccountPrivKey

type MachineAccountPrivKey struct {
	crypto.PrivateKey
}

MachineAccountPrivKey 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 (MachineAccountPrivKey) MarshalJSON

func (priv MachineAccountPrivKey) MarshalJSON() ([]byte, error)

func (*MachineAccountPrivKey) UnmarshalJSON

func (priv *MachineAccountPrivKey) UnmarshalJSON(b []byte) error

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

func (priv RandomBeaconPrivKey) MarshalMsgpack() ([]byte, error)

func (*RandomBeaconPrivKey) UnmarshalJSON

func (priv *RandomBeaconPrivKey) UnmarshalJSON(b []byte) error

func (*RandomBeaconPrivKey) UnmarshalMsgpack

func (priv *RandomBeaconPrivKey) UnmarshalMsgpack(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) MarshalCBOR

func (pub RandomBeaconPubKey) MarshalCBOR() ([]byte, error)

func (RandomBeaconPubKey) MarshalJSON

func (pub RandomBeaconPubKey) MarshalJSON() ([]byte, error)

func (RandomBeaconPubKey) MarshalMsgpack

func (pub RandomBeaconPubKey) MarshalMsgpack() ([]byte, error)

func (*RandomBeaconPubKey) UnmarshalCBOR

func (pub *RandomBeaconPubKey) UnmarshalCBOR(b []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