tmjson

package
v0.0.0-...-506a26f Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MarshalCodec

type MarshalCodec struct {
	CryptoRegistry *gcrypto.Registry
}

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

Jump to

Keyboard shortcuts

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