encodable

package
v0.24.10-one-receipt Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: AGPL-3.0 Imports: 8 Imported by: 7

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 added in v0.20.0

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 added in v0.20.0

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

func (*MachineAccountPrivKey) UnmarshalJSON added in v0.20.0

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 added in v0.20.0

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

func (*RandomBeaconPrivKey) UnmarshalJSON

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

func (*RandomBeaconPrivKey) UnmarshalMsgpack added in v0.20.0

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 added in v0.21.0

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 added in v0.21.0

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