package
0.0.0-20220620005849-a315113d9162
Repository: https://github.com/mycodeku/transtionhelper.git
Documentation: pkg.go.dev
# Packages
Package legacy contains a global amino Cdc which is deprecated but still used in several places within the SDK.
Package types defines a custom wrapper for google.protobuf.Any which supports
cached values as well as InterfaceRegistry which keeps track of types which can
be used with Any for both security and introspection
*/.
unknownproto implements functionality to "type check" protobuf serialized byte sequences
against an expected proto.Message to report:
a) Unknown fields in the stream -- this is indicative of mismatched services, perhaps a malicious actor
b) Mismatched wire types for a field -- this is indicative of mismatched services
Its API signature is similar to proto.Unmarshal([]byte, proto.Message) in the strict case
if err := RejectUnknownFieldsStrict(protoBlob, protoMessage, false); err != nil {
// Handle the error.
# Functions
MarshalJSONIndent provides a utility for indented JSON encoding of an object via an Amino codec.
MarshalYAML marshals toPrint using JSONCodec to leverage specialized MarshalJSON methods (usually related to serialize data with protobuf or amin depending on a configuration).
MustMarshalJSONIndent executes MarshalJSONIndent except it panics upon failure.
NewAminoCodec returns a reference to a new AminoCodec.
No description provided by the author
NewProtoCodec returns a reference to a new ProtoCodec.
ProtoMarshalJSON provides an auxiliary function to return Proto3 JSON encoded bytes of a message.
RegisterEvidences registers Tendermint evidence types with the provided Amino codec.
# Structs
AminoCodec defines a codec that utilizes Codec for both binary and JSON encoding.
LegacyAmino defines a wrapper for an Amino codec that properly handles protobuf types with Any's.
ProtoCodec defines a codec that utilizes Protobuf for both binary and JSON encoding.
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProtoCodecMarshaler defines an interface for codecs that utilize Protobuf for both binary and JSON encoding.
No description provided by the author