feat(codec)!: add get signers to codec + merged proto registry to InterfaceRegistry (#15600)
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
This commit is contained in:
co-authored by
Matt Kocubinski
parent
cdf6471e51
commit
9332942f37
@@ -3,6 +3,7 @@ package codec
|
||||
import (
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"google.golang.org/grpc/encoding"
|
||||
protov2 "google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
)
|
||||
@@ -18,6 +19,26 @@ type (
|
||||
Codec interface {
|
||||
BinaryCodec
|
||||
JSONCodec
|
||||
|
||||
// InterfaceRegistry returns the interface registry.
|
||||
InterfaceRegistry() types.InterfaceRegistry
|
||||
|
||||
// GetMsgAnySigners returns the signers of the given message encoded in a protobuf Any
|
||||
// as well as the decoded google.golang.org/protobuf/proto.Message that was used to
|
||||
// extract the signers so that this can be used in other contexts.
|
||||
GetMsgAnySigners(msg *types.Any) ([]string, protov2.Message, error)
|
||||
|
||||
// GetMsgV2Signers returns the signers of the given message.
|
||||
GetMsgV2Signers(msg protov2.Message) ([]string, error)
|
||||
|
||||
// GetMsgV1Signers returns the signers of the given message plus the
|
||||
// decoded google.golang.org/protobuf/proto.Message that was used to extract the
|
||||
// signers so that this can be used in other contexts.
|
||||
GetMsgV1Signers(msg proto.Message) ([]string, protov2.Message, error)
|
||||
|
||||
// mustEmbedCodec requires that all implementations of Codec embed an official implementation from the codec
|
||||
// package. This allows new methods to be added to the Codec interface without breaking backwards compatibility.
|
||||
mustEmbedCodec()
|
||||
}
|
||||
|
||||
BinaryCodec interface {
|
||||
|
||||
Reference in New Issue
Block a user