Documentation ¶
Overview ¶
Package tmjson contains types satisfying the tmcodec interfaces that serializing to and deserialize from JSON.
These types are simple to work with, simple to maintain, and easy to read. You can certainly get better performance with other serialization methods.
Index ¶
- type MarshalCodec
- func (c MarshalCodec) MarshalCommittedHeader(ch tmconsensus.CommittedHeader) ([]byte, error)
- func (c MarshalCodec) MarshalConsensusMessage(m tmcodec.ConsensusMessage) ([]byte, error)
- func (c MarshalCodec) MarshalHeader(b tmconsensus.Header) ([]byte, error)
- func (c MarshalCodec) MarshalPrecommitProof(p tmconsensus.PrecommitSparseProof) ([]byte, error)
- func (c MarshalCodec) MarshalPrevoteProof(p tmconsensus.PrevoteSparseProof) ([]byte, error)
- func (c MarshalCodec) MarshalProposedHeader(ph tmconsensus.ProposedHeader) ([]byte, error)
- func (c MarshalCodec) UnmarshalCommittedHeader(b []byte, ch *tmconsensus.CommittedHeader) error
- func (c MarshalCodec) UnmarshalConsensusMessage(b []byte, m *tmcodec.ConsensusMessage) error
- func (c MarshalCodec) UnmarshalHeader(b []byte, header *tmconsensus.Header) error
- func (c MarshalCodec) UnmarshalPrecommitProof(b []byte, p *tmconsensus.PrecommitSparseProof) error
- func (c MarshalCodec) UnmarshalPrevoteProof(b []byte, p *tmconsensus.PrevoteSparseProof) error
- func (c MarshalCodec) UnmarshalProposedHeader(b []byte, ph *tmconsensus.ProposedHeader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MarshalCodec ¶
MarshalCodec is a tmcodec.MarshalCodec that translates tmconsensus values to and from JSON.
func (MarshalCodec) MarshalCommittedHeader ¶
func (c MarshalCodec) MarshalCommittedHeader(ch tmconsensus.CommittedHeader) ([]byte, error)
func (MarshalCodec) MarshalConsensusMessage ¶
func (c MarshalCodec) MarshalConsensusMessage(m tmcodec.ConsensusMessage) ([]byte, error)
func (MarshalCodec) MarshalHeader ¶
func (c MarshalCodec) MarshalHeader(b tmconsensus.Header) ([]byte, error)
func (MarshalCodec) MarshalPrecommitProof ¶
func (c MarshalCodec) MarshalPrecommitProof(p tmconsensus.PrecommitSparseProof) ([]byte, error)
func (MarshalCodec) MarshalPrevoteProof ¶
func (c MarshalCodec) MarshalPrevoteProof(p tmconsensus.PrevoteSparseProof) ([]byte, error)
func (MarshalCodec) MarshalProposedHeader ¶
func (c MarshalCodec) MarshalProposedHeader(ph tmconsensus.ProposedHeader) ([]byte, error)
func (MarshalCodec) UnmarshalCommittedHeader ¶
func (c MarshalCodec) UnmarshalCommittedHeader(b []byte, ch *tmconsensus.CommittedHeader) error
func (MarshalCodec) UnmarshalConsensusMessage ¶
func (c MarshalCodec) UnmarshalConsensusMessage(b []byte, m *tmcodec.ConsensusMessage) error
func (MarshalCodec) UnmarshalHeader ¶
func (c MarshalCodec) UnmarshalHeader(b []byte, header *tmconsensus.Header) error
func (MarshalCodec) UnmarshalPrecommitProof ¶
func (c MarshalCodec) UnmarshalPrecommitProof(b []byte, p *tmconsensus.PrecommitSparseProof) error
func (MarshalCodec) UnmarshalPrevoteProof ¶
func (c MarshalCodec) UnmarshalPrevoteProof(b []byte, p *tmconsensus.PrevoteSparseProof) error
func (MarshalCodec) UnmarshalProposedHeader ¶
func (c MarshalCodec) UnmarshalProposedHeader(b []byte, ph *tmconsensus.ProposedHeader) error
Click to show internal directories.
Click to hide internal directories.